-
Notifications
You must be signed in to change notification settings - Fork 140
Description
Hello!
Thank you for this great theme, we appreciate all your work that went into it, and it's been working great for us.
Now we started working with Affiliate links but having a redirection problem.
Just quickly our setup:
- Your headless theme on Shopify (xxxxx.myshopify.com) .. actual products and store front on Wordpress site (ourshop.com) .. pulling only pricing and Shopify Buy Buttons via API into Wordpress store
- Shopify setup with Custom domain (checkout.ourshop.com) .... and the Shopify domain (xxxxx.myshopify.com) set as "redirecting" domain (to redirect to main domain "checkout.ourshop.com")
- Then your theme allowed us to set "Hostname" as "ourstore.com" ... and did exactly what we wanted, when someone is on the Checkout page and clicks the Logo or the "Continue Shopping" link, it brings them to "ourstore.com"
The Affiliate link problem:
- We use the Shopify App "UpPromote" and did the exact integration desrcibed here: (https://docs.uppromote.com/settings/integrations/others#third-party-integration)
- An Affiliate Link looks like this: "ourstore.com/shop/?affiliate_tracking-code..&utm_..tracking-codes"
The Intended Mechanism: - Affiliate Link lands on our Wordpress site "ourstore.com", from where it gets redirected to a specific UpPromote App Page we had to create: "xxxxx.myshopify.com/pages/affiliate-empty-page"
- The Link can then do it's thing on that /pages/affiliate-empty-page and then the App quickly redirects it to our actual Shop "ourshop.com"
What really happens:
- When the Affiliate Link goes back to Shopify (xxxxx.myshopify.com/page/affiliate-empty-page), it gets immediately redirected to our custom domain "ourshop.com" ... before the Affiliate script can even finish what it has to do on the /pages/affiliate-empty-page
Therefor it comes back to our Wordpress (ourstore.com) with a wrong URL and all the tracking parameters stripped from the URL
Question:
- How can we prevent just this one specific URL (/pages/affiliate-empty-page/) to Not get redirected to our Custom Domain or the "Hostname" indicated in your theme?
I tried changing the java in theme.liquid (I think around line 180) where it does the "if (currentHostname !== storefrontHostname {
var redirectUrl = window.location.href.replace(currentHostname, storefrontHostname);" ... didn't work ..
I tried entering different "Custom Redirects" in your Theme Settings ... also doesn't work.
And I also read somewhere that "{% layout none %}" could prevent redirects ... but the specific page in question (/pages/affiliate-empty-page) also already has the "{% layout none %}" but seems to no effect ... is that supposed to work?
Any help or tip in the right direction would be highly appreciated!
Kind Regards,
Wolf