[SOLVED] Cart Module Fatal Error when changing quantity
Posted: Mon Jun 14, 2010 8:19 pm
Hi all,
I'm installing the Products/Carts/Orders eCommerce suite by Calguy at http://www.getmepress.com/services2 (ignore the mess, it's unstyled as of yet) and everything is going great (thanks Calguy!) except when I add a product to my cart and then try to update the quantity by changing the amount and hitting the submit button, I get the following error:
Fatal error: Call to a member function set_quantity() on a non-object in .../modules/Cart/action.viewcart.php on line 74
The 'Remove All Items' button is working fine.
Here's the code in question:
I haven't touched the templates yet, and here are my site settings:
----------------------------------------------
Cms Version: 1.7.1
Installed Modules:
* CMSMailer: 2.0
* FileManager: 1.0.2
* MenuManager: 1.6.3
* ModuleManager: 1.3.3
* News: 2.10.5
* nuSOAP: 1.0.1
* Printing: 1.0.4
* Search: 1.6.3
* ThemeManager: 1.1.1
* TinyMCE: 2.7.0
* CGExtensions: 1.18.8
* CGSimpleSmarty: 1.4.4
* CGEcommerceBase: 1.1.1
* Products: 2.8.2
* CGPaymentGatewayBase: 1.0.5
* FrontEndUsers: 1.9.3
* Orders: 1.8.6
* Cart: 1.6.2
* CGBlog: 1.4
* PaypalGateway: 2.1.7
* JQueryTools: 1.0.6
* Promotions: 1.0.7
* FormBuilder: 0.6.2
* CGFeedMaker: 1.0.11
* SelfRegistration: 1.4.2
* Captcha: 0.4
Config Information:
* php_memory_limit:
* process_whole_template: false
* max_upload_size: 8000000
* default_upload_permission: 664
* assume_mod_rewrite: true
* page_extension:
* internal_pretty_urls: false
* use_hierarchy: true
Php Information:
* phpversion: 5.2.8
* md5_function: On (True)
* gd_version: 2
* tempnam_function: On (True)
* magic_quotes_runtime: Off (False)
* E_STRICT: 0
* memory_limit: 64M
* max_execution_time: 30
* safe_mode: Off (False)
* session_save_path: /tmp (1777)
* session_use_cookies: On (True)
Server Information:
* Server Api: cgi-fcgi
* Server Db Type: MySQL (mysql)
* Server Db Version: 5.0.91
----------------------------------------------
Thanks in advance for your help!
[SOLVED EDIT] I had reinstalled the modules from the module manager, and I still got the error, but I just downloaded the module files and overwrote the action.viewcart.php file, and now it works!!
I'm installing the Products/Carts/Orders eCommerce suite by Calguy at http://www.getmepress.com/services2 (ignore the mess, it's unstyled as of yet) and everything is going great (thanks Calguy!) except when I add a product to my cart and then try to update the quantity by changing the amount and hitting the submit button, I get the following error:
Fatal error: Call to a member function set_quantity() on a non-object in .../modules/Cart/action.viewcart.php on line 74
The 'Remove All Items' button is working fine.
Here's the code in question:
Code: Select all
// adjust the quantity
$idx = 0;
foreach( $params as $key => $value )
{
if( preg_match( '/cart_quantity_/', $key ) )
{
$idx = (int)substr($key,14);
$items[$idx]->set_quantity($value);
}
}
----------------------------------------------
Cms Version: 1.7.1
Installed Modules:
* CMSMailer: 2.0
* FileManager: 1.0.2
* MenuManager: 1.6.3
* ModuleManager: 1.3.3
* News: 2.10.5
* nuSOAP: 1.0.1
* Printing: 1.0.4
* Search: 1.6.3
* ThemeManager: 1.1.1
* TinyMCE: 2.7.0
* CGExtensions: 1.18.8
* CGSimpleSmarty: 1.4.4
* CGEcommerceBase: 1.1.1
* Products: 2.8.2
* CGPaymentGatewayBase: 1.0.5
* FrontEndUsers: 1.9.3
* Orders: 1.8.6
* Cart: 1.6.2
* CGBlog: 1.4
* PaypalGateway: 2.1.7
* JQueryTools: 1.0.6
* Promotions: 1.0.7
* FormBuilder: 0.6.2
* CGFeedMaker: 1.0.11
* SelfRegistration: 1.4.2
* Captcha: 0.4
Config Information:
* php_memory_limit:
* process_whole_template: false
* max_upload_size: 8000000
* default_upload_permission: 664
* assume_mod_rewrite: true
* page_extension:
* internal_pretty_urls: false
* use_hierarchy: true
Php Information:
* phpversion: 5.2.8
* md5_function: On (True)
* gd_version: 2
* tempnam_function: On (True)
* magic_quotes_runtime: Off (False)
* E_STRICT: 0
* memory_limit: 64M
* max_execution_time: 30
* safe_mode: Off (False)
* session_save_path: /tmp (1777)
* session_use_cookies: On (True)
Server Information:
* Server Api: cgi-fcgi
* Server Db Type: MySQL (mysql)
* Server Db Version: 5.0.91
----------------------------------------------
Thanks in advance for your help!
[SOLVED EDIT] I had reinstalled the modules from the module manager, and I still got the error, but I just downloaded the module files and overwrote the action.viewcart.php file, and now it works!!