Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
JoshuaLuckers opened this issue Nov 11, 2020 · 0 comments

Comments

@JoshuaLuckers
Copy link
Contributor

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]]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant