There is a bug in the stockable variants plugin where the additional charge is doubled at the checkout.
eg.
Base price: 10.00
Additional charge: 1.50
Product page: 11.50
BUT, Checkout: 13.00!!
I think the problem is that the plgVmOnAddToCart() function in the stockable variant plugin is adding the additional charge to the product in the cart. The additional charge is then recalculated at the checkout.
The fix is simply to stop plgVmOnAddToCart() from adding the additional charge. I've commented out the line below:
if (!empty($productCustomsPrice->custom_price)) {
//TODO adding % and more We should use here $this->interpreteMathOp
// $product->product_price +=(float)$productCustomsPrice->custom_price;
}
Can anyone think of a reason why this is not a good fix? Is there a reason why the stored cart needs to store the base price plus the additional charge?
OpenGlobal
Hey OpenGlobal,
I have the same problem.
You didn't mention, in which file to make the fix ?
Thank you
Sorry. There's only one file, but that's not obvious if you haven't been delving into it :-)
/plugins/vmcustom/stockable/stockable.php
OpenGlobal
Thanks openglobal,
Are you facing any problems after this fix ?
I'm not seeing any issues at all, but I'm not very familiar with the workings of the cart code so I'm not 100% confident in it.
OpenGlobal
Tested and working great until now..
I'll test it better and i'll post if i find any issues.
Thanks for this!
What version of Joomla and VM are you using?
Can you make some screenshots of your configuration and the results.
OpenGlobal
Can you give some screenshots of the configuration for this product too.
OpenGlobal
Those screenshots aren't for a stockable cart variant, they're for a normal cart variant.
OpenGlobal
No, you are just using "cart variants". This thread is about "Stockable cart variants" They are different types of custom field and are not related.
OpenGlobal
http://forum.virtuemart.net/index.php?topic=98140.0
strange here it is the opposite, right in the cart, but wrong in the productdetail