SeanP Posted January 20, 2021 Share Posted January 20, 2021 I have a particular configurable option for a product that I need to force selection of, based on the selections made of the other configurable options. ------------------------------ Example: Option 1: A (selected) Option 2: B (selected) Option 3: C (selected) Forced Option 4: ABC (force selected) Changing the options: Option 1: B (selected) Option 2: C (selected) Option 3: A (selected) Forced Option 4: BCA (force selected) ------------------------------ I know the Order Summary is updating on the fly when selecting product options, and I'm wanting to dynamically have it select the proper option on the forced configurable option so the order summary looks correct. Also, the one configurable option I want to force is hidden on the form, the others you select are not. I'm not sure if that will make a difference in trying to force it. 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted January 21, 2021 Share Posted January 21, 2021 For on the fly forcing you would need javascript injected via a output hook or overriding an existing variable. For example, using ShoppingCartCheckoutOutput and injecting jquery to watch for configuration field change: $('#inputConfigOption10').change(function() { $('#inputConfigOption11').value('10'); }); You'll need to get the config option field ID (the 10 and 11) from the service's configurable options array and use that instead of the hard coded number. Also, the jquery to change the value would be different for drop down menus and maybe sliders. Using the shopping cart checkout validation to confirm those configurable options are set as they should be should also be done. 0 Quote Link to comment Share on other sites More sharing options...
SeanP Posted January 22, 2021 Author Share Posted January 22, 2021 22 hours ago, steven99 said: For on the fly forcing you would need javascript injected via a output hook or overriding an existing variable. For example, using ShoppingCartCheckoutOutput and injecting jquery to watch for configuration field change: $('#inputConfigOption10').change(function() { $('#inputConfigOption11').value('10'); }); You'll need to get the config option field ID (the 10 and 11) from the service's configurable options array and use that instead of the hard coded number. Also, the jquery to change the value would be different for drop down menus and maybe sliders. Using the shopping cart checkout validation to confirm those configurable options are set as they should be should also be done. Thanks for the reply. I figured it would probably have to be done in javascript. I need to see if it is possible based on my current configurable options. I appreciate the help. 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.