| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Changing quantity on the fly | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
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 ,
__________________
v4.6.6 |
|||||||
#2
|
|||||||
|
|||||||
Re: Changing quantity on the fly
Ive done this now with the following
Code:
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.
__________________
v4.6.6 |
|||||||
#3
|
|||||||||
|
|||||||||
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/
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
|
|||
X-Cart forums © 2001-2020
|