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" %}
{% elsif collection.handle == "agenzia-10-commissione" %}
{% elsif collection.handle == "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.