So I am starting a webshop for wine, where the client will sell packages of different wines.
Am using seperate bottles of wine as ‘products’ and have ‘bundles’ where he will add three wines to each and sell those…
Have a Collection resource with a MODX resource for each ‘bundles’ and assigned Commerce bundle there:
On home I want to display 3 of the latest ‘bundles’. I assume the best way is to use a pdoResoruces call:
[[!pdoResources?
&parents=`2`
&tpl=`sl_commerce_homepage_row.chunk`
&tvPrefix=``
&includeTVs=`products`
&processTVs=`1`
&processTVs=`1`
]]
And:
sl_commerce_homepage_row.chunk
<a href="[[~[[+id]]]]">
<h3>[[+longtitle:default=`[[+pagetitle]]`]]</h3>
<p>[[!commerce.get_product? &product=`[[+id]]` &field=`price_formatted`]]</p>
</a>
But here it goes wrong, how can I display the commerce bundle price?
[[!commerce.get_product? &product=`[[+id]]` &field=`price_formatted`]]
Does not work, the ID is the resource but I need the related Commerce product (bundle)