Pages:

"View All" products link

Maciej

No avatar

2009-01-19 04:06

How do I add a "view all" link after the page numbers at the bottom of my products pages?

» Quick.Cart v2.x

-M

treewood (OpenSolution)

Avatar: treewood

2009-01-19 08:11

you want display all products without pagination yes ?

Maciej

No avatar

2009-01-20 17:01

My website displays 12 products per page. If there are more than 12 products, there are additional pages, which are displayed as links at the bottom of the website (Pages 1 2 3 4). I want to add a "View All" link after the page numbers so you can view all the products at once (Pages 1 2 3 4 View All).

Thanks Treewood.

-M

treewood (OpenSolution)

Avatar: treewood

2009-01-21 08:04

edit templates/products_list.tpl and find: LIST_FOOT
change $aList[sPages]</div>
to: $aList[sPages] <a href="?p=productsList&all=true">View all</a></div>

After edit actions_client/products.php and change
$sProductsList = listProducts( 'products_list.tpl' );
to:
$iList = isset( $_GET['all'] ) ? 999 : null;
$sProductsList = listProducts( 'products_list.tpl', $iList );

ntr23

Avatar: ntr23

2009-01-25 00:55

I have QC3.2 and tere is no file templates/products_list.tpl

thanks

Maciej

No avatar

2009-01-25 04:43

Thanks Treewood, that works well but not exactly how I want it to work. Instead of showing ALL the products, I would like to just show the products in that particular category. For example, you are in category "Sofas" and when you click "View All" only the products in the sofa category are returned...

-M

treewood (OpenSolution)

Avatar: treewood

2009-01-26 08:36

Maciej - edit templates/products_list.tpl and find: LIST_FOOT
change $aList[sPages]</div>
to: $aList[sPages] <a href="?p=$p&all=true">View all</a></div>

After edit actions_client/products.php and index.php and change
$sProductsList = listProducts( 'products_list.tpl' );
to:
$iList = isset( $_GET['all'] ) ? 999 : null;
$sProductsList = listProducts( 'products_list.tpl', $iList );

ntr23

Avatar: ntr23

2009-01-26 10:21

trenwood> can you help me what i must change, when in templates is not products_list.tpl file?

thanks

Maciej

No avatar

2009-01-28 01:48

Treewood, the code still does not work correctly... Now it only returns "Page 1" of the products under the "sofa" category. I would like for it to return all pages, meaning all sofa products on ONE page.

-M

treewood (OpenSolution)

Avatar: treewood

2009-01-28 07:42

Maciej did you change code in index.php too ?

Maciej

No avatar

2009-01-29 01:02

Thanks... WORKS GREAT!

-M

Shadow

No avatar

2009-02-11 02:49

Hello :)

just one quick question...

how do i insert "|" between the page numbers? i mean 1 | 2 | 3 | 4 | 5 | and so on?

just tried to edit products_list.tpl but nothing...

thanks for your help,
artur

treewood (OpenSolution)

Avatar: treewood

2009-02-11 08:11

Shadow - edit core/products.php and find function listProducts(), and change this:
$aData['sPages'] = countPages( $iCount, $iList, $iPageNumber, $oPage->aPages[$iContent]['sLinkName'], $sUrlExt );
to:
$aData['sPages'] = countPages( $iCount, $iList, $iPageNumber, $oPage->aPages[$iContent]['sLinkName'], $sUrlExt, null, '|' );

Shadow

No avatar

2009-02-11 19:52

ohhh ok treewood, thanks for your help :)

Terespl

Avatar: Terespl

2010-04-03 13:07

If I set page containing products as default page, then "view all products" (/&bViewAll=true) link doesn't work (page not found), if I go to 2nd page and then clik "view all products" link everything is ok.
It happens only if click "view all" from the start page.
I have "products in row" plugin installed.

Quick.Cart 3.5 free

Thanks,
Tomek

beholder

Avatar: beholder

2010-04-03 14:53

I just tested this with demo on the opensolution.org and it works ok. Please show us the exact URL that doesn't work.

Terespl

Avatar: Terespl

2010-04-04 08:51

I have also tested demo and everything works fine, however I don't know why it doesn't work on my site.
http://koszulemeskie.eu

fuse

Avatar: fuse

2010-04-04 12:17

po wybraniu linku "Zobacz wszystkie" na Twojej stronie adres jest taki:
http://koszulemeskie.eu/&bViewAll=true

a powinien być:

http://koszulemeskie.eu/?&bViewAll=true

dopisz znak zapytania w pasku adresu przeglądarki, a zobaczysz, że zadziała

maciek

Terespl

Avatar: Terespl

2010-04-05 12:26

There's a problem with "Products in row" plugin, in it's code "view all" link is coded as:

<a href="$_SERVER[REQUEST_URI]&amp;bViewAll=true">$lang['View_all']</a


it should be:

<a href="$_SERVER[REQUEST_URI]$config[before_amp]&amp;bViewAll=true">$lang['View_all']</a&g t;



everything is working fine now.

Dzięki za pomoc fuse,
Tomek

Terespl

Avatar: Terespl

2010-04-05 12:27

it should be:

<a href="$_SERVER[REQUEST_URI]$config[before_amp]&amp;bViewAll=true">$lang['View_all']</a&g t;

Pages:
Back to top
about us | contact