Solved

add payment method

  • 23 February 2021
  • 4 replies
  • 875 views

Badge +2

Hello everyone,
I have created an email template and on it I would like to put the payment method and the last 4 digits of the credit card used by the customer, as well as the total amount paid.
In fact I would like the exact same function as on the shopify email.
I tried to include it in my personalized email but it doesn't work.
Does anyone have any idea what code I should include?
Thank you in advance for your help! 
(here is a picture of the sentence I would like to have)

 

icon

Best answer by Bobi N. 24 February 2021, 09:49

View original

4 replies

Userlevel 7
Badge +42

@Luc messmer

Hi, {{ event.extra.payment_details.credit_card_number }} this seem to be the code for the credit card number..  and this in case you want to use credit cart company {{ event.extra.payment_details.credit_card_company }}

 

Btw, im not sure how this code will work with other flow triggers and I don’t think it will work at all in campaigns, but you can always test it. For flow started with Placed Order metric this will work for sure.

Badge +2

Thank you very much for your answer.
I still had a second concern.
I took a block of Klaviyo but I couldn't save it because it says "invalid template filter: 'product_img_url'" and I didn't touch anything.
Do you have any solution?
Thank you very much again

 

 

Userlevel 7
Badge +42

@Luc messmer 

I’m not sure what Metric are you using for trigger here so I will have to assume.. however what this is saying is that your code for the img is wrong.. something with it is wrong..

{{ line.product.featured_image | product_img_url: ‘medium’ }} - this one is notworking properly for some reason.. to be honest I don’t know where you found this code and if you edited something in it but klaviyo is saying that it is bad code..

Usually for imgs we use this code {{ event.extra.line_items.0.product.images.0.src }} or something similar to this..

Badge +2

I managed to find the problem. Indeed, the block was adapted for shopify code but not Klaviyo.

Reply