News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

VM2.0.16 - warning when purchasing zero-priced product

Started by SamF, December 21, 2012, 18:25:21 PM

Previous topic - Next topic

SamF

Hello,

J2.5.8 + VM2.0.16

After confirming purchase with cart total = 0 (all products with zero price), the following warning appears at "Thank you..." page:

Warning:  Invalid argument supplied for foreach() in .../administrator/components/com_virtuemart/models/orders.php
on line 935

Regards,

Milbo

Unbelievable guys, what for ideas you have.
added line 934

if(!isset($_cart->pricesUnformatted[$key][$calculation_kind])) continue;


added in vm2.1
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

SamF

Quote from: Milbo on December 21, 2012, 18:44:26 PM
Unbelievable guys, what for ideas you have.
added line 934

if(!isset($_cart->pricesUnformatted[$key][$calculation_kind])) continue;

added in vm2.1

Thank you, can't wait for 2.1.

The idea is easy: giving something for free (let's say, free downloads) to VM shoppers, without setting separate "download" extensions. Nothing, but Virtuemart!))

delliott

#3
I can see this fix is in virtuemart 2.0.20b but trying to checkout with a zero-priced total still does not work.  What I am seeing on Joomla 2.5.10 and VM 2.0.20b is that no emails are sent and the cart is NOT emptying out.  Basically the confirmation of the order is not getting set.  I need a fix for this asap.  Please reply.

Also just noted that you cannot delete the order from the backend even after you have manually confirmed it.  Something is seriously wrong in this section of code.

One more issue, manual confirmation also causes a problem with email subject lines.  "COM_VIRTUEMART_MAIL_SUBJ_VENDOR_" is what shows in emails sent about products that are zero-priced.  I've tested sales of products with prices and everything works ok there.