d
Topic
Posts:
2
March 22, 2013
g
3
upvotes

Auto-Fill Discount From URL This post is outdated

We want to apply discounts from a link on a web page. Discount coupons do not work for all types of users.

i
Replies
Posts:
2
May 07, 2013

I too am looking for a solution like this. Want to use the URL in our ad campaigns so that when the user clicks on the ad, the URL that sends them to our site automatically applies the discount.

Posts:
2
May 07, 2013

I too am looking for a solution like this. Want to use the URL in our ad campaigns so that when the user clicks on the ad, the URL that sends them to our site automatically applies the discount.

Posts:
3847
May 07, 2013

Since discount coupons are applied to an order in the checkout process (step 2 of 3), you cannot auto-fill the discount. You could however ensure the customer notices the discount using your Theme to catch the code in the URL and for the duration of their session, make it visible on the shop, perhaps in the header to make it obvious.

 

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
Jonathan Snook Shopify Employee
Posts:
733
May 07, 2013

We'll have some updates to the checkout process and how discounts get applied in the next few months and this is one of the things on our to-do list. 

I work for Shopify.
Collin Shopify Merchant
Posts:
84
October 02, 2013

We'll have some updates to the checkout process and how discounts get applied in the next few months and this is one of the things on our to-do list.

Jonathan, any progress here?

Posts:
2
October 09, 2013

Ditto to Collin. Looking for automatic discounts that I can apply to a particular collection for instance. Manual discount codes aren't always practical.

Posts:
34
November 21, 2013

Jonathan: any update on this?  It's been about 7 months and as far as I can tell it's still not possible.

We write software to improve customer retention and repeat purchases
Jonathan Snook Shopify Employee
Posts:
733
November 21, 2013

The Checkout team had been working on Gift Cards as their top priority for the last few months, ensuring that we got the feature out before Black Friday/Cyber Monday. With that out the door, they'll be continuing their efforts on improving the checkout and the ability to pass discount codes through the site address is on the roadmap. I can't say when this feature will be available, though.

I work for Shopify.
hollaa01 Member
Posts:
35
November 26, 2013

Arghh!! This needs to happen soon, please. Can you politely kick them up the backside to hurry it along ...or something? :)

Collin Shopify Merchant
Posts:
84
November 27, 2013
g
4
upvotes

For pity's sake, please get this DONE, Shopify. I am sick and tired of refunding shipping charges to customers who respond to a promotion with a free shipping offer but forgot to enter the code. Or, more often, couldn't figure out where to enter the code, since you refuse to put the discount code field on the main cart page as so many other ecommerce systems do.

Posts:
22
December 25, 2013
g
1
upvotes

Please get this working! This is a huge feature for giving discounts to customers without giving them a big discount code to share with the world that others have not earned!
 

Posts:
46
December 25, 2013

Would love to see that sooner than later.

Ben Klinger, Studio Ve
Posts:
2
January 07, 2014

Any update on this? It's one of those features that makes switching platforms so tempting.

Posts:
2
February 05, 2014

Would love to know if there has been any apps created for this or a fix for this.  Thank you.

 

Gabriel Member
Posts:
8
February 27, 2014

Am also looking for this feature. 

Posts:
1
March 06, 2014

Yes +1 for this option.  

Any update?  

Cam Shopify Expert elkfox.com
Posts:
165
Last edited April 23, 2014
g
1
upvotes

This would definitely be super useful for custom wholesale setups too!

Head fox at Elkfox | App and web, design and development | Digital commerce experts | https://elkfox.com
Galen King Shopify Expert www.lucid.co.nz
Posts:
43
June 05, 2014

Any update on this?

Lucid, www.lucid.co.nz. New Zealand-based Shopify Plus Experts working with clients around the world.
ajmalafif Shopify Partner ajmalafif.com
Posts:
13
June 18, 2014
g
1
upvotes

Any estimated deadline for this, please?

felixthea Shopify Partner TrafficAndSales.com
Posts:
114
Last edited June 22, 2014

I'm working on a Shopify app now that reminds your customer that they have a discount code they can use right near the checkout button so that the discount code is fresh on their mind when they are checking out.  

This app can also reduce shopping cart abandonment because it's a nice reminder/discount right before your customer purchases giving them the extra push they often need.

Take a look at the screenshot below of an early draft.  If you are interested in beta testing this app please reach out to me directly by emailing me: felixthea@gmail.com

Click here for a larger image

"My store generates the sales I need to finally live the life I want all while I sleep" TrafficAndSales.com
Cam Shopify Expert elkfox.com
Posts:
165
June 23, 2014

Hi Felix,

That's a nice workaround, and probably very suitable for many situations. Good one!

Cam
Elkfox

Head fox at Elkfox | App and web, design and development | Digital commerce experts | https://elkfox.com
Posts:
2
July 01, 2014

Pleaaaaaasse make this a priority.  I assumed that this functionality was built-in since it's common amongst other e-commerce platforms and just realized it's not after making an entire custom design that revolves around this functionality :(

Any update on where this falls on the priority list? Would be great to know if I should get the site re-designed or wait it out. 

Collin Shopify Merchant
Posts:
84
July 01, 2014

Victor, my guess is this falls somewhere in the "yeah, we're working on that and hope to have it done one day" category, which, as an objective history demonstrates, means it'll be years in the making if it ever sees the light of day at all.

Do what you need to do, even if that means scratching the work you've already done and switching to another e-commerce system. I would not recommend waiting it out. (Shopify folks, I warmly invite you to prove me wrong.)

felixthea Shopify Partner TrafficAndSales.com
Posts:
114
July 01, 2014

I have a solution that might work for you.  I'm building an app where you can remind your customer of a discount code as they browse your store.  

Here's a live demo for a 10% off coupon.  Browse around the store and you will continue to see the reminder even on the cart page so that they don't forget when checking out.  This app can also increase conversion rates because the discount code reminder is an extra incentive for the customer to continue on with purchasing.

Click here to see the live demo: http://felix-thea-2.myshopify.com/?discount=10off&overlay=top-bar.

The discount code changes depending on the URL that the user clicked on.  For example click on this version of the link and you will see a 25% off discount code:

http://felix-thea-2.myshopify.com/?discount=25off&overlay=top-bar

If you're interested in using the app, email me at felixthea@gmail.com for access into the beta.

"My store generates the sales I need to finally live the life I want all while I sleep" TrafficAndSales.com
Posts:
3
July 08, 2014

All of us need this essential feature. It saves our time refunding money when customers forget to enter the coupon code when checking out. Shopify please spend your time implement it ASAP.

Posts:
13
August 27, 2014

And word on this??

Posts:
2
August 27, 2014

So, it has been a year in a half since I posted this original inquiry. 

felixthea has a nice workaround worth looking at but at the same time, in 2014 we don't use coupon codes anymore. 

I made a horrible assumption when we looked at Shopify that this feature was possible and in hindsight would have gone another route. I posted this question planning to scrap shopify but assumed after a year or so it would make it.

I would prefer that employees of Shopify do not come onto forums and tell customers they are working on it and never deliver.That type of practice is how you build a bad reputation.

Collin Shopify Merchant
Posts:
84
August 27, 2014
g
1
upvotes

I would prefer that employees of Shopify do not come onto forums and tell customers they are working on it and never deliver.That type of practice is how you build a bad reputation.

Ryan, that ship sailed long ago, to the extent that Shopify is on the verge of becoming a verb. To "Shopify" something is to keep it afloat on rafts of promises you have no intention of honoring. It's now such an accepted and ingrained part of the Shopify experience I full expect them to add it to their feature list.

Collin Shopify Merchant
Posts:
84
September 08, 2014

Jonathan, would you care to update us? After 10 months of it being "on the roadmap" I think it's reasonable to ask where exactly we are now.

We've just wrapped up another little promotion and a full 16% of the respondents failed to enter the discount code correctly. I had to issue partial refunds manually. Lots of fun, especially since I have nothing else on my to-do list.

Mind you, those were people who went ahead with the transaction, paying full price. I wonder how many stopped when they saw the undiscounted price and didn't complete the transaction at all?

Posts:
2
October 29, 2014

For what it's worth, I had several chat sessions with Shopify and after confirming with their development team the response is basically the same as what Jonathon said nearly 18 months ago:

Natasha Craig (Shopify)

Oct 29 03:53

Hi James!

This is Natasha with the Shopify Guru Team, following up on our chat. I want to thank you for your patience. I was off for a few days and missed the email regarding your question. I did hear back, and unfortunately at this time there isn't an update on the auto-discount feature. They did, however, confirm that our checkout team it is currently working on it, so I'm hoping that an update is in the near future.

Have a great day,

Natasha
Shopify Guru

Posts:
1
January 07, 2015

+1  The lack of this feature and communication makes it hard to handle basic discounting scenarios in a fluid manner.  This should HELP shop owners sell more which is good for shopify.

Posts:
26
Last edited January 20, 2015

Are there any news on this?

If not, is there any interesting app that, besides the creative approach by Felix Thea, solves this issue?

Posts:
28
January 20, 2015
g
1
upvotes

Switched to Shopify last month and whereas (for me) the Support team have replied quickly with any query - I can't believe this is feature isn't standard. The discounting/promotions features are absolutely crucial for any ecommerce to work properly and voucher coding just isn't an option when it is "sale" period (as it is now).

Get it sorted urgently please Shopify as I don't see ourselves hanging around without such a basic feature.

Posts:
2
March 05, 2015

guys, no news about this yet? 

Posts:
22
March 05, 2015

We're switching to WooCommerce bc features like this will clearly never be addressed. Shopify seems to only be concerned with their physical POS system. 

Posts:
196
May 12, 2015
g
3
upvotes

It looks like you can do this now. 

I found this article: https://docs.shopify.com/manual/your-store/discounts/send-discount-with-abandoned-checkout

It describes how you can apply a discount to a cart by placing a query parameter like this ?discount=YourDiscoutCode on end of the checkout url. 

I ran an experiment and placed a hidden inpput in the form on the cart page. 

  <input type="hidden" name="discount" value="YourDiscoutCode" />

Once submitted this does indeed place the discount=YourDiscoutCode query parapmeter on the end of the checkout url and sets the discount code. 

To fill this hidden input you could use some JS code or read the cart url that could contain the discount code in the url.

Cheers!

Stop Stressing About Shopify You’ve Got Better Things To Do =&gt; https://320ny.com/shopify/
Cam Shopify Expert elkfox.com
Posts:
165
Last edited May 12, 2015

That's genius Ryan :) Thanks for sharing!

Head fox at Elkfox | App and web, design and development | Digital commerce experts | https://elkfox.com
Posts:
196
Last edited May 20, 2015
g
1
upvotes

Hi rx,

Where is the discount code orginally comming from? User input, url, somehting else?

If you want to presist the discount code across page views you will have to store it in a cookie or soemthing like like local store. When a page is reloaded you will have to read this storage source and place the discount code into the input.

To do tha actual placement you can use val(): http://api.jquery.com/val/

Ex:

<input id="discount_input" type="hidden" name="discount" value="">
<script>
  $("#discount_input").val("your_discount_code);
</script>

 

-Ryan

Stop Stressing About Shopify You’ve Got Better Things To Do =&gt; https://320ny.com/shopify/
Posts:
196
May 20, 2015

You can find this info on Stackoverflow but the general prodess would be:

1. Detect discount code query parameter from url or from storage source

   From query param: 

   

function getParameterByName(name) {
    var match = RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search);
    return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
}

var yourDiscount = getParameterByName(discount); 

   Source: http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript

   From local storeage

var discount = localStorage.getItem("discount")

 

2. Store discount code in storage source if found

localStorage.setItem("discount", yourDiscount)

3. Update hidden input with value

Stop Stressing About Shopify You’ve Got Better Things To Do =&gt; https://320ny.com/shopify/
Posts:
196
May 20, 2015

Local storage is easier and just appending the url will probably prove troublesome. You would have to append all of the links on each page to correctly have the query parameter show up in each page view request. 

Stop Stressing About Shopify You’ve Got Better Things To Do =&gt; https://320ny.com/shopify/
Cam Shopify Expert elkfox.com
Posts:
165
Last edited May 27, 2015
g
1
upvotes

Remember to be careful with expiring the locally stored data or discount code with this method. Otherwise you may find the same code is applied every time the same customer comes back to make a purchase. You could set a cookie with an expiration or use a single use coupon code.

-- edit --

Actually HTML5 "sessionStorage" is probably the best option.

Head fox at Elkfox | App and web, design and development | Digital commerce experts | https://elkfox.com
Posts:
196
May 27, 2015

Cam that is an excelent point and should definately be implemented as part of the described solution.  

Rx, here is how you would set and get the discount from sessionStorage:

// Set discount code in session storage
sessionStorage.setItem("discount", yourDiscount)

// Get discount code from session storage
var discount = sessionStorage.getItem("discount");

 

Stop Stressing About Shopify You’ve Got Better Things To Do =&gt; https://320ny.com/shopify/
Posts:
1
June 15, 2015
g
1
upvotes

Thanks Ryan for all the work.  Tried the above code and it worked like a charm!  One thing that I ended up doing is putting a simple line of code to auto apply discounts based on whether a customer was a reseller.  Here it is for those interested.

Just like above, after "<form action="/cart" method="post" id="cart">" located in the cart.liquid

Place something like:
  

{% if customer.tags contains 'RESELLER' %}

   <input type="hidden" name="discount" value="RESELLERDISCOUNTCODE" >
  
 {% endif %}

Customer tags only work if customers are logged in, so this is more focused on resellers etc as opposed to a normal one time customer whereby getting the discount code from the link is the way to go.

Cam Shopify Expert elkfox.com
Posts:
165
June 16, 2015

Cool mod Timo. That's a good way to offer automated discounts for resellers etc. I'm going to use that too. Thanks! :)

Head fox at Elkfox | App and web, design and development | Digital commerce experts | https://elkfox.com
Posts:
3
June 17, 2015

Hey all, it looks like permalinks will work with the discount on the end.  That way you can put the item in their cart with the coupon applied.  

http://YOURSTORE.myshopify.com/cart/VARIANTID:QUANTITY?discount=DISCOUNTCODE

Here is an article on permalinks:

https://docs.shopify.com/manual/configuration/store-customization/page-specific/cart-page/cart-permalinks

 

Posts:
196
June 17, 2015

Hi Greg,

This is a great option of you want to send someone directly to the checkout and all of the items they want to buy are included in the link. 

This option will not work if you want to allow someone to casually browse the site and add items to their cart. Clicking a permalink will wipeout and replace the cart with just the variants specified in the link.

-Ryan

Stop Stressing About Shopify You’ve Got Better Things To Do =&gt; https://320ny.com/shopify/
Posts:
3
June 17, 2015

Ryan,

In our specific case, we sell software.  When a new version comes out we notify the customer that they can upgrade and give them an upgrade discount.

Thanks,

Greg

Posts:
196
June 17, 2015

That is a great use case. You can even have them execute the link directly from an email. 

Stop Stressing About Shopify You’ve Got Better Things To Do =&gt; https://320ny.com/shopify/
Posts:
3847
Last edited June 17, 2015

Any transition to the checkout can be decorated with a valid discount code using the ?discount=code URL parameter. 

So it is useful in an infinite number of ways. I just tricked out a site using the referral mechanism and the discount code to ensure frequent referrers get credit for sending customers to buy discounted merch... easy. 

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
Posts:
17
Last edited August 12, 2015

I figured it out!

I have a custom solution that automatically applies discounts that customers are eligible for. It lets them know how much they are saving in their cart, and shows an updated subtotal. When you click "Checkout", it applies this discount without them having to type in any coupon code.

If you are interested in this, please add me on Skye at fluxanomaly627, or email me at fluxyapparel@gmail.com

Thanks :)

Cam Shopify Expert elkfox.com
Posts:
165
August 12, 2015
g
1
upvotes

Can you tell us any more? Your post is annoyingly bait-like.

Cam

Head fox at Elkfox | App and web, design and development | Digital commerce experts | https://elkfox.com
Posts:
3847
August 13, 2015

If you have a simple App Proxy on your shop, you can ask it the question:

- how much does this customer deserve as a discount?

The answer will probably be a code. Since you now issued a code to the front-end, you can add it to the URL, and voila, exactly as Julien tells it. 

That is not complex, so it is not an expensive App, nor is exotic. It is indeed very simple. Creating the rules for your customers and the discounts is best done if you're a PLUS customer, since they get access to all your discounts in an App. Otherwise, it is a wee bit clunky in that you have to maintain your own list of discounts in your App.

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
Cam Shopify Expert elkfox.com
Posts:
165
August 15, 2015

I'm with you on that RX.

Head fox at Elkfox | App and web, design and development | Digital commerce experts | https://elkfox.com