Personalized checkout and custom promotions with Shopify Scripts
Hello,
I implemented the solution from the provided documentation to apply automatic discount codes for segmented customers upon sign-in. I understand that Shopify's native functionality applies automatic discounts universally, not for segmented customers.
While the documentation's code works as intended, an issue arises when customers sign into their accounts via the checkout page. In this scenario, the discount does not automatically apply.
Most customers tend to sign in at checkout rather than earlier in their journey. To apply the discount, they currently need to navigate back to the homepage and return to the checkout page, which creates a poor user experience and appears glitchy. Is there a way to modify this code so that the automatic discount works seamlessly, even when the customer signs in directly at the checkout page?
I have recorded a screen capture to demonstrate the issue:
Website URL: https://truenorthshop.com/
Thank you for your assistance!
Hi Sgomez,
The issue here is that the JavaScript-based discount application workaround has significant limitations that aren't often discussed. While it's a popular approach, Shopify doesn’t allow for custom code at checkout unless you’re on Shopify Plus and using a Checkout UI extension—not just a simple fetch('/discount/CODE') snippet. This means that the code snippet from the article won't be triggered at checkout. This limitation often creates a frustrating user experience, as you've described.
Instead of spending time on this workaround, consider using an actual automatic discount solution designed for specific customers. Our app, Regios Discounts (4.9 stars, 70 reviews, Built for Shopify), solves this seamlessly.
While we can't directly use Shopify segments due to Shopify Functions API limitations, our app supports customer tags, metafields, order count, location, and more. You can use Shopify Flow to tag customers automatically based on specific criteria, and our app will apply the discount seamlessly in the cart and checkout—even when customers sign in at checkout.
Here’s an example of how you can set this up:
This setup shows how to create an automatic discount for customers with a specific tag.
Let me know if you’d like further guidance, and I’d be happy to help!
Best,
Tobe Osakwe
Thank you for you reply.
I understand where you coming from but paying $100/mo for this small functionality is very expensive...
Since I only need this 1 feature I'm looking for a custom code solution that wouldn't require me to pay for Shopify Plus or a pricey app.
Let me know if you can help me out with this.
Just to clarify, our $99/mo plan applies only if you’re applying discounts to over 1000 orders per month through our app, which would be quite fair considering the sales volume enabled by our app in that case. For lower volumes, our plans start at $29.99/mo or $49.99/mo without taking a percentage of your sales.
Cheers, Tobe
Hello,
Our app Stack Discounts Ninja also provides automatic discounts based on specific customer tags.
For basic requirements you need, after installation, enable the app.
Then you need to create an Automatic Campaign, and select customer tags:
Add one or more discounts under this campaign.
We’re not sure if our pricing suits you, but feel free to check it out and decide!
Thanks.
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024