Allow customizing the checkout completion message from the user interface

Created on 26 June 2020, over 4 years ago
Updated 28 November 2023, 12 months ago

Four years ago we built the checkout system in #2689549: Implement the initial checkout structure β†’ . At that time moving everything into templates was seen as a usability improvement and gave greater flexibility for controlling output. So we did not make the checkout completion message customizable – end-users could put the template into their theme and control the output as needed. This bypassed the lack of Token availability as well.

We should add the ability to make the message customizable through the interface and embedded in the pane template.

We can roughly add it this way.

    $pane_form['message'] = [
      '#theme' => 'commerce_checkout_completion_message',
      '#order_entity' => $this->order,
      '#message' => $this->configuration['message'],
    ];
<div class="checkout-complete">
  {{ message }}

  {% if payment_instructions %}
    <div class="checkout-complete__payment-instructions">
      <h2>{{ 'Payment instructions'|t }}</h2>
      {{ payment_instructions }}
    </div>
  {% endif %}
</div>

We'll need to update the default configuration to maintain the following:

  {{ 'Your order number is @number.'|t({'@number': order_entity.getOrderNumber}) }} <br>
  {{ 'You can view your order on your account page when logged in.'|t }} <br>

That means we'll need to figure out token support upfront. We should also support text filters.

✨ Feature request
Status

Fixed

Version

2.0

Component

Checkout

Created by

πŸ‡ΊπŸ‡ΈUnited States mglaman WI, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • I am also facing the issue to translate it through admin interface.
    When I copy the configuration manually into yml files and import it the complete message is translated.

  • πŸ‡ΈπŸ‡°Slovakia sketman

    The same problem here. I alter the checkout completion message in UI but nothing gets changed on the site.
    Am I missing something? Some guidance would be highly appreciated...

Production build 0.71.5 2024