snake Posted July 22, 2015 Share Posted July 22, 2015 We have a product which we need to allow multiple QTY with the product itself as well as the addons, but the quantities of both need to match. I don't want to use the "allow multiple items" checkbox, as this just adds the product x times. Whereas I want want 1 product x 10, so need to use configurable options. There are numerous addons to the product, but the QTY of the addons needs to match the QTY of the product, so if they choose 10 x product, all the addons also need to be x 10 Is this possible ? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 22, 2015 Share Posted July 22, 2015 are using sliders or quantity boxes? also, which version - v5.3 or 6 ?? 0 Quote Link to comment Share on other sites More sharing options...
snake Posted July 22, 2015 Author Share Posted July 22, 2015 are using sliders or quantity boxes? also, which version - v5.3 or 6 ?? I can use either or, it makes no difference. I am on 5.3 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 23, 2015 Share Posted July 23, 2015 I can use either or, it makes no difference. I am on 5.3 it might make some difference as a solution for v5.3 may not necessarily work in v6! just so that i've got this clear, are you suggesting that you want the customer to use one configurable option to choose the quantity of the product, and other configurable option(s) for the addons? e.g as a basic example - if the customer orders 10 pencils (the product), then they must order 10 rulers (the addon) too? I haven't tested this in WHMCS, but I would assume if you were using quantity boxes, you could just use a bit of javascript to compare two (or more) form fields - only when they all match will the submit button work and the order process can continue... if you were using sliders, then it is possible to link them together, e.g moving one slider will move multiple sliders at the same time - certainly, i've previously written code (last September for v5.3 - works in v6) that linked two configurable option sliders together... sliding together is the easy part, the real pain is integrating it with the pricing! I filed it away as "interesting, but needs more work" - when I get the time, i'll take another look at that code as I think it has potential. but if it were me, i'd probably go with quantity boxes for now and use js to check for matches. 0 Quote Link to comment Share on other sites More sharing options...
snake Posted July 23, 2015 Author Share Posted July 23, 2015 yes that is basically it. I don't want the user to select the QTY for the addons, as this needs to be fixed. This is for software licenses, with optional addons, so if you purchase 10 x licenses, then if you select any of the addons, they need to default to 10 x as well and the user shouldn't be able to change that qty. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 23, 2015 Share Posted July 23, 2015 perhaps another method, maybe slightly neater, would be to auto-fill some of/all the other quantity boxes with the value entered into the licenses quantity box - again that would use javascript... then the next step could be to disable any qty boxes that need to match the licences number... that would give the user less boxes to fill, means they couldn't edit these values and remove the need to match the box values. I haven't tried it, but I think it should work. 0 Quote Link to comment Share on other sites More sharing options...
snake Posted July 24, 2015 Author Share Posted July 24, 2015 ok, but where would I put this Javascript to do this ? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 24, 2015 Share Posted July 24, 2015 in configureproduct.tpl - either as a call to a separate .js file, or in the template itself 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.