Page 1 of 1

Products detailpage template not working

Posted: Sat Nov 02, 2019 10:18 am
by vhaakman
Hi,

I'm having the same problem as described here. I got excited when finally the solution showed in the last post, but for some reason it was edited out. I can't respond to that post anymore. So here's a new one.

Original post:
viewtopic.php?f=28&t=78690

Long story short: I want various detailpages for various categories of products. It seems that if you state: {products detailpage="foo"} it just doesnt listen to that and goes to the default page, or itself if no default is set.

The question is: how can I solve that? Thanks in advance!

Also, I redirected to another page by making it the default page in the products module, to see if I could change detailtemplate on that page giving a module_hint as Calguy suggested in the original threat, but that didn't work either. Yes, I checked, and I was on the actual page.

Using CMSMS 2.2.12 and product 2.28.7

Re: Products detailpage template not working

Posted: Sun Nov 03, 2019 10:15 am
by vhaakman
ok, resolved this with a bit of smarty:

{if $smarty.server.HTTP_REFERER|strstr:'Bread'}
{cms_module_hint module='Products' detailtemplate='Products Detail View bread'}
{else}
{cms_module_hint module='Products' detailtemplate='Products Detail View buns'}
{/if}

with this solution you can even use Pretty URL's.

Re: Products detailpage template not working

Posted: Thu Jan 28, 2021 7:06 am
by sbupravi
Sometimes a "detailpage" is needed. For example - for multilang MLE... But detailpage doesn't work?