Jump to content

Configurable Option Custom Link?


Recommended Posts

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

0909Capture.PNG

Link to comment
Share on other sites

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>

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

0909Capture.PNG

Now on with Magento custom options or configurable product along with its associated products can be easily accomplished.

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