Checkout-Danke-Seite

Im Checkout steht bei der Dankeschön-Seite steht Theme-seitig “Danke, {{ display_name }}!”. Dabei wird der Vorname ausgespielt. Ich hätte aber gerne den Nachnamen angezeigt. Andere Codes wie {{ customer.last_name }} oder {{ customer.name }} funktionieren nicht. Gibt es eine andere Lösung als Plus-Abo oder einen allgemeinen Text wie “Vielen Dank für Ihre Bestellung!”?

Außerdem bezieht sich {{ display_name }} komischerweise auf den Namen aus der Lieferadresse, nicht aber auf den des eingeloggten Kontos. Sollte {{ display_name }} nicht idealerweise den Namen des eingeloggten Kontos verwenden, statt den der Lieferadresse?

That line is a built-in Shopify string on the thank-you page, not something in your theme.

{{ display_name }} is the only variable it accepts, and it always prints the first name. {{ customer.last_name }} and {{ customer.name }} are not available there, so they just show as plain text.

It also takes the name from the order (the name entered at checkout), not from the logged-in account. When those two differ, you see the checkout name.

Changing that greeting to show the last name needs Shopify Plus. On a normal plan there is no way to swap the variable on the thank-you page.

Without Plus:

  • Keep the first name, or use a neutral line like “Vielen Dank für Ihre Bestellung!”
  • To greet the customer by full name or last name, do it in the order confirmation email instead. Settings > Notifications > Customer notifications > Order confirmation > Edit code. That template is full Liquid, so {{ customer.name }} (full name), {{ customer.last_name }} and {{ billing_address.name }} all work there.

Tested on a dev store.

Hey @TeeshopBerlin

hope you’re doing well!

{{display name}} uses the shipping address by design Displaying only the last name isn’t supported unless you’re on Shopify plus with check out Extensibility.

Hi everyone,

Thank you so much for your posts and help. I’m already using the neutral line “Thank you for your order!” as well as the salutation in the order confirmation email. But it’s good to know that there’s no other option in Shopify Basic—I guess I’ll just have to live with it. I’d like to pass along the fact that {{ display_name }} refers to the name from the shipping address to the Shopify development team.