Page 1 of 1

[SOLVED] Products module view all link?

Posted: Fri Mar 04, 2016 8:16 pm
by magallo
Hi All,
does anyone know how to create a link to show all the products in a category?
I have the pagination to scroll between pages but it would be very useful to be able to click on a "view all" link that will simply overwrite the pagination and show all.

Thanks for the help.

Re: Products module view all link?

Posted: Fri Mar 04, 2016 9:13 pm
by velden
Have a look at the 'cms_action_url' tag (CMSMS 2.x) or CGSimpleSmarty module's 'module_action_link' method (CMSMS 1.x).

Then make sure you use the 'pagelimit' parameter on the regular {Products ...} calls and in Products preferences set 'Default page limit in summary mode' to something disabling the feature (try -1,0 or a very high number).

Re: Products module view all link?

Posted: Wed Mar 09, 2016 10:11 pm
by magallo
I'm not really sure how to use the CGSimpleSmarty module's 'module_action_link' method (CMSMS 1.x) so i came up with this workaround:

in the page template:
{assign var='pagecat' value=$smarty.get.cat}
{if $pagecat}
{Products category=$pagecat pagelimit="1000" }
{else}
{Products pagelimit="16" }
{/if}

in the pagination:
<a href="/view-all?cat={$valCatName}">View All</a>