Skip to content
  1. Extras
  2. MiniShop3
  3. Snippets
  4. msOrder

msOrder

Snippet for the checkout form. Shows customer fields, delivery and payment methods.

Caching

The snippet uses the user session and must be called uncached.

Parameters

ParameterDefaultDescription
tpltpl.msOrderOrder form chunk
userFieldsMapping of MODX profile fields to order fields (JSON)
includeDeliveryFieldsidComma-separated delivery fields (* = all)
includePaymentFields*Comma-separated payment fields (* = all)
includeCustomerAddressestrueLoad saved customer addresses
showLogfalseShow execution log
returntplOutput format: tpl, data

Examples

Basic output

fenom
{'!msOrder' | snippet}

With extra fields

fenom
{'!msOrder' | snippet: [
    'userFields' => 'comment,company_name'
]}

Get data

fenom
{'!msOrder' | snippet: [
    'return' => 'data'
]}

Data structure

With return=data the snippet returns an array with order, form, deliveries, payments, addresses, isCartEmpty, isCustomerAuth, and related keys. See frontend/order for form structure and placeholders.