Personalized checkout and custom promotions with Shopify Scripts
Hi everyone, I'm getting a bit desperate. Lately my shopify is having a few issues on checkout. The latest one is the following: I had a script on the cart php that would add a certain discount on the checkout based on the collection of the product
{% if customer %}
{% if customer.metafields.custom.agency_account %}
{% for collection in item.product.collections %}
{% if collection.handle == "agenzia-8-di-commissione" %}
<input class="js-form-discount" type="hidden" name="discount" id="discount" value="AGENZIA8"/>
{% elsif collection.handle == "agenzia-10-commissione" %}
<input class="js-form-discount" type="hidden" name="discount" id="discount" value="AGENZIA10"/>
{% elsif collection.handle == "agenzia" %}
<input class="js-form-discount" type="hidden" name="discount" id="discount" value="AGENZIA"/>
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
In this case if the customer logged in had the tag 'business' and the product was in a knows collection it would add a discount on checkout. It worked PERFECTLY and it just stopped.
I see the paramenter discount gets added by the store on checkout but it's completely ignored. Any help on how to achieve this? getting a bit crazy.
Hi, see this thread from yesterday for a discussion about this issue: https://community.shopify.com/c/customers-discounts-and-orders/auto-apply-discount-code-at-checkout-...
In that thread, I added some links to other previous discussions.
There's a chance this is either a new bug, or some past functionality was removed in a recent update.
Have you tried contacting Shopify Support?
Hi Enicolelella, a user named Starshards has posted a solution for this issue, in another thread: https://apps.shopify.com/regios-automatic-discounts
Check it out and see if it solves your problem.
That's an app, doesn't resolve the issue unfortunately as I'd need to pay an extra fee for something that has been working perfectly for ages
Sorry, in my previous message, I accidentally pasted the wrong link, which was meant for another thread.
I didn't intend to promote my app here, and I'm sorry for any misunderstanding it may have caused.
Here are the links to some of Starshard's recent replies, where they suggested a solution for the issue:
User | RANK |
---|---|
4 | |
2 | |
2 | |
1 | |
1 |
On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023The year-end shopping season is just around the corner. Is a flash sale on your radar? Are...
By Jasonh Nov 6, 2023