DaCrazyKiwi Posted July 19, 2021 Share Posted July 19, 2021 Hey so is there a way to get a custom link for each configurable option for example i got a dropdown for RAM and option are 1gb 2gb 3gb is there a way to get a link so when they go to it the 3GB is allready selected and then another link for 2GB selected so i can add the link to a custom page ill attach a picture for kind of refrence on what im trying to do 0 Quote Link to comment Share on other sites More sharing options...
HostingMe Posted July 19, 2021 Share Posted July 19, 2021 Yes this can be done. WHMCS have documentation on how to do this: https://docs.whmcs.com/Linking_to_WHMCS What you would need to do is use your browsers developer tools to see the raw html so you can get the config number and the option value. Once you have these you can append &configoption[1]=100 to the end of your products URL. For example: If the HTML looked liked what is below and you wanted CentOS 7 to be pre-selected when added to cart, the config number would be 75 and the option value would be 881. The code you would add to the URL would look like: &configoption[75]=881 Full URL: https://yourdomain/cart.php?a=add&pid=70&configoption[75]=881 <select name="configoption[75]" id="inputConfigOption75" class="form-control"> <option value="879" selected="selected"> CentOS 6 x64 </option> <option value="880"> CentOS 6 i386 </option> <option value="881"> CentOS 7 x64 </option> </select> 0 Quote Link to comment Share on other sites More sharing options...
DaCrazyKiwi Posted July 19, 2021 Author Share Posted July 19, 2021 1 hour ago, HostingMe said: Yes this can be done. WHMCS have documentation on how to do this: https://docs.whmcs.com/Linking_to_WHMCS What you would need to do is use your browsers developer tools to see the raw html so you can get the config number and the option value. Once you have these you can append &configoption[1]=100 to the end of your products URL. For example: If the HTML looked liked what is below and you wanted CentOS 7 to be pre-selected when added to cart, the config number would be 75 and the option value would be 881. The code you would add to the URL would look like: &configoption[75]=881 Full URL: https://yourdomain/cart.php?a=add&pid=70&configoption[75]=881 <select name="configoption[75]" id="inputConfigOption75" class="form-control"> <option value="879" selected="selected"> CentOS 6 x64 </option> <option value="880"> CentOS 6 i386 </option> <option value="881"> CentOS 7 x64 </option> </select> Hey cheers for the help got it all working now 0 Quote Link to comment Share on other sites More sharing options...
jakobeadonis Posted July 21, 2021 Share Posted July 21, 2021 On 7/19/2021 at 5:44 AM, DaCrazyKiwi said: Hey so is there a way to get a custom link for each configurable option for example i got a dropdown for RAM and option are 1gb 2gb 3gb is there a way to get a link so when they go to it the 3GB is allready selected and then another link for 2GB selected so i can add the link to a custom page ill attach a picture for kind of refrence on what im trying to do myprepaidcenter Now on with Magento custom options or configurable product along with its associated products can be easily accomplished. 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.