Forums / All Other Contributions/Addons / Products Pagination - Support Thread

Products Pagination - Support Thread

Views: 30,016

Results 21 to 40 of 159
10 Jul 2012, 7:35 AM
#21
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Products Pagination - Support Thread

marypotter:

In this image: http://www.catchmyfame.com/paginator/example.php

It allows the user to choose how many products per page via a dropdown. Does this module offer that? I installed it and didn't see it as an option. I'm hoping I just overlooked it. But if not, could you help point me in the direction of creating those dropdowns?

I appreciate it.
The functionality that you describe is not (currently) supported by this plugin, but I'll look at what it would take to implement the dropdown.

28 Aug 2012, 12:56 PM
#22
olcs avatar

olcs

New Zenner

Join Date:
Dec 2011
Posts:
92
Plugin Contributions:
0

Re: Products Pagination - Support Thread

lat9:

The functionality that you describe is not (currently) supported by this plugin, but I'll look at what it would take to implement the dropdown.

Hi,

Did you ever find a solution to this please? This would be a really great feature to have, whereby a customer could select how many products they wish to see on a particular page.

Thanks

28 Aug 2012, 11:14 PM
#23
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Products Pagination - Support Thread

I'll put the feature higher on my to-do list ...

29 Aug 2012, 6:59 PM
#24
olcs avatar

olcs

New Zenner

Join Date:
Dec 2011
Posts:
92
Plugin Contributions:
0

Re: Products Pagination - Support Thread

That's great thank you. Look forward to it!

2 Sep 2012, 3:00 PM
#25
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Products Pagination - Support Thread

I've submitted v1.3.0 to the Plugins area this morning to add controls for (a) a drop-down menu through which the customer can go to a specific page of the display and (b) control the number of items displayed per page.

If you are upgrading this plugin, make a note of your current Configuration->Product Pagination settings **before **you run the updated installation SQL script. The script will add three additional configuration switches that are required to enable the new functionality.

3 Sep 2012, 3:38 PM
#26
olcs avatar

olcs

New Zenner

Join Date:
Dec 2011
Posts:
92
Plugin Contributions:
0

Re: Products Pagination - Support Thread

lat9:

I've submitted v1.3.0 to the Plugins area this morning to add controls for (a) a drop-down menu through which the customer can go to a specific page of the display and (b) control the number of items displayed per page.

If you are upgrading this plugin, make a note of your current Configuration->Product Pagination settings **before **you run the updated installation SQL script. The script will add three additional configuration switches that are required to enable the new functionality.

That's fantastic news. Thank you so much! Can't wait to try it out.

9 Sep 2012, 1:54 PM
#27
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Products Pagination - Support Thread

v1.3.0 is now available in the Plugins area ...

22 Sep 2012, 4:41 AM
#28
kamelion0927 avatar

kamelion0927

Zen Follower

Join Date:
Dec 2009
Posts:
208
Plugin Contributions:
1

Re: Products Pagination - Support Thread

Fabulous mod, thanks!

Just a quick question - is it normal for the "items per page" to revert to the default numbers of items per page when the prev/next buttons are pushed or a different page is chosen?

For example, I chose 50 items per page and the first 50 items are shown. When I either push the next button or choose page 2 from the drop down, it goes to page 2, but it only shows items 11-20.

I hope that makes sense. The page I'm testing it on is http://www. burningbutterfly.com/index.php?main_page=faqs_all&disp_order=3&page=2

Thanks in advance!

22 Sep 2012, 11:54 AM
#29
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Products Pagination - Support Thread

Darn it! I was sure that I tested and included code to handle that case ... but it's definitely not working. I'll post here when I've got a fix.

22 Sep 2012, 5:55 PM
#30
kamelion0927 avatar

kamelion0927

Zen Follower

Join Date:
Dec 2009
Posts:
208
Plugin Contributions:
1

Re: Products Pagination - Support Thread

You got a %#$% of lot further than most - this is something that's been requested for a while but no one has buckled down and figured out. We just appreciate all your hard work :)

24 Sep 2012, 12:09 PM
#31
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Products Pagination - Support Thread

Thanks for the kind words. I've submitted v1.4.1 of the plugin for review; I'm guessing that it will be available this weekend. This version corrects the item-count reset (turns out changing the item-count also reset the sort-order; that's fixed, too). Three additional override files are added to the "mix":

/includes/init_includes/overrides/init_canonical.php
/includes/templates/YOUR_TEMPLATE/templates/tpl_index_product_list.php
/includes/templates/YOUR_TEMPLATE/templates/tpl_modules_listing_display_order.php

and the *pagecount * value was modified to be a GET variable instead of a POST variable (that's mostly where all the changes came from).

25 Sep 2012, 12:21 PM
#32
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Products Pagination - Support Thread

v1.4.1 is now available in the Plugins area ...

25 Sep 2012, 6:28 PM
#33
olcs avatar

olcs

New Zenner

Join Date:
Dec 2011
Posts:
92
Plugin Contributions:
0

Re: Products Pagination - Support Thread

lat9:

v1.4.1 is now available in the Plugins area ...

Hi Lat9,

Thank you so much for this fantastic plug in! I have installed an earlier version of this plugin and now wish to update to this latest version. Is it a case of:

  1. Run the sql file included with the new install files

  2. Upload all the new files, over writing any already there. Over write or merge the core file (depending on whether I have already modified it for another purpose)

Or do I need to run the uninstall sql file first and then the sql file from the update?

Would appreciate any help you can give.

Many thanks

25 Sep 2012, 7:16 PM
#34
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Products Pagination - Support Thread

OLCS, first step is always to make a full backup of your database and files ... s**t happens!

If your previous version was 1.3.0 or later then you don't need to re-run the SQL install file. Otherwise, make a note of any changes you've made to your Configuration->Product Pagination, re-run the SQL patch and then make sure that your Configuration->Product Pagination settings are what you want. Note that the new fields default to false (i.e. no page drop-down, no item-count drop-down).

The readme.html file identifies each of the files added/modified by the plugin. Unless you are positive that only this plugin has changed a particular file currently used by your store (whether core file or template-override file), you should use a file-comparison tool like WinMerge to ensure that you are not losing function by simply copying/overwriting your existing files.

25 Sep 2012, 7:50 PM
#35
olcs avatar

olcs

New Zenner

Join Date:
Dec 2011
Posts:
92
Plugin Contributions:
0

Re: Products Pagination - Support Thread

Many thanks for your advice Lat9, very much appreciated, and thanks for all your hard work with this plugin.

26 Sep 2012, 12:54 AM
#36
kamelion0927 avatar

kamelion0927

Zen Follower

Join Date:
Dec 2009
Posts:
208
Plugin Contributions:
1

Re: Products Pagination - Support Thread

Works like a charm - thanks!

1 Oct 2012, 7:11 AM
#37
produced avatar

produced

New Zenner

Join Date:
Jul 2012
Location:
Russia, Kazan
Posts:
6
Plugin Contributions:
0

Re: Products Pagination - Support Thread

Good afternoon. Thanks, very good plugin.
But there is one problem, at display of quantity of displayed elements searching. If on page advanced_search_result to change quantity of displayed elements to other quantity, leads to search reset.
Here example --> http://www.perchinkastyle.ru/index.php?main_page=advanced_search_result&keyword=%D0%B8%D0%B3%D1%80%D1%83%D1%88%D0%BA%D0%B0&search_in_description=1&categories_id=&inc_subcat=1&manufacturers_id=&pfrom=&pto=&dfrom=&dto=&x=0&y=0

1 Oct 2012, 12:09 PM
#38
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Products Pagination - Support Thread

Yikes! Thanks for the report. Here's an update to the ppCountDropdown function in /includes/functions/extra_functions/products_pagination_functions.php that corrects the problem. Note that two extra functions have been "broken out":```
function ppCountDropdown ($numItems) {
global $getoption_set, $get_option_variable, $cPath; // Used on product-listing/index page
$dropdown = '';
$countArray = explode(',', PRODUCTS_PAGINATION_COUNT_VALUES);
if (count($countArray) > 0) {
$pageArray = array();
for ($i=0, $n=sizeof($countArray); $i<$n; $i++) {
if ($countArray[$i] == '*') {
$pageArray[] = array( 'id' => 'all', 'text' => PP_TEXT_ALL );
} elseif ($numItems > $countArray[$i]) {
$pageArray[] = array( 'id' => $countArray[$i], 'text' => $countArray[$i]);
}
}
$whichCount = (isset($_GET['pagecount'])) ? $_GET['pagecount'] : '';

$formPage  = ($_GET['main_page'] == FILENAME_ADVANCED_SEARCH_RESULT) ? FILENAME_ADVANCED_SEARCH : $_GET['main_page']; /*v1.4.2-c-lat9*/
$dropdown  = '<div class="pp_count">' . zen_draw_form('pp_count_form', zen_href_link($_GET['main_page']), 'get') . zen_hide_session_id() . zen_draw_hidden_field ('main_page', $_GET['main_page']);

$hiddenVar = ppHiddenVarsList(); /*v1.4.2-c-lat9: Moved to separate function */

if ($_GET['main_page'] == FILENAME_DEFAULT) {
  if (!$getoption_set) {
    $dropdown .= zen_draw_hidden_field('cPath', $cPath);
  } else {
    // draw manufacturers_id
    $dropdown .= zen_draw_hidden_field($get_option_variable, $_GET[$get_option_variable]);
  }
  if ($get_option_variable != 'manufacturers_id' && isset($_GET['manufacturers_id']) && $_GET['manufacturers_id'] > 0) {
    $hiddenVar[] = 'manufacturers_id';
  }
}

$dropdown .= ppCreateHiddenInputs ($hiddenVar);  /*v1.4.2-c-lat9: Moved to separate function */

$dropdown .= PP_TEXT_ITEMS_PER_PAGE . zen_draw_pull_down_menu ('pagecount', $pageArray, $whichCount, 'onchange="this.form.submit();"') .  '</form></div>';

}
return $dropdown;
}

function ppHiddenVarsList() {
return explode (',', 'disp_order,sort,filter_id,music_genre_id,record_company_id,typefilter,keyword,search_in_description,categories_id,inc_subcat,manufacturers_id,pfrom,pto,dfrom,dto,alpha_filter_id'); /v1.4.2-c-lat9/
}

function ppCreateHiddenInputs ($hiddenVar) {
$inputVars = '';
foreach ($hiddenVar as $varName) {
$inputVars .= (isset($_GET[$varName]) ? zen_draw_hidden_field ($varName, $_GET[$varName]) : '');
}
return $inputVars;
}


For the full correction, you'll need to replace /include/templates/YOUR_TEMPLATE/templates/tpl_modules_listing_display_order.php with the following:
<?php /** * Module Template * * @package templateSystem * @copyright Copyright 2003-2006 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: tpl_modules_listing_display_order.php 3369 2006-04-03 23:09:13Z drbyte $ */ ?> <?php // NOTE: to remove a sort order option add an HTML comment around the option to be removed ?> <div id="sorter"> <label for="disp-order-sorter"><?php echo TEXT_INFO_SORT_BY; ?></label> <?php echo zen_draw_form('sorter_form', zen_href_link($_GET['main_page']), 'get'); echo zen_draw_hidden_field('main_page', $_GET['main_page']); echo zen_draw_hidden_field('pagecount', $_GET['pagecount']); // echo zen_draw_hidden_field('disp_order', $_GET['disp_order']); /*-bof-product_pagination-lat9*/ if (function_exists('ppHiddenVarsList') && function_exists('ppCreateHiddenInputs')) { echo ppCreateHiddenInputs (ppHiddenVarsList ()); } /*-eof-product_pagination-lat9*/ echo zen_hide_session_id(); ?> <select name="disp_order" onchange="this.form.submit();" id="disp-order-sorter"> <?php if ($disp_order != $disp_order_default) { ?> <option value="<?php echo $disp_order_default; ?>" <?php echo ($disp_order == $disp_order_default ? 'selected="selected"' : ''); ?>><?php echo PULL_DOWN_ALL_RESET; ?></option> <?php } // reset to store default ?> <option value="1" <?php echo ($disp_order == '1' ? 'selected="selected"' : ''); ?>><?php echo TEXT_INFO_SORT_BY_PRODUCTS_NAME; ?></option> <option value="2" <?php echo ($disp_order == '2' ? 'selected="selected"' : ''); ?>><?php echo TEXT_INFO_SORT_BY_PRODUCTS_NAME_DESC; ?></option> <option value="3" <?php echo ($disp_order == '3' ? 'selected="selected"' : ''); ?>><?php echo TEXT_INFO_SORT_BY_PRODUCTS_PRICE; ?></option> <option value="4" <?php echo ($disp_order == '4' ? 'selected="selected"' : ''); ?>><?php echo TEXT_INFO_SORT_BY_PRODUCTS_PRICE_DESC; ?></option> <option value="5" <?php echo ($disp_order == '5' ? 'selected="selected"' : ''); ?>><?php echo TEXT_INFO_SORT_BY_PRODUCTS_MODEL; ?></option> <option value="6" <?php echo ($disp_order == '6' ? 'selected="selected"' : ''); ?>><?php echo TEXT_INFO_SORT_BY_PRODUCTS_DATE_DESC; ?></option> <option value="7" <?php echo ($disp_order == '7' ? 'selected="selected"' : ''); ?>><?php echo TEXT_INFO_SORT_BY_PRODUCTS_DATE; ?></option> </select></form></div> ``` I'll get v1.4.2 submitted to the Plugins area later this week.
1 Oct 2012, 12:37 PM
#39
produced avatar

produced

New Zenner

Join Date:
Jul 2012
Location:
Russia, Kazan
Posts:
6
Plugin Contributions:
0

Re: Products Pagination - Support Thread

Thanks, error it is corrected. You did good operation!