VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product pricing => Topic started by: Alkhamsa on August 19, 2020, 19:17:26 PM

Title: Product with 0.0 price does not show Add to Cart
Post by: Alkhamsa on August 19, 2020, 19:17:26 PM
VirtueMart 3.8.4

I created a product with a price of 0.0 (free) but the product display does not show add to cart.  How do I fix this?
Title: Re: Product with 0.0 price does not show Add to Cart
Post by: Jörgen on August 19, 2020, 19:25:03 PM
Set Price to 0,0001
Jörgen @ Kreativ Fotografi
Title: Re: Product with 0.0 price does not show Add to Cart
Post by: Alkhamsa on August 19, 2020, 23:02:44 PM
Thank you so much!  That was the ticket!  Do you mind explaining why that works and/or where it is documented?
Title: Re: Product with 0.0 price does not show Add to Cart
Post by: GJC Web Design on August 19, 2020, 23:30:53 PM
It works because prices are stored to 6 decimal places and rounded for display..

If the real price is 0.000000 then the add to cart will not show
Title: Re: Product with 0.0 price does not show Add to Cart
Post by: Jörgen on August 20, 2020, 00:17:33 AM
Glad to be of help  :)

As GJC said the rounding makes it look zero but in fact it is non zero. Selling very large quantities will eventually show a non zero result in the checkout. But use it wisely and it will help You  8)

Jörgen
Title: Re: Product with 0.0 price does not show Add to Cart
Post by: Alkhamsa on August 20, 2020, 01:51:47 AM
Thanks for the explanation.