Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

PROBLEM WITH CART BUTTON USING MULTILANGUAGE APP

PROBLEM WITH CART BUTTON USING MULTILANGUAGE APP

edelfc44
Shopify Partner
3 0 0

The problem is that if I go to my cart while I'm on site.com/de, it goes to site.com/cart instead of site.com/de/cart. I want the de, en, fr or whatever the language selected to stay as is.


I want to change the url for the Go to Cart button on my minicart
From site.com/cart to site.com/en/cart if English is the current language selected.

Replies 2 (2)

PaulNewton
Shopify Partner
7746 679 1611

Hi @edelfc44 clarify:

  1. is it when you enter the url site.com/de you are redirected to site.com/cart
  2. Or there is a button that you click that goes to site.com/cart even when your url is site.com/de?

If #2 the button code needs to be localized to use Locale-aware urls:

https://shopify.dev/themes/internationalization/multiple-currencies-languages#locale-aware-urls 

 

 

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org


edelfc44
Shopify Partner
3 0 0
Do you know if there's a short code that I can put inside the href tag?
Something like {{ request.locale.iso_code }}