Jump to content

"view all" products in category


Guest

Recommended Posts

Anyone have any luck adding a "view all" link to the category page paganation?

for example:

4 pages [1] 2 3 > » view all

I've been getting tons of requests from customers asking for that. Seems like a useful addition. Any help would be most apreciated.

Link to comment
Share on other sites

If you're a coder, the place to do this will be in classes/db.inc.php where the pagination function is defined and the navigation is coded. I haven't tried this, but I went in recently and added some text links for the pagination at this site: http://www.justwhat-iwant.co.uk/

BTW, the installation forum is not the place for these type discussions, try the skins forum si9nce this is a front-end function tweak :(

Link to comment
Share on other sites

Anyone have any luck adding a "view all" link to the category page paganation?

for example:

4 pages [1] 2 3 > » view all

I've been getting tons of requests from customers asking for that. Seems like a useful addition. Any help would be most apreciated.

As Mark mentioned the right place to do it howver this is simple hack out of function:

viewCat.inc.php

SEARCH FOR

$productResults = $db->select($productListQuery, $config['productPages'], $page);




ADD BEFORE IT


// View All by convict -->

if ($page === "all") {

	$config['productPages'] = $db->numrows($productListQuery);

	$page = 0;

} elseif ($config['productPages'] < $db->numrows($productListQuery)) {

	$view_cat->assign("CAT_ID",$_GET['catId']);

	$view_cat->parse("view_cat.view_all");

}

// <-- View All by convict




viewCat.tpl



SEARCH FOR




<div class="pagination">{PAGINATION}</div>




REPLACE WITH




<div class="pagination">{PAGINATION} <!-- BEGIN: view_all --><a href="index.php?page=all&amp;act=viewCat&amp;catId={CAT_ID}" class="txtLink">view all</a><!-- END: view_all --></div>

Have fun!

Link to comment
Share on other sites

Nice one, convict!

Only thing I notices is that if I replace the pagination part at both top and bottom of the column (replacing both instances of the original tag), for some reason the "view all" link appears twice as "view allview all"?

Would be nice to include it in both places so if a customer looks at the first page and then decides to view all, he can do so from the bottom without scrolling back up.

(and moved to skins & templates)

Link to comment
Share on other sites

Nice one, convict!

Only thing I notices is that if I replace the pagination part at both top and bottom of the column (replacing both instances of the original tag), for some reason the "view all" link appears twice as "view allview all"?

Would be nice to include it in both places so if a customer looks at the first page and then decides to view all, he can do so from the bottom without scrolling back up.

(and moved to skins & templates)

Well the reason of such behaviour is twin template sections. You have to use different name for bottom section name in paginate area like <!-- BEGIN view_all2 --> and <!-- END view_all2 --> and add

$view_cat->parse("view_cat.view_all2");

just after

$view_cat->parse("view_cat.view_all");

:(

@Mark :)

Link to comment
Share on other sites

  • 4 weeks later...

Thanks for the advice.

How would I go about adding styles and images for the next and previous button, and possibly each page number.

Link to comment
Share on other sites

  • 1 month later...
Guest jrobertblack

I am using this for the main category section, so it brings in all the subcategories on the main category page, but when a product is in two sub categories then the view all brings two of the same products on the same page, it there any way to fix this.

Thanks

Link to comment
Share on other sites

  • 5 weeks later...
Guest jrobertblack

Also when you do a search, then click view all it brings up the whole store not just the items you searched for, is there any fix for this

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...