There is a snippet in which the price of the product is calculated. I need to display it on the category page, which consists of a chunk.
Since modx 2, there is a setPlaceholder method that sets the placeholder value to match the “+” syntax inside templates.
But in my case it doesn’t work. I think because of the MODX version.
I’ve tried it like this:
And in the chunk itself [+name+]
But alas. Only the layout crashes on the page with the snippet. And no changes on the page with the chunk.
What works is if you specify the name of the snippet directly. Like this:
But then the same value is displayed on each product, however different values for each product should be.