Custom logic for shopping cart: Ordering in multiples?

Posted by Community Admin on 05-Aug-2018 16:37

Custom logic for shopping cart: Ordering in multiples?

All Replies

Posted by Community Admin on 20-Dec-2012 00:00

Hello to all. This is my first time posting here.  We are using Sitefinity to implement an ecommerce site and we have a requirement that seems to be very custom.  

We have items in the catalog that have a minimum order, say 6 of each in order to ship.  Is there any way to force customers to order a minimum of 6 and also limiting them to order in multiples of 6?  I don't want a customer to order 7 pieces of a product number.  One way would be to modify the product database and bundle the item in groups of 6.  I am trying to figure out if anybody out there has found another solution to this?

Thanks in advance for your input.


Hector

Posted by Community Admin on 24-Dec-2012 00:00

Hello,

The options that I see is adding default value for the Quantity and validator to it with a buttons that add or remove only by 6 items to the shopping cart.

You can override AddToCartWidget control. Inside its InitializeControls method you can set the default value to 6

this.QuantityControl.Text = "6";

Then you need to implement the validator and the buttons that will change the text of the QuantityControl with 6 items. You can avoid implementing the validator by disabling the text editing of  QuantityControl, so it will be updated only with buttons that will add/remove 6 items per click.

Kind regards,
Ivan Dimitrov
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed