Jump to content

Addons with matching quantity


snake

Recommended Posts

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 ?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated