I have a form that calculates the quantity (sq m.) a customer needs according to the dimensions he inputs. I want to show him the total price for the quantity and place the quantity and dimensions (as other info) in the cart without requiring the customer to reinput them. Any ideas how I might do this?
Announcement
Collapse
No announcement yet.
Automate quantity and other info
Collapse
X
-
Add Q_<actinic:variable name="ProductID" /> to the Quantity field tag.
Add O_<actinic:variable name="ProductID" /> to the Other info tag.
In your JavaScript (assuming it's part of the product layout) use
Code:document.getElementById('Q_' + <actinic:variable name="ProductID" />).value = myquantity;
Code:document.getElementById('O_' + <actinic:variable name="ProductID" />).value = myotherinfo;
Note that this will not stop the customer altering these values in the shopping cart.
If you want a cleaner solution, I have an add-on "Sell by Area or Length" that's designed for such scenarios. It allows you to set a price per square metre (or cm, inch, etc) and set minimum/maximum allowed widths and lengths.
See http://www.drillpine.biz/v10-made-to...o_measure.html for a demo.Norman - www.drillpine.biz
Edinburgh, U K / Bitez, Turkey
Comment
-
Thanks, Norman. So far so good The quantity is definitely being updated on the product page but I can't get it passed to the 'Add to cart confirmation page'. (Quantity is not shown on product page - it would not be practical to change it for the whole site)
I could be interested in your add-on and would appreciate further details (couldn't find it on drillpine) but our accounting package requires that quantity = no. of sq m.
Comment
-
Without a link to a live page, no-one can see what's happening. At a guess, you should make sure that the product is in a Section with a Shopping Mode of Quantity on Product Page. That's needed if you want to get the quantity you see alongside the product into the cart.
You can email me via the link in my name to the left of this message.Norman - www.drillpine.biz
Edinburgh, U K / Bitez, Turkey
Comment
Comment