I am trying to redirect user after specific manual payment has been used.
for example, my manual payment method is titled "ATM"
<script>
{% if checkout.transactions.gateway == 'ATM' %}
window.location.replace("https://site.com");
{% endif %}
</script>
but the above is not working, so i was wondering if anyone know what is the liquid code to detect manual payment method?
i have tried a couple ways, but it is still not working
say my manual/custom transaction is name "ATM"
my codes are as follows:
<script>
{% if checkout.transactions == 'ATM %}
window.location.replace("https://site.com");
{% endif %}
</script>
<script>
{% if checkout.transactions.gateway == 'ATM %}
window.location.replace("https://site.com");
{% endif %}
</script>
Try this.
<script>
{% if checkout.transactions[0].gateway == "ATM" %}
window.location.replace("https://site.com");
{% endif %}
</script>
Thank you Chemuel!
It worked flawlessly until recently It won't show up anymore.
I don't know whether the problem is from "checkout.transactions[0].gateway" or "Shopify.Checkout.OrderStatus.addContentBox" sadly.
Do your still work?
Best Rgrds
User | Count |
---|---|
28 | |
19 | |
17 | |
16 | |
9 |