Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Require purchase in quantity increments? View modes: 
User avatar
Member
Member
matt-awg - 5/8/2013 12:53:39 PM
   
Require purchase in quantity increments?
Is there a way to require an item is purchased in certain quantity increments? For example, if it was set to 5 for an item, you could only add 5, 10, or other multiples of five to your cart of this item, and if you try to enter 3 for example, it would automatically put 5 in your cart (and ideally display a message explaining why it did that)? I did some searching and I don't see anything like this so I have a feeling I am in for another painful customization, but I was hoping there is something built in that I am just missing. And if this requires customization, is there an infoProvider I could override method(s) in to make this work and if so, which provider and which method(s)?

Thanks,
Matt

User avatar
Certified Developer v7
Certified  Developer v7
Gitesh - 5/8/2013 8:05:29 PM
   
RE:Require purchase in quantity increments?
Hi Matt,

Most simple solution would be to handle it via jquery. Create a field on backend called Product Multiples and then enter an amount (example : 5).

Show that field as hidden on the frontend. Use jquery to get that field and check the value in add to cart items box.

Cheers
Gitesh Shah

User avatar
Member
Member
matt-awg - 5/13/2013 9:58:46 AM
   
RE:Require purchase in quantity increments?
For anyone curious, this is related to an issue I was having with Minimum Quantity, which I just posted my solution to here:

http://devnet.kentico.com/Forums/f65/t37017/Does-Min-items-in-one-order-work-as-expected.aspx

Basically I did the same thing to solve this quantity increment problem. In the custom ShoppingCartInfoProvider I override the add and update cart item methods to force the cart quantity to meet both the min qty requirements and the quantity increment requirements.

Thanks for the suggestion though Gitesh!

-Matt

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 5/16/2013 4:58:22 AM
   
RE:Require purchase in quantity increments?
Hi Matt,

Thanks for sharing... really simple solution!

Best regards,
Martin Danko