Skip to content
  1. Extras
  2. msAltCart
  3. Snippets

Snippets

getCarts

Snippet for outputting carts on the page. Has a single parameter tpls, which takes a JSON string.

Fenom

fenom
{'!getCarts' | snippet: [
  'tpls' => '{
    "maincart": {
      "wrapper": "@FILE msac/cart.tpl","row":"@FILE msac/cartrow.tpl"
    }
  }'
]}

{'maincart' | placeholder}

Standard syntax

modx
[[!getCarts?
  &tpls=`{
    "maincart": {
      "wrapper":"@FILE msac/cart.tpl","row":"@FILE msac/cartrow.tpl"
    }
  }`
]]

[[+maincart]]

Осторожно

Do not mix syntax: if the snippet is called with standard syntax, use standard placeholders. Use only letters and digits in placeholder names.

Осторожно

The object key in the tpls parameter is the placeholder name used in the template.

msacConnector

Snippet that handles frontend requests. Never call it manually.