Re: Apply automatic discount to tagged customers

Apply automatic discount to tagged customers

jjansen
Tourist
6 0 64

Our store has a member discount and frequently offers member discounts on special events.  Is there a way to tag certain customers as a member, then have an item automatically discounted? Discount codes distributed to members only frustrates them if they can't find/remember the code, and could also be passed to non-members or wind up on some on-line coupon list.

Replies 160 (160)

jondiego
Tourist
9 0 1

They limit the basic functionality so that you have to pay for Shopify Plus. Another great example is reporting... you have to pay more to get better reporting.... I mean seriously Shopify....

Mike5241
Explorer
60 0 13

Hi everyone,

The following tip worked like a charm for me in the Dawn theme:

https://www.linkedin.com/pulse/how-offer-automatic-discounts-specific-customers-shopify-dematis-tdr1...

 

I hope it helps,

Mike

i-Bead
Excursionist
13 0 5

Wow!  That's much prettier (and easier) than the code I posted over a year ago.  Going to have to try it on my next theme template update.  - Thanks!

Lawson_Thalmann
Shopify Partner
83 0 68

I need this feature.... From a POS Standpoint, it's a basic feature that simply needs to be offered in 2024. This shouldn't need an app/customization. It's things like this why I hesitate to recommend ShopifyPOS. 

hangaroutdoor
Visitor
2 0 0

This reddit post figured it out, for free, with 6 lines of code, and without needing to be on the Plus plan. I just added the code to the bottom of the main-cart.liquid file, works perfectly.

https://www.reddit.com/r/shopify/comments/16ljwss/automatic_discount_based_on_customer_segment/

 

Shopify will apply a discount code if the customer visits the URL "/discount/code-name". So, if the code is "SECRETCODE", if the customer goes to https://your-shop.com/discount/SECRETCODE then the code gets added to their cart. Now, the good bit is Shopify doesn't care if the customer manually goes to that URL or if the URL is called from JavaScript. So we can get JavaScript to visit that URL in the background when the cart page loads.

As an example, if you have a code SECRETCODE that you want to apply to all customers who have the tag MySegment, in your cart liquid file put

{% if customer.tags contains 'MySegment' %}
    <script>
        try { fetch( '/discount/SECRETCODE' ) }
        catch(e) {}
    </script>
{% endif %}

 

tobebuilds
Shopify Partner
558 42 151

This will only work if the customer is logged in by the time they visit the cart page.

 

If not, then when they visit the checkout page and enter their email, they will still have to enter the discount code manually, because you can't extend the checkout with custom code on a non-Plus plan.

 

In addition, that code snippet has no error handling, so if applying the discount via the AJAX API doesn't work for some reason, you won't know, and the customer will still have to manually enter the code at checkout.

 

 

Founder, Regios Discounts app (4.8 stars, 83 reviews, Built for Shopify)
- Custom discounts made simple
- "Just about any discount you'll ever need"
- Built by an ex-Google software engineer
- Often imitated, never duplicated
hangaroutdoor
Visitor
2 0 0

Poop, you're right

Ideation
Visitor
1 0 1

Hi All, 

 

I found this post on LinkedIn and was only posted recently, so relatively new. 

 

https://www.linkedin.com/pulse/how-offer-automatic-discounts-specific-customers-shopify-dematis-tdr1...

I'm going through the process of integrating now, and will report back. 

Just thought I'd share to see what others thought.

onescales
Shopify Partner
117 3 18

for this exact method, only shopify plus can achieve auto discounts for specific customers. if you don't have plus, you need to consider other methods to achieve this

OneScales.com Teaches Shopify and Solves Ecommerce Problems for Free. See our Youtube Channel for Tutorials - https://www.youtube.com/@onescales
We Also Share Insight about E-commerce, Web, Tech, AI, Analytics, SEO, PPC, Marketing and More.

wearebandb
Shopify Partner
27 1 6

Everyone who is searching for a simple, cheap app which can do this, try this one: https://apps.shopify.com/advanced-automatic-discount

bantikyan
Shopify Partner
25 1 2

Hello, 

Our app Stack Discounts Ninja will do exactly what you need.

 

For basic requirements you need, after installation, enable the app.

 

Then you need to create an Automatic Campaign, and select customer tags:

bantikyan_0-1733388059643.png

 

Add one or more discounts under this campaign.

 

Thanks.

Hovhannes
Customer Support Agent for Stack Discounts Ninja
- Like this comment to let me know my answer was helpful
- Mark my answer as an Accepted Solution if my answer solved your issue!