I am trying to find a way to allow users to select a product from the Product module and add it to a page, either a dropdown or multi-select is adequate.
Obviously if there is way to see image of product that would e helpful.
many thanks
Mark
Products: How can I select a product inside CMS content page
Re: Products: How can I select a product inside CMS content
CGContentUtilities lets you add a dropdown as a content block, and the options can be from a Smarty template. So in the CGCU dropdown options field you should be able to add something like:
Where my_options_template is a template you create for Products that puts one item per line, with the option and value separated by a pipe character.
You may have to experiment with the template a bit to get line breaks and the formatting right.
Also, there's a bug in CGCU which will stop this from working, so you may have to encourage/bribe/beg the module developer for an update or use version CGCU 2.4 or older:
http://dev.cmsmadesimple.org/bug/view/12238
Code: Select all
{cms_module module='Products' summarytemplate='my_options_template'}
You may have to experiment with the template a bit to get line breaks and the formatting right.
Also, there's a bug in CGCU which will stop this from working, so you may have to encourage/bribe/beg the module developer for an update or use version CGCU 2.4 or older:
http://dev.cmsmadesimple.org/bug/view/12238
Not getting the answer you need? CMSMS support options
Re: Products: How can I select a product inside CMS content
Hi @DIGI3
The cms page shows "An invalid curpage was passed toProducts\DisplayableProduct::__construct" in the dropdown. not sure why this is happening.
The cms page shows "An invalid curpage was passed toProducts\DisplayableProduct::__construct" in the dropdown. not sure why this is happening.
Re: Products: How can I select a product inside CMS content
Perhaps it won't work then - it's my usual method with a lot of modules but I didn't try it on Products as I didn't get past the bug I mentioned. It looks like Products wants to see what frontend page it's being called from. Perhaps Calguy can offer more info.
The other option would be to write a plugin/udt to pull the products from the database and use that to populate the CGCU options.
The other option would be to write a plugin/udt to pull the products from the database and use that to populate the CGCU options.
Not getting the answer you need? CMSMS support options