Skip to content
  1. Extras
  2. MiniShop3
  3. Frontend interface
  4. Thank you for your order

Thank you

The thank-you page is shown after a successful checkout. It displays order details and next steps for the customer.

Page structure

ComponentFilePurpose
Page templateelements/templates/thanks.tplThank-you page layout
Order chunkelements/chunks/ms3_get_order.tplPlaced order details

Page template

Path: core/components/minishop3/elements/templates/thanks.tpl

The template extends the base template and contains three sections:

Page sections

SectionDescription
Success headerIcon, "Thank you for your order!" title, subtitle
Order detailsmsGetOrder snippet call
"What's next?" blockInformation and navigation buttons

Template code

fenom
{extends 'file:templates/base.tpl'}
{block 'pagecontent'}
    <div class="container my-5">
        <main>
            {* Success header *}
            <div class="text-center mb-5">
                <div class="mb-4">
                    <svg class="text-success" width="80" height="80" fill="currentColor">
                        <use xlink:href="#icon-check"/>
                    </svg>
                </div>
                <h1 class="display-5 fw-bold text-success mb-3">Thank you for your order!</h1>
                <p class="lead text-muted">Your order has been placed and is being processed</p>
            </div>

            {* Order details *}
            <div class="row justify-content-center">
                <div class="col-lg-10">
                    {'!msGetOrder' | snippet : [
                        'tpl' => 'tpl.msGetOrder'
                    ]}
                </div>
            </div>

            {* "What's next?" block *}
            <div class="row justify-content-center mt-5">
                <div class="col-lg-10">
                    <div class="card border-0 bg-light">
                        <div class="card-body text-center py-4">
                            <h5 class="card-title mb-3">What's next?</h5>
                            <p class="card-text text-muted mb-4">
                                We sent an order confirmation to your email.<br>
                                Our manager will contact you shortly.
                            </p>
                            <div class="d-flex gap-3 justify-content-center flex-wrap">
                                <a href="/" class="btn btn-outline-primary">
                                    Home
                                </a>
                                <a href="/catalog/" class="btn btn-primary">
                                    Continue shopping
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </main>
    </div>
{/block}

Caching

The msGetOrder snippet must be called uncached (!msGetOrder) because order data comes from the session or a GET parameter.

How order detection works

After successful checkout, the customer is redirected to the thank-you page with a GET parameter:

/thanks/?msorder=15

or with the order UUID:

/thanks/?msorder=a1b2c3d4-e5f6-7890-abcd-ef1234567890

The msGetOrder snippet automatically resolves the order from the msorder GET parameter.

Security

UUID links can be sent safely by email — they do not require authorization and do not expose the sequential order number.

Order details

The order details block is rendered by the msGetOrder snippet and chunk tpl.msGetOrder.

Displayed information:

  • Order number and status
  • Product table with prices
  • Total cost
  • Delivery and payment methods
  • Contact details and address
  • Payment link (if available)

If the payment method supports online payment, a "Pay order" button appears in the payment block:

fenom
{if $payment_link?}
    <a href="{$payment_link}" class="btn btn-success">
        Pay order
    </a>
{/if}

The link is generated by the payment gateway handler via the getPaymentLink() method.

Redirect configuration

After checkout, the customer is redirected to the thank-you page. The page URL is set in system settings:

SettingDescription
ms3.page_id.thanksResource ID of the "Thank you" page

On checkout, redirect happens as follows:

javascript
// After successful checkout
document.addEventListener('ms3:order:success', (e) => {
    window.location.href = e.detail.redirect;
    // redirect = /thanks/?msorder=15
});

Customization

Changing the template

  1. Copy thanks.tpl to your theme
  2. Change markup and styles
  3. Assign the template to the thank-you page resource

Changing the order chunk

Create your own chunk and specify it in the call:

fenom
{'!msGetOrder' | snippet : [
    'tpl' => 'tpl.myGetOrder',
    'includeThumbs' => 'small'
]}

Adding product thumbnails

fenom
{'!msGetOrder' | snippet : [
    'tpl' => 'tpl.msGetOrder',
    'includeThumbs' => 'small,medium'
]}

Adding a recommendations block

After the order block, you can add recommended products:

fenom
{* After order details *}
<div class="row justify-content-center mt-5">
    <div class="col-lg-10">
        <h4 class="mb-4">You may also like</h4>
        {'msProducts' | snippet : [
            'parents' => 0,
            'where' => ['Data.popular' => 1],
            'limit' => 4,
            'tpl' => 'tpl.msProducts.row'
        ]}
    </div>
</div>

Notifications

On successful checkout, notifications are sent automatically:

RecipientTemplateDescription
Customertpl.msEmail.order.newOrder confirmation
Managertpl.msEmail.order.managerNew order notification

Notification setup is described in Events → Notifications.

Responsive layout

The page uses Bootstrap 5 Grid:

ScreenContent width
< 992px100%
≥ 992px10 columns (~83%)
html
<div class="row justify-content-center">
    <div class="col-lg-10">
        {* Centered content *}
    </div>
</div>