I have tried this too, using CMS 1.6.6 and Products 2.4.3. First, note that the current documentation specifies action="details" (plural), but I have tried it both ways and I get smarty errors:
string(140) "Smarty error: [in content:content_en line 1]: syntax error: invalid attribute name: 'action' (Smarty_Compiler.class.php, line 1550)" string(126) "Smarty error: [in content:content_en line 1]: syntax error: invalid attribute name: '=' (Smarty_Compiler.class.php, line 1550)" string(134) "Smarty error: [in content:content_en line 1]: syntax error: invalid attribute name: '"details"' (Smarty_Compiler.class.php, line 1550)"
My tag: {Products action="details" productid="1"}
If I take out the action parameter and just leave productid, that give errors too. But the example given in the documentation, {Products category='categoryname'} works fine.
I suspect we are doing something wrong, but it is not obvious from the documentation. If you find a solution, please post it.
Steve
It does not give any errors just the word "Products", which is a link that when clicked, will give you the details of the item you specify. I was hoping it would give the details directly without needing to click on the "Products" link.
Last edited by starbits on Wed Oct 28, 2009 11:54 pm, edited 1 time in total.
It does not give any errors just the word "Products", which is a link that when clicked, will give you the details of the item you specify. I was hoping it would give the details directly without needing to click on the "Products" link.
starbits,
thanks for your post.
I will have another play around and see if I can build on what you have done.
It does not give any errors just the word "Products", which is a link that when clicked, will give you the details of the item you specify. I was hoping it would give the details directly without needing to click on the "Products" link.
Congratulations Ben! Nice job. On my newer version, the tag works like this:
{Products action='details' detailtemplate="somename" productid="1"}
Also I have now specified my own template as the default template, and once I did that, the tag works even without the "detailtemplate" option.
I guess the conclusion is that you cannot specify the action="details" until you have a new detail template of your own. As far as I am concerned you can mark this as SOLVED. Thanks for the help.
starbits wrote:
Congratulations Ben! Nice job. On my newer version, the tag works like this:
{Products action='details' detailtemplate="somename" productid="1"}
Also I have now specified my own template as the default template, and once I did that, the tag works even without the "detailtemplate" option.
I guess the conclusion is that you cannot specify the action="details" until you have a new detail template of your own. As far as I am concerned you can mark this as SOLVED. Thanks for the help.