Page 1 of 1

Cart2 causing Fatal Error

Posted: Fri May 13, 2016 1:18 pm
by Edwin_IandD
Hello all,

I am having a frustrating problem with Cart2.

If I activate the 'add to cart' in the Product template I get the following error:

Code: Select all

Fatal error</b>
: Call to a member function Lang() on a non-object in
<b>/mysite/myfolder/lib/smarty/sysplugins/smarty_internal_templatebase.php(151) : eval()'d code</b>
on line
<b>38</b>
When this happens none of my CSS is loaded and half the site isn't showing either..

I am running CMSMS 2.1.2 and use Cart2 with CG Ecommerce Base, Products, Orders, Promotions, and Paypal Gateway (not configured yet, just so you know in case that might be the problem which I doubt very much..)

Any ideas what might be causing this?

Re: Cart2 causing Fatal Error

Posted: Fri May 13, 2016 2:05 pm
by Edwin_IandD
okay, it seems to work again if I remove this bit of code from the preferences in Cart2

Code: Select all

{if $opt->qoh > 0} -- {$opt->qoh} }
{$mod->Lang('available')}{/if}
Don't know what this is suppose to do, but it is breaking my site..

Re: Cart2 causing Fatal Error

Posted: Sat May 14, 2016 9:35 am
by velden
It should tell how many items are 'on hand'.

Better file a bug report here with detailed description of your setup:
http://dev.cmsmadesimple.org/bug/list/1206

FYI: I just tested on pretty default install I did last week and same error occurs. Important to mention is that it only happens on products which have product options.

Re: Cart2 causing Fatal Error

Posted: Mon May 16, 2016 8:36 am
by Edwin_IandD
Thanks, Velden. I've just done that.

Noticed there is a new version of Cart2, will update later today and see if this problem is fixed.