ivangoti Posted November 30, 2011 Share Posted November 30, 2011 I hope someone can guide me or tell me which code I should modify. My shop sells products by units, and also boxes of 6 units and boxes of 12. Therefore I created the products and then I added for each product combinations for 1 unit, 6 units and 12 units. Each one of them with minimum quantity of 1, 6 and 12 respectively. I want that if someone, for example, add to the cart a box of 6 (6 units), that in attempting to increase the quantity, it does not increase by one but by 6. This means that if I try to increase the amount instead of moving into 7, it would move into 12. Same for the case of 12. Another alternative would be that if a box of 6 units is added to the cart, if you increase the quantity, it would move into 7 units, charging the price for a box of 6 plus the price of a single unit (the unit is cheaper the more units you have in the box). And while increasing the quantity one by one, when this move into 12, the price of the box of 12 would be charged (not the price of a box of 6 and 6 single units). Link to comment Share on other sites More sharing options...
Carolina Custom Designs Posted December 1, 2011 Share Posted December 1, 2011 That made my brain hurt just reading it I believe you can accomplish this by using attributes. You will need to set up attributes according to the number of units you want to sell and increase the price accordingly. Then just add the combinations to the product. Hope that helps! Marty Shue Link to comment Share on other sites More sharing options...
tomerg3 Posted December 6, 2011 Share Posted December 6, 2011 Attributes would be a pretty "Dirty" solution for this, as you add an unnecessary feature to your products. The "Cleaner" solution would be to modify (override) the Cart->updateQty() function and force the quantity to behave the way you want. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now