Personalized checkout and custom promotions with Shopify Scripts
Hello fellow developers. I am currently implementing a feature for my shopify store, in order to redirect users to the proper URL including locale based on current country (javascript). To achieve that, I will need to redirect users coming from Austria to the German locale (DE) since both countries speak German. For testing the feature, I will need to change the request country in my browser. So far I tried to change browser's location using Sensors as described here https://nordvpn.com/blog/change-location-google-chrome/#:~:text=Choosing%20custom%20locations%20in%2... but Shopify doesn't allow me to set the request location. I looked it up and it seems that the only way is by changing request's HTTP headers as shown below:
Access-Control-Allow-Credentials: true Access-Control-Allow-Origin: ${origin_domain}
I already found this link https://shopify.dev/changelog/storefront-api-allows-for-cross-origin-resource-sharing although not sure if I can use it somehow for my case.
Does anyone knows if there is a way to change HTTP headers in Shopify?
Thank you in advance
Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024The Hydrogen Visual Editor is now available to merchants in Shopify Editions | Summer '...
By JasonH Sep 2, 2024Note: Customizing your CSS requires some familiarity with CSS and HTML. Before you cust...
By JasonH Aug 12, 2024