No announcement yet.

Linking directly to product options?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Linking directly to product options?

    I have a number of products with multiple options. Is there a way via URL to load a product page with an option other than the default selected?

    Example: Product A has 2 options: X and Y. X is the default. Is there any way to load the page for Product A and have product Y selected?

  • #2
    you could hashtag your option in the link

    With this identifier, on page load you could search for window.location.hash (it would return option2 in this case) in javascript. If it exists, run a function to select the option specified depending on how your options are set up.


    on a simpler note.. you can set which options are chosen by default on page.. even if they aren't the first ones in line, but it sounds like you might be trying to do something conditional - in which case this second approach wouldn't work.


    • #3
      Thanks for the reply! Do you have any ideas what I should be using for the actual hashtag value? I'm trying the option "Code" from advanced options, and also the "Part #" from the main Options window and neither works...

      Edit: Nevermind, I apparently misread what you wrote. I think I got it now, thanks! Will give it a shot.