Hi,
I upgraded a site to 1.11.6
also upgraded all modules.
Products has version 2.19.5
I use the ecommerce solution made by Callguy/Ted.
For some reason the conbination of summary-template and detail-template will not work with code like this:
{Products hierarchy='somehierarchy' summarytemplate='summtemplate' detailtemplate='adetailtemplate'}
The summery-template is loaded but the links do not show the detailtemplate and the default detailtemplate is chosen. This is a known problem.
I am considering a downgrade of the module Products to version 2.18.4 because in a site running CMSMS 1.11.4 this one is working like expected.
My questions are:
- Can one downgrade this module without loosing templates, settings etc. by just copying all the PHP-files in the module/products directory?
- How can I help to tackle the problem that the links in the productsummary do not show the detailtemplate like in the functional site?
Kind regards,
Jan
[solved]Products detailtemplate
[solved]Products detailtemplate
Last edited by janvl on Tue May 07, 2013 7:47 pm, edited 1 time in total.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: Products detailtemplate
The better way to do this is to set the behavior for the module on the page that it will be displayed using {cge_module_hint}.
i.e: {cge_module_hint module=Products summarytemplate=foo detailtemplate=bar}
You can call this plugin multiple times. It works great in the "Smarty data or logic that is specific to this page:" area of the page, or in any part of the template that is called before the {content} stuff. You can call this plugin for multiple different modules (my modules). So you could use the same detailpage for blog articles, products, whatever...
This plugin allows you to say that 'on this page, if Products is called, I want to use the foo summarytemplate, and the bar detailtemplate. Of course, any parameters called directly on the tag, or passed in a URL will take precedence over parameters set with {cge_module_hint}
i.e: {cge_module_hint module=Products summarytemplate=foo detailtemplate=bar}
You can call this plugin multiple times. It works great in the "Smarty data or logic that is specific to this page:" area of the page, or in any part of the template that is called before the {content} stuff. You can call this plugin for multiple different modules (my modules). So you could use the same detailpage for blog articles, products, whatever...
This plugin allows you to say that 'on this page, if Products is called, I want to use the foo summarytemplate, and the bar detailtemplate. Of course, any parameters called directly on the tag, or passed in a URL will take precedence over parameters set with {cge_module_hint}
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: Products detailtemplate
Thank you!
with this "hint" I have the whole site working in 2 languages.
I must search the module description for this solves some of my problems.
BTW, the more I use your ecommerce solution the more I am impressed by the flexability, great work!
Kind regards,
Jan
with this "hint" I have the whole site working in 2 languages.
I must search the module description for this solves some of my problems.
BTW, the more I use your ecommerce solution the more I am impressed by the flexability, great work!
Kind regards,
Jan
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: Products detailtemplate
here's another hint...
You can put some standard 'hints' into your page template (or a GCB that is called by your page template)
{cge_module_hint module=Products pagelimit=10 detailpage=details}
{cge_module_hint module=CGBlog pagelimit=10 detailpage=details}
{cge_module_hint module=CGSmartImage max_width=500}
...
Then in your 'details' page, in addition to the above hints you could put something like
{cge_module_hint module=Products detailtemplate=foo1}
{cge_module_hint module=CGBlog detailtemplate=foo2}
Then if you call {Products} or {CGBlog} say in a sidebar. it will use those parameters, limit the number of entries per page, redirect all detail links to the 'details' page and on that page use the foo1 or foo2 detail template, depending upon which module you are displaying a detail view for. Of course you have to double check the parameter names for each module.
And your URLS and canonical URLS will be nice and pretty too. And Images using CGSmartImage will have a maximum width of 500 pixels on all of the pages that the hint is used on.
You can put some standard 'hints' into your page template (or a GCB that is called by your page template)
{cge_module_hint module=Products pagelimit=10 detailpage=details}
{cge_module_hint module=CGBlog pagelimit=10 detailpage=details}
{cge_module_hint module=CGSmartImage max_width=500}
...
Then in your 'details' page, in addition to the above hints you could put something like
{cge_module_hint module=Products detailtemplate=foo1}
{cge_module_hint module=CGBlog detailtemplate=foo2}
Then if you call {Products} or {CGBlog} say in a sidebar. it will use those parameters, limit the number of entries per page, redirect all detail links to the 'details' page and on that page use the foo1 or foo2 detail template, depending upon which module you are displaying a detail view for. Of course you have to double check the parameter names for each module.
And your URLS and canonical URLS will be nice and pretty too. And Images using CGSmartImage will have a maximum width of 500 pixels on all of the pages that the hint is used on.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: Products detailtemplate
Hi,
another big thanks!
I think I will certainly use this.
The shop for "left over parts" and some new USP's
is http://www.control-engineering.at
I used smarty and your field-type "quantity on hand" to make a combination of products with and without a stock-amount, those without are always delivered by backorder.
Tommorow we will discuss if there will be more adjustments but the shop is life and functional.
shop old / shop alt
will disappear
Kind regards,
Jan
another big thanks!
I think I will certainly use this.
The shop for "left over parts" and some new USP's
is http://www.control-engineering.at
I used smarty and your field-type "quantity on hand" to make a combination of products with and without a stock-amount, those without are always delivered by backorder.
Tommorow we will discuss if there will be more adjustments but the shop is life and functional.
shop old / shop alt
will disappear
Kind regards,
Jan