Author Topic: [solved] 2 errors after updating to VM 2.6.6  (Read 6394 times)

chaldama

  • Jr. Member
  • **
  • Posts: 78
    • Joomla Website Designer
[solved] 2 errors after updating to VM 2.6.6
« on: August 06, 2014, 01:13:59 am »
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

  • Jr. Member
  • **
  • Posts: 78
    • Joomla Website Designer
Re: 2 errors after updating to VM 2.6.6
« Reply #1 on: August 11, 2014, 00:22:52 am »
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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10508
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: 2 errors after updating to VM 2.6.6
« Reply #2 on: August 11, 2014, 00:31:42 am »
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 http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

chaldama

  • Jr. Member
  • **
  • Posts: 78
    • Joomla Website Designer
Re: 2 errors after updating to VM 2.6.6
« Reply #3 on: August 11, 2014, 11:43:48 am »
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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10508
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: 2 errors after updating to VM 2.6.6
« Reply #4 on: August 11, 2014, 12:27:45 pm »
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 http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

chaldama

  • Jr. Member
  • **
  • Posts: 78
    • Joomla Website Designer
Re: 2 errors after updating to VM 2.6.6
« Reply #5 on: August 11, 2014, 12:48:49 pm »
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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10508
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: 2 errors after updating to VM 2.6.6
« Reply #6 on: August 11, 2014, 13:10:41 pm »
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 http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

chaldama

  • Jr. Member
  • **
  • Posts: 78
    • Joomla Website Designer
Re: 2 errors after updating to VM 2.6.6
« Reply #7 on: August 11, 2014, 13:28:58 pm »
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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10508
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: 2 errors after updating to VM 2.6.6
« Reply #8 on: August 11, 2014, 13:50:23 pm »
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 http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

chaldama

  • Jr. Member
  • **
  • Posts: 78
    • Joomla Website Designer
Re: 2 errors after updating to VM 2.6.6
« Reply #9 on: August 11, 2014, 13:54:13 pm »
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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10508
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: 2 errors after updating to VM 2.6.6
« Reply #10 on: August 11, 2014, 14:47:21 pm »
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 http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

chaldama

  • Jr. Member
  • **
  • Posts: 78
    • Joomla Website Designer
Re: 2 errors after updating to VM 2.6.6
« Reply #11 on: August 11, 2014, 16:39:18 pm »
Ok, just tried that. The error does not show, but the cart isn't filled.

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10508
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: 2 errors after updating to VM 2.6.6
« Reply #12 on: August 11, 2014, 16:41:38 pm »
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 http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

chaldama

  • Jr. Member
  • **
  • Posts: 78
    • Joomla Website Designer
Re: 2 errors after updating to VM 2.6.6
« Reply #13 on: August 11, 2014, 16:45:15 pm »
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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10508
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: 2 errors after updating to VM 2.6.6
« Reply #14 on: August 11, 2014, 17:37:14 pm »
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 http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation