I am trying to create a Shopify dropdown menu next to the login icon in the debut theme. By default the currency switcher dropdown just converts the prices into the currency you selected, but I would like it to redirect to another store url (where the currency is the choosen one)
My code down below isn't working properly and is always redirecting me to the same site as soon as i click the dropdown, so I don't even get to choose a option from the dropdown. When I replace the onclick with onsubmit the page just reloads and nothing happens.
Any ideas what I could do? Every tip is appreciated.
Here is the code:
{% form 'currency'%}
<select name="URL" onclick="window.location.href= this.form.URL.options[this.form.URL.selectedIndex].value">
<option selected value>EUR</option>
<option value="https://www.discover.snow-pearl.com/">CHF</option>
</select>
{% endform %}
so your edited code is
{% form 'currency'%}
<select name="URL" onchange="window.location.href= this.form.URL.options[this.form.URL.selectedIndex].value">
<option selected value>EUR</option>
<option value="https://www.discover.snow-pearl.com/">CHF</option>
</select>
{% endform %}