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 !
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024