Liquid, JavaScript, themes, sales channels
Hello,
I use {{ checkout.total_price | money_without_currency }} in checkout additionnals scripts for tracking of conversions.
But it does not return any value in source code.
It is strange because {{ order.order_number }} works.
Can somebody help me?
Thanks a lot for your help.
Solved! Go to the solution
This is an accepted solution.
Hi @Mel1447,
Are you checking it at checkout page? https://i.imgur.com/TgvwKon.png
Please refer https://shopify.dev/docs/themes/liquid/reference/objects/checkout#checkout-applied_gift_cards
Hope it helps!
Hi @Mel1447
Hope you're having a great day!
Do it with 'json' filter:
<script>
gtag(
'event',
'conversion', {
'send_to': 'AW-*****/*****',
'value': {{ checkout.total_price | money_without_currency | json }},
'currency': 'EUR',
'transaction_id': '{{order.order_number}}'
}
);
</script>
Hi Michal_Morek,
That should be better.
I tried your solution but it does not work either.
It returns quotation marks but no value.
I do not understand.
PS: I specify that I am doing tests with old orders. I tried to create a new order but it is the same issue
Anyone?
If the order object is available and working is order.total_price useable?
Hi @iDoThemes
Hope you're having a great day!
I just tried your Google Chrome extension (Liquify Chrome Extension) and it's great. Good job.
Hi @Michal17
Thank you for trying it out, If you wouldn't mind leaving a review on the Chrome store page and sharing it with others that may find it useful, that would be a big help.
Thanks!
This is an accepted solution.
Hi @Mel1447,
Are you checking it at checkout page? https://i.imgur.com/TgvwKon.png
Please refer https://shopify.dev/docs/themes/liquid/reference/objects/checkout#checkout-applied_gift_cards
Hope it helps!
Here is my error. I check it at the thank you page.
I will use order object.
Thank you very much for your help !
Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024Digital marketers and app developers have tracked activity in apps and websites for yea...
By Ollie Mar 13, 2024February was an exciting month with Shopify Editions, informative webinars, and more! F...
By JasonH Mar 7, 2024