
msGetOrder
Snippet for displaying a completed order.
Used on the checkout page and for email notifications to customers.
Parameters
| Parameter | Default | Description |
|---|---|---|
| id | Order id; if omitted, taken from $_GET['msorder']. | |
| tpl | tpl.msGetOrder | Output chunk |
| includeTVs | Comma-separated TV list. | |
| includeThumbs | Comma-separated thumbnail sizes. | |
| toPlaceholder | If set, save output to a placeholder instead of outputting. | |
| includeContent | false | Include product "content" field in order items. |
| payStatus | 1 | Expected payment status for displaying the payment link. |
| showLog | false | Show debug info. Only for users authorized in context "mgr". |
Подсказка
You can also use other general pdoTools parameters.
Output
The snippet expects a Fenom chunk and passes 7 variables:
- order — order data from
msOrder - products — order items with full product data
- user — customer data from
modUserandmodUserProfile - address — delivery address from
msAddress - delivery — selected delivery from
msDelivery - payment — selected payment from
msPayment - total — order totals: cost, weight, delivery_cost, cart_cost, cart_weight, cart_count, cart_discount
Snippet parameters (e.g. payment_link in email chunks) are also available.
Placeholders
To see all placeholders, use an empty chunk:
<pre>[[!msGetOrder?tpl=``]]</pre>Example
Array
(
[order] => Array ( [id] => 1, [num] => 2311/1, [cost] => 2100, [status] => 1, ... )
[products] => Array ( [0] => Array ( [name] => Product 1, [count] => 3, [cost] => 1 500, ... ), ... )
[user] => Array ( [fullname] => Ivan Ivanov, [email] => ..., ... )
[address] => Array ( [receiver] => Ivan Ivanov, ... )
[delivery] => Array ( [name] => Pickup, ... )
[payment] => Array ( [name] => Cash, ... )
[total] => Array ( [cost] => 2 100, [cart_count] => 4, ... )
)Checkout
Use together with other snippets on the checkout page:
[[!msCart]] <!-- Cart; hidden after order is created -->
[[!msOrder]] <!-- Checkout form; hidden after order is created -->
[[!msGetOrder]] <!-- Order info; shown after order is created -->Email templates
This snippet is used by miniShop2 for email notifications if enabled in order status settings. All msGetOrder variables — order, products, user, address, delivery, payment, total — are available in email chunks.
By default all emails extend one base chunk tpl.msEmail and override blocks:
- logo — store logo with link to home
- title — email title
- products — order products table
- footer — site link in footer
Example: new order email to customer:
{extends 'tpl.msEmail'}
{block 'title'}
{'ms2_email_subject_new_user' | lexicon : $order}
{/block}
{block 'products'}
{parent}
{if $payment_link?}
<p style="margin-left:20px;{$style.p}">
{'ms2_payment_link' | lexicon : ['link' => $payment_link]}
</p>
{/if}
{/block}Here the base template is extended, the title is set, and the payment link is added to the products block when present.
See Fenom extends documentation for more on template inheritance.

