2

I'm trying to get url with already selected options.

If I have only one options, code is working fine adding #{attribute_id}={attribute_value} after url.

https://nyhomedecor.com/cordless-dual-sided-led-lighted-vanity-mirror-1x-5x-or-1x-10x.html#159=28

This code is not working when I have more than one option.

https://nyhomedecor.com/surround-lighttm-wall-mount-mirror-5x-or-7x.html#155=21&163=115&159=32

Any idea how can I make this work?

2
  • Curious to see... might need a javascript solution for this.
    – Joshua34
    Commented Feb 21, 2017 at 21:45
  • have you get any solution for this issue?
    – Indian
    Commented May 3, 2019 at 10:42

1 Answer 1

-1

You can try the code like this.

https://nyhomedecor.com/surround-lighttm-wall-mount-mirror-5x-or-7x.html?155=21&163=115&159=32

In your URL, need to replace # with ?.

4
  • is that working for you, when you access this url the options are selected? for me it's not. Commented Feb 22, 2017 at 13:51
  • If you are talking about the auto select in drodown that show on that page, then you need to some code to make it working, because that is custom option of product. Commented Feb 23, 2017 at 6:22
  • It's not custom option. There are options based on attributes. If you check the first url, you'll see it's working when I have only one option. But it's not working when I have two or more. Commented Feb 25, 2017 at 2:29
  • you need to do custom code to auto select from URL value when attribute is render. Commented Feb 25, 2017 at 3:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.