Altering the quantity widget
I created a shop for a bakery.
There is a producttype 'pies'. Here users must be able to choose between a quantity of 4, 6, 8, 10 and 12 persons.
The price in backend is entered a piece and in frontend price must be calculated upon this.
So basically i need three functions:
- display prices for above quantities
- the quantity widget must be a selectlist of these quantities so users don't get confused
- the text of the calculated currency must have a finishing line 'per person'
I'm novice in drupal so i don't have any programming language experience.
I did some prospection and fell onto the commerce table price widget but needs further customisation.
Please advise!
Thanks!
Comments
Make separate products
I *think* what you want is 5 separate products, for 4, 6 8, 10, and 12 people. Then display them all on the same Product Display node. Note that your product display node must have a multivalue "product" field, so you can select all 5 of these to be displayed by the one product display node.
So:
Yes, but what if we have a large quantity?
This is a good suggestion, and we already thought about that, but this is a last option due to massive work pressure.
Better would be if the quantity field could be set with multiple values per product type and that this could be displayed as a 'select list'.
In this way, prices would be autocalculated upon fixed (read: set) quantities.
Can this be implemented?
images representing the products
When you use the multivalue "product" field you get a dropdown menu to chose the different products 4,6,8,10 and 12 people.
I you want to replace the dropdown menu by images representing the number of peoples, how would you do that ?
Commerce price table
Does the Commerce price table module provide what you need?