![]() |
Changing quantity on the fly
This cant be too difficult I am sure all I need is an element id.
I need to change the product quantity using the validation script, my customers need to order products in a bank (h x w), that's easy just by adding the options, then using validation I want to change the quantity for example 3h x 4w = 12 units so I need to change the quantity to 12. using xcart 4.66 , |
Re: Changing quantity on the fly
Ive done this now with the following
Code:
var value = parseInt(product_option_value("MUH")); the problem with this is it only changes the quantity when the add to cart button is pressed thus calling the checkoptions routine, can I call the routine when either of the dropdowns are changed and if so how and where should I put the code.:mad: |
Re: Changing quantity on the fly
You should add the routine as a function and then use the "onchange" event to call it every time the dropboxes change.
If your sites uses jQuery you can add the handler to the dropboxes with this: https://api.jquery.com/change/ |
All times are GMT -8. The time now is 05:24 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.