Solved

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

Mel1447
Tourist
10 0 1

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.

Accepted Solution (1)

LitExtension
Shopify Partner
4860 1001 1132

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
Check out our Shopify migration app to migrate your online store to Shopify

View solution in original post

Replies 9 (9)

Michal17
Shopify Partner
835 73 175

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>

 

 

Mel1447
Tourist
10 0 1

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 

Mel1447
Tourist
10 0 1

Anyone?

iDoThemes
Trailblazer
207 43 91

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
Michal17
Shopify Partner
835 73 175

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.

iDoThemes
Trailblazer
207 43 91

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!

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




Theme Developer -- Drop me a line
Michal17
Shopify Partner
835 73 175

Hi @iDoThemes 

You're welcome.

LitExtension
Shopify Partner
4860 1001 1132

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
Check out our Shopify migration app to migrate your online store to Shopify
Mel1447
Tourist
10 0 1

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

I will use order object.

Thank you very much for your help !