+
Skip to content

Missing example if you want to show the cart in the header when using tpl properties #121

Open
@JoshuaLuckers

Description

@JoshuaLuckers

On page get cart there is a part about "Showing cart in the header?".
It mentions using the &toPlaceholders property with an example to prevent outdated cart info.
However the example doesn't work if one of the tpl properties is set for the snippet.

To make it work with one of the tpl properties you can use the MODX Output Modifier toPlaceholder.
Example:

[[!commerce.get_cart:toPlaceholder=`cart`?
  &tpl=`CartTpl`
  &itemTpl=`CartItemTpl`
  ]]

In the "header" you can the show the cart by adding [[!+cart]]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载