{{ checkout.total_price | money_without_currency }} does not work. What can I do ?

Solved
Mel1447
New Member
10 0 0

Hello,

I use {{ checkout.total_price | money_without_currency }} in checkout additionnals scripts for tracking of conversions.

Capture d’écran 2021-06-09 à 22.20.49.png

But it does not return any value in source code.

Capture d’écran 2021-06-09 à 17.24.55.png

It is strange because {{ order.order_number }} works.

Can somebody help me?

 

Thanks a lot for your help.

0 Likes
Michal_Morek
Shopify Partner
820 73 140

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>

 

 

Founder of Shopify agency - Accomplishify.com
If you would like to hire us as Shopify experts, please reach out via:
  • Email michal.morek@accomplishify.com
  • WhatsApp +48 507 613 425
0 Likes
Mel1447
New Member
10 0 0

Hi Michal_Morek,

That should be better.

 

I tried your solution but it does not work either.

It returns quotation marks but no value.

Capture d’écran 2021-06-10 à 08.57.07.png

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 

0 Likes
Mel1447
New Member
10 0 0

Anyone?

0 Likes
iDoThemes
Explorer
72 15 31

If the order object is available and working is order.total_price useable?

Developer of Liquify Chrome Extension -- Enhance the Shopify Theme Code Editor

Theme Developer -- Drop me a line
0 Likes
LitExtension
Shopify Partner
1235 162 219

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!

LitExtension - Shopping Cart Migration Expert
If our answer is helpful then please accept as solution!
Are you looking for a solution to migrate to Shopify? Contact us for further assistance.
Try our FREE DEMO now!
Mel1447
New Member
10 0 0

Here is my error. I check it at the thank you page.

I will use order object.

Thank you very much for your help !

0 Likes
Michal_Morek
Shopify Partner
820 73 140

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.

Founder of Shopify agency - Accomplishify.com
If you would like to hire us as Shopify experts, please reach out via:
  • Email michal.morek@accomplishify.com
  • WhatsApp +48 507 613 425
0 Likes
iDoThemes
Explorer
72 15 31

Hi @Michal_Morek 

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!

Developer of Liquify Chrome Extension -- Enhance the Shopify Theme Code Editor

Theme Developer -- Drop me a line
0 Likes
Michal_Morek
Shopify Partner
820 73 140

Hi @iDoThemes 

You're welcome.

Founder of Shopify agency - Accomplishify.com
If you would like to hire us as Shopify experts, please reach out via:
  • Email michal.morek@accomplishify.com
  • WhatsApp +48 507 613 425
0 Likes