News:

Looking for documentation? Take a look on our wiki

Main Menu

[solved] 2 errors after updating to VM 2.6.6

Started by chaldama, August 06, 2014, 01:13:59 AM

Previous topic - Next topic

chaldama

Updating to VM 2.6.6, which I have done before on many other webshops without problems, caused a big problem on one of my sites.

The cart/checkout is not working anymore, instead I get 2 errors:
vmError: Cart variant was not found and no fallback found
Error the quantity of the product for calculation is 0, please notify the shopowner, the product id 0

I have now set the shop offline, if anyone wants to help me out I can give you inlog information.

chaldama

Ok, since it was a live website I had no other choice then to restore a backup using an older version of VM 2.

Unfortunately, I now experience the problem again with another website. I have made a  copy of this website and placed it here to work on it. After updating Joomla, extensions (JCE Editor, XMap, etc) and Virtuemart, exactly the same error comes up when you place something in the cart "Error the quantity of the product for calculation is 0, please notify the shopowner, the product id 0".
The new version of the website where the error shows up can be seen here.

This is really driving me mad, any help is greatly appreciated!

GJC Web Design

#2
the error is raised in the calculationh.php (prices script) ~ line 655
it is

if (empty($product->quantity) || empty($product->virtuemart_product_id)) {
            JError::raiseWarning(710, 'Error the quantity of the product for calculation is 0, please notify the shopowner, the product id ' . $product->virtuemart_product_id);
            continue;
         }

basically it's saying either the product quantity in the cart is 0 or the product id is missing

it says prod id is 0  - have you a product with an id of 0?

cart variant error is a missing variant


check your products

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

chaldama

Thank you for looking into it.

In the shop which I now discarded and placed back a back-up with an older VM version I noticed that not all products had a SKU. I had hoped that this would be the solution but after adding SKU's to all products the error remained. This shop has 132 products, I will discuss with the owner if she wants to add SKU's manually.

GJC Web Design

Hmm - sku are not enforced in VM2 -
the errors are something to do with product ids
have a look thru your product tables and see if one has a id of 0 or something strange
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

chaldama

Just checked in PhPMyAdmin. The product IDs variy from 169 till 308 but I see nothing strange in the table. There is no product with an ID 0

GJC Web Design

was just an idea - but you see where the error is thrown - so it will need some debugging on your side -

unpublish blocks of products etc till u find it .. there is no simple solution..
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

chaldama

Really appreciate your help!

Even after unpublishing all products and adding a new test product the error is still there.
In my opinion something has changed in the VM update which causes the conflict, since prior to updating there was no problem.

GJC Web Design

but the problem is 2.6.6 has been out for a while now - all my sites are on it - and afaik  - this error has never been reported

what happens on your duff site if you just comment out the error ? does the checkout work or is it blocked?
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

chaldama

Yes, you're right. I have many other webshops which run om 2.6.6 without the problem.

How do I comment out the error?

GJC Web Design

this isn't a fix - it is to experiment -
you need to do some digging by echoing out stuff etc to see what is wrong

the error is raised in the calculationh.php (prices script) ~ line 655
comment out

/*
if (empty($product->quantity) || empty($product->virtuemart_product_id)) {
            JError::raiseWarning(710, 'Error the quantity of the product for calculation is 0, please notify the shopowner, the product id ' . $product->virtuemart_product_id);
            continue;
         }
*/
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

chaldama

Ok, just tried that. The error does not show, but the cart isn't filled.

GJC Web Design

Sorry - it is impossible to debug your install by remote - you've proven that it is only one install that is the problem - that is your starting point...
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

chaldama

I am really happy with your support.
If you would like to have backend access and/or FTP I would be more than happy to give you access.

This is the second site where I encounter the problem. The first site was a live website so I just restored a backup where the old version of VM was still in use.

GJC Web Design

I will need paying of course for 1 to 1 support - email me if that is what you meant....
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation