Fatal Error: add to cart, calculate cart total, autoload, incomplete object, unserialize, jigoshop_product
Receive an error similar to the one below? The 'incomplete object' or 'unserialize' and 'autoload' are the keys for this issue identification.
Fatal error: jigoshop_cart::calculate_cart_total() [jigoshop-cart.calculate-cart-total]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "jigoshop_product" of the object you are trying to operate on was loaded before unserialize() gets called or provide a __autoload() function to load the class definition in /plugins/jigoshop/classes/jigoshop_cart.class.php on line 442
The proper fix for this is to find (by process of elimination) the plugin that is conflicting - using session_start() incorrectly:
-
De-activate plugin by plugin, visit your Shop and 'Add to Cart' a product. Does the site still crash? If so, keep trying all the plugins.
-
If the site is down you can de-activate a plugin to bring the site back up by dragging that plugin's folder OUT of the WordPress plugins folder. When you visit the site again, WordPress will de-activate it automatically because it can't find it.
-
Once you have found the plugin that when de-activated WILL allow a product to be added to the Cart without bringing down the site, open up it's main plugin file usually named the same as the folder that contains it. For Jigoshop that would be the file 'jigoshop.php' (it could could be in other files the main one loads).
-
Find
session_start();. Remove it for now and contact the developer to fix this flaw in their plugin. Point the developer to this thread for a full discussion and various fixes .
More detailed explanation to fix this issue on this particular Forum post
-
Getting Started
-
Jigoshop Settings
-
Creating Products
-
Using Jigoshop
-
Customize Jigoshop
-
Testings - in case of problems on Jigoshop web site
-
FAQ - Jigoshop plugin user questions
- Add a new tab to a product page / Custom tabs on product pages?
- Adding a Continue Shopping button to the single product page
- Adding Product Category Terms in a dropdown box for Custom Post Meta
- Add Alternate text on product picture and title
- Adding buttons / info to the end of each product
- View all (171 more)
-
FAQ - Jigoshop extensions user questions
-
API
-
Screencasts