VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product pricing => Topic started by: Picklehead on January 10, 2023, 15:53:14 PM

Title: Purchase Quantity Steps not rounding as expected
Post by: Picklehead on January 10, 2023, 15:53:14 PM
Hi,
I have products that can only be ordered in quantities of 6 so I have set 6 in Purchase Quantity Steps for these products.

However on the product details page if I enter a quantity of 7, the quantity is rounded down to 6 and not up to 12. (Presume standard rounding rules are applied)

Is there a way I can force Purchase Quantity Steps to round up?

Also

The update of the Quantity value to the Purchase Quantity Steps only appears to happen when the quantity box losses focus, where can this be changed?

Hopefully someone can point me in the right direction.

Thanks

Joomla! 3.10.11 and VirtueMart 3.8.7
Title: Re: Purchase Quantity Steps not rounding as expected
Post by: GJC Web Design on January 10, 2023, 16:53:47 PM
all done in components/com_virtuemart/assets/js/vmprices.js
Title: Re: Purchase Quantity Steps not rounding as expected
Post by: Picklehead on January 10, 2023, 17:00:08 PM
GJC thanks that's brilliant..

I'm getting there with Virtuemart slowly but surely!
Title: Re: Purchase Quantity Steps not rounding as expected
Post by: Picklehead on January 10, 2023, 17:04:43 PM
All fixed, many thanks GJC !!!!!
Title: Re: Purchase Quantity Steps not rounding as expected
Post by: GJC Web Design on January 10, 2023, 18:06:40 PM
remember u can over ride by /templates/YOUR_TEMPLATE/js/vmprices.js
Title: Re: Purchase Quantity Steps not rounding as expected
Post by: Picklehead on January 11, 2023, 18:45:28 PM
Quote from: GJC Web Design on January 10, 2023, 18:06:40 PM
remember u can over ride by /templates/YOUR_TEMPLATE/js/vmprices.js

Thanks and yes, I created an over ride file  ;)
Title: Re: Purchase Quantity Steps not rounding as expected
Post by: T.A. Garrison, LLC on June 12, 2023, 22:12:55 PM
@Picklehead - were you able to get the Quantity Discount to display the table in the products?!

I've been trying to ask for help since February and have never had a response. I've still got an open ticket and several messages that I've sent asking for someone to respond and nothing.

The plugin works to provide the discounts, but the user will never know the discounts because the table with the price breakdown does not appear in any product.

I'd appreciate "anybody" who can fix this since the only alternative requires adding each of the price breaks to each product manually - and we have literally thousands of products.