Forums / All Other Contributions/Addons / Set number of products displayed per page (support thread)

Set number of products displayed per page (support thread)

Views: 37,000

Results 121 to 140 of 148
26 Apr 2014, 10:36 PM
#121
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Set number of products displayed per page (support thread)

Also, the last call to draw_max_ppp in tpl_modules_product_listing.php is not wrapped in a select call as previous ones are. Suspect this is a bug.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

27 Apr 2014, 8:40 AM
#122
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Set number of products displayed per page (support thread)

swguy:

Another thing I noticed was that when the "Items per page" selection was made into a dropdown, it seemed to clobber the next/previous links. I think this might be reproduceable on your test site if you set PRODUCT_LISTING_DISPLAY_OPTION to true and look at this page:

http://zcadditions.com/24/index.php?main_page=advanced_search_result&search_in_description=1&keyword=price

Not sure what you mean by clobber - may have to do with below reply

swguy:

Also, the last call to draw_max_ppp in tpl_modules_product_listing.php is not wrapped in a select call as previous ones are. Suspect this is a bug.

I made an additional copy/paste error, my demo has altered code for the purpose of showing both links and drop-down and on the second section for the bottom I did not change the DEMO to actual ADMIN CONFIG

find:

<?php if (PRODUCT_LISTING_DISPLAY_OPTION_DEMO == 'true') { ?>

change to:

<?php if (PRODUCT_LISTING_DISPLAY_OPTION == 'true') { ?>
27 Apr 2014, 8:51 AM
#123
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Set number of products displayed per page (support thread)

swguy:

Also, the last call to draw_max_ppp in tpl_modules_product_listing.php is not wrapped in a select call as previous ones are. Suspect this is a bug.

Also

1st call to draw_max_ppp is for top drop-down
2nd call to draw_max_ppp is for top links
3rd call to draw_max_ppp is for bottom drop-down
4th/last call to draw_max_ppp is for bottom links

2nd and 4th/last should not be wrapped in a select call for they are links.

27 Apr 2014, 10:59 AM
#124
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: Set number of products displayed per page (support thread)

When I said "clobber" I meant "the next/prev links do not appear."

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

27 Apr 2014, 8:00 PM
#125
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Set number of products displayed per page (support thread)

swguy:

When I said "clobber" I meant "the next/prev links do not appear."

Gotcha, the previous post to fix admin if config should
take care of that.

22 May 2014, 12:08 AM
#126
danielle avatar

danielle

Totally Zenned

Join Date:
Oct 2004
Posts:
973
Plugin Contributions:
0

Re: Set number of products displayed per page (support thread)

Were you ever able to solve this?

rbarbour:

Yes it is CEON URI mapping. I revamped a product listing page here: www[DOT]aydincoins[DOT]com/buy-silver/american-silver-eagles/2011-prior-year-silver-eagles-uncirculated**?**sort=20a&max_display=6

and had to correct the code within CEON URI mapping.

I can not remember what I did off the top of my head. I do remember CEON URI mapping wasn't replacing / with ?sort=20a

I will look through my notes unless someone else can provide the answer before I do.

Danielle

24 May 2014, 10:02 PM
#127
khuna avatar

khuna

New Zenner

Join Date:
Jan 2013
Posts:
10
Plugin Contributions:
0

Re: Set number of products displayed per page (support thread)

I have successfully installed this add-on on another site but I have been trying to install it on a new site numerous times with the same result. When installed and I reload my page (cart), the entire page is blank. I have narrowed the issue down to the set_num_products_dd.php page. When I remove it, my page is back again but I don't get the set number of products drop down. Any ideas?

25 May 2014, 12:20 AM
#128
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: Set number of products displayed per page (support thread)

When you get a blank page, a log is created in the logs directory (1.5.1) or the cache directory (prior releases). Please post the contents of that log.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

25 May 2014, 12:42 AM
#129
khuna avatar

khuna

New Zenner

Join Date:
Jan 2013
Posts:
10
Plugin Contributions:
0

Re: Set number of products displayed per page (support thread)

swguy:

When you get a blank page, a log is created in the logs directory (1.5.1) or the cache directory (prior releases). Please post the contents of that log.

Sure:

Invalid arguments passed in .../includes/templates/skate01/templates/tpl_index_product_list.php on line 61

Which seems odd since line 61 is just one of the stock lines and I haven't changed it:
61 // draw music_genre_id
if (isset($_GET['music_genre_id']) && $_GET['music_genre_id'] != '') echo zen_draw_hidden_field('music_genre_id', $_GET['music_genre_id']);

25 May 2014, 4:36 AM
#130
khuna avatar

khuna

New Zenner

Join Date:
Jan 2013
Posts:
10
Plugin Contributions:
0

Re: Set number of products displayed per page (support thread)

My mistake, I was looking at my oldest log entry. The ones I was getting today was database related. [24-May-2014 14:14:57] PHP Fatal error: 0:DB_ERROR_NOT_CONNECTED :: select * from zen_project_version WHERE project_version_key = 'Zen-Cart Database' in .../includes/classes/db/mysql/query_factory.php on line 120

khuna:

Sure:

Invalid arguments passed in .../includes/templates/skate01/templates/tpl_index_product_list.php on line 61

Which seems odd since line 61 is just one of the stock lines and I haven't changed it:
61 // draw music_genre_id
if (isset($_GET['music_genre_id']) && $_GET['music_genre_id'] != '') echo zen_draw_hidden_field('music_genre_id', $_GET['music_genre_id']);

25 May 2014, 11:19 AM
#131
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: Set number of products displayed per page (support thread)

Does this add on include the file "application_top.php" ? It sounds like that might be what's missing.

require('includes/application_top.php');

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

25 May 2014, 3:52 PM
#132
khuna avatar

khuna

New Zenner

Join Date:
Jan 2013
Posts:
10
Plugin Contributions:
0

Re: Set number of products displayed per page (support thread)

No swguy, that file was not included in the download. Where would it reside in case I already have it?

25 May 2014, 4:11 PM
#133
khuna avatar

khuna

New Zenner

Join Date:
Jan 2013
Posts:
10
Plugin Contributions:
0

Re: Set number of products displayed per page (support thread)

SWGUY, I missed my 7 minute window to edit my post after sending. I realized that application-top.php is a core file but there was no edit for this file in the add-on package.

25 May 2014, 4:56 PM
#134
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Set number of products displayed per page (support thread)

swguy:

Does this add on include the file "application_top.php" ? It sounds like that might be what's missing.

require('includes/application_top.php');

khuna:

SWGUY, I missed my 7 minute window to edit my post after sending. I realized that application-top.php is a core file but there was no edit for this file in the add-on package.

This addon does not alter the application-top.php file.

Do you have a link to your site www [dot] nameofsite [dot] com

25 May 2014, 5:10 PM
#135
khuna avatar

khuna

New Zenner

Join Date:
Jan 2013
Posts:
10
Plugin Contributions:
0

Re: Set number of products displayed per page (support thread)

http://gkoutdoors.com

Right now, I have everything in the mod installed except for set_num_product_dd.php. When I put that back in my whole site goes blank.

25 May 2014, 5:25 PM
#136
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Set number of products displayed per page (support thread)

OK, the newest version doesn't include set_num_product_dd.php.

In the previous version, located in /includes/functions/extra_functions:

To use as links, upload set_num_product.php

or

To use as dropdown, upload set_num_product_dd.php

You most likely uploaded both set_num_product_dd.php and set_num_product.php, you need to delete one or the other.

or completely uninstall and download newest version which merged the 2 function files, adds a site wide session and CSS styling to the links version.

khuna:

http://gkoutdoors.com

Right now, I have everything in the mod installed except for set_num_product_dd.php. When I put that back in my whole site goes blank.

25 May 2014, 6:46 PM
#137
khuna avatar

khuna

New Zenner

Join Date:
Jan 2013
Posts:
10
Plugin Contributions:
0

Re: Set number of products displayed per page (support thread)

Thanks Rbarbour, I did download them both. I corrected and it worked...mostly. I tried to set my steps at 15,30,45,60,90,All but could never get it past 45. It will only display 15,30,45,All.

25 May 2014, 9:08 PM
#138
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Set number of products displayed per page (support thread)

I just looked at your products listing pages and all seems to be working correctly.

Only thing I saw was that category 3_7 (Air Rifles) had 88 products and jumped from 60 to All, simply changing 15,30,45,60,90,All to 15,30,45,60,75,90,All will allow one more step (75)

khuna:

Thanks Rbarbour, I did download them both. I corrected and it worked...mostly. I tried to set my steps at 15,30,45,60,90,All but could never get it past 45. It will only display 15,30,45,All.

26 May 2014, 1:18 AM
#139
khuna avatar

khuna

New Zenner

Join Date:
Jan 2013
Posts:
10
Plugin Contributions:
0

Re: Set number of products displayed per page (support thread)

Yes, thanks again! This is a great add-on, should be added as "standard equipment" with the basic zencart. I appreciate all your work and support.

24 Jun 2014, 1:10 AM
#140
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Set number of products displayed per page (support thread)

Version 1.3a was just uploaded

Bug Fix - Changed ADMIN CONFIG to match what was added to configuration. Post #122

Display Fix - Added existing class "back" so the links/drop-down doesn't clobber the next/previous links. Post #120

Clean Up - Cleaned up the code in Example File (/includes/templates/YOUR_TEMPLATE_NAME/templates/tpl_modules_product_listing.php) for easier merging.

You can see the DEMO & DOWNLOAD here while you wait for it to be approved.