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:

  1. 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.

  2. 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.

  3. 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).

  4. 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