Shopify themes, liquid, logos, and UX
Hello! Looking to customize the order confirmation email
Familiar with HTML but not so familiar with liquid.
I know I would go to
Admin -> Settings -> Notifications -> Order confirmation -> Edit code
I imagine it's related to
Use the orders transaction object and it's sub properties
https://shopify.dev/docs/api/liquid/objects/order#order-transactions
https://www.google.com/search?q=shopify+liquid+credit+cart+last+4+digits
https://stackoverflow.com/questions/67768209/how-do-i-print-the-last-4-numbers-of-a-credit-card-on-the-templates-customers-or
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
Thanks Paul for the reply.
I tried inserting into the Order Confirmation Code
{% for transaction in order.transactions %}
card type: {{ transaction.payment_details.credit_card_company }} <br/>
card xxxx: {{ transaction.payment_details.credit_card_number }} <br/>
{% endfor %}
As well as trying (not sure if it makes a difference, didn't notice any)
{% for transaction in order.transactions %}
card type: {{ transaction_payment_details.credit_card_company }} <br/>
card xxxx: {{ transaction_payment_details.credit_card_number }} <br/>
{% endfor %}
In the preview I don't see anything so I thought maybe I should test with a credit card purchase on my site, so I then placed a test order on my site $1 credit card purchase, but it doesn't appear to be working.
Is there something else I should be doing or a certain exact spot in the line of the code I should be inserting this into?
Also how would I make it so this only appears for credit card payments, as opposed to manually collected payment methods which have no credit card info?
Oddly when I did do a manual payment order (no credit card info added), in the order confirmation it shows the following (see attached screenshot image).
where it shows
card type:
card xxxx:
Manual
No payment details with the credit card test order though.
I am trying to get the same thing. Ours shows the type of card but no digits. I haven't worked on code since before CSS became standard so I am not as savvy. This is what my customers see:
And here is the code I am manipulating:
Any help is greatly appreciated.
In Canada, payment processors, like those that provide payment processing services t...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025