Zen Cart Logo

"View All" link

Views: 24,240

Results 21 to 40 of 46
18 Jun 2007, 3:41 PM
#21
doodlebee avatar

doodlebee

Inactive

Join Date:
Jan 2006
Posts:
228
Plugin Contributions:
0

"View All" link

I have this working on one site - but now I'm doing a new one and using this again. I must have a setting in the old site that's different in this new one, because no matter how I set the display, it'll only show 12 items.

In my admin area, I have it set to display 12 items max - which it does - but when I use this script and choose "View All", it still only shows 12 items.

Could someone nudge me towards whatever I'm forgetting to do here? :)

24 Aug 2007, 6:06 PM
#22
helpme avatar

helpme

Totally Zenned

Join Date:
Apr 2007
Posts:
632
Plugin Contributions:
0

Re: "View All" link

I tried this but I don't think I had the defines correct. When I did it, it came up with two lines of page 1, 2, 3, 4, etc and two lines of Displaying 1 to 10 (of 34 products)
And when I hit the view all link it took off all my items.
Any idea what I did wrong?
Thanks

17 Feb 2008, 12:24 AM
#23
modernm avatar

modernm

New Zenner

Join Date:
Dec 2007
Location:
Hoboken, NJ
Posts:
97
Plugin Contributions:
1

Re: "View All" link

I was able to get the changes on my site and display everything as expected. The only issue is no matter what option I choose I am always restricted to 9 items. Can you confirm that the following URL would work in 1.3.8a?

/index.php?main_page=index&cPath=53&override=more

Specifically the "override=more" parameter.

:cool:

18 Feb 2008, 9:11 PM
#24
modernm avatar

modernm

New Zenner

Join Date:
Dec 2007
Location:
Hoboken, NJ
Posts:
97
Plugin Contributions:
1

Re: "View All" link

I was able to come up with something using information I found on this forum. For the next person that is looking for a view all option, you can use the follow code and it will work in both category and manufacturer sections.

Replace the following code in tpl_modules_product_listing.php...

<div id="productsListingTopNumber" class="navSplitPagesResult back"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></div>
<div id="productsListingListingTopLinks" class="navSplitPagesLinks forward"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, zen_get_all_get_params(array('page', 'info', 'x', 'y', 'main_page'))); ?></div>

with...

<div id="productsListingTopNumber" class="navSplitPagesResult back"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></div>
<div id="productsListingListingTopLinks" class="navSplitPagesLinks forward"><?php if ($max_results < 99)
{
$linkstuff = zen_href_link(FILENAME_DEFAULT, zen_get_all_get_params(array('page', 'info', 'x', 'y'))) . '&viewall=99';
 echo '<a href="' . $linkstuff . '">[View all]</a>';
}


echo $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, zen_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></div>

You will also need to modify product_listing.php by adding...

$lookuptext = array('viewall=99');
foreach($lookuptext as $templut)
{
if(strpos($_SERVER["REQUEST_URI"], $templut)!==false)
{
$max_results = 99;
}
}

at the top of the page after...

$max_results = (PRODUCT_LISTING_LAYOUT_STYLE=='columns' && PRODUCT_LISTING_COLUMNS_PER_ROW>0) ? (PRODUCT_LISTING_COLUMNS_PER_ROW * (int)(MAX_DISPLAY_PRODUCTS_LISTING/PRODUCT_LISTING_COLUMNS_PER_ROW)) : MAX_DISPLAY_PRODUCTS_LISTING;

I am sure this isn't the best way of doing it but it works for me.

Cal

6 Mar 2008, 8:11 PM
#25
yenmax avatar

yenmax

New Zenner

Join Date:
Sep 2006
Posts:
89
Plugin Contributions:
0

Re: "View All" link

Hi
I want to add a new options on product_listing page. For [view all] which can be next to the page numbers how can i do it. My website is www.yenmax.com Please help

Thanks

25 Mar 2008, 1:58 AM
#26
dmacke avatar

dmacke

New Zenner

Join Date:
Jan 2008
Posts:
5
Plugin Contributions:
0

Re: "View All" link

Not sure if anyone is still maintaining this thread...but I wanted to say I was able to successfully implement the View All link using methods discussed.

It works swimmingly, but have problem with search.

When displaying the results of the search, the View All link is displayed, but it fails because URL for search is different than product info URL.

thoughts?

4 May 2008, 11:07 PM
#27
asdf avatar

asdf

New Zenner

Join Date:
Mar 2004
Posts:
3
Plugin Contributions:
0

Re: "View All" link

Hey guys.
I'm not going to give you any fancy explainations, I just hacked classes/split_page_results.php to give me a "Show all" button and it works flawlessy. I'm in a short amount of time here but as I'd love to contribute I'm going to paste my split_page_results.php as is.

<?php
/**
 * split_page_results Class.
 *
 * @package classes
 * @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: split_page_results.php 3041 2006-02-15 21:56:45Z wilt $
 */
if (!defined('IS_ADMIN_FLAG')) {
  die('Illegal Access');
}
/**
 * Split Page Result Class
 *
 * An sql paging class, that allows for sql reslt to be shown over a number of pages using  simple navigation system
 * Overhaul scheduled for subsequent release
 *
 * @package classes
 */
class splitPageResults extends base {
  var $sql_query, $number_of_rows, $current_page_number, $number_of_pages, $number_of_rows_per_page, $page_name;

  /* class constructor */
  function splitPageResults($query, $max_rows, $count_key = '*', $page_holder = 'page', $debug = false) {
    global $db;

    $this->sql_query = $query;
    $this->page_name = $page_holder;

    if ($debug) {
      echo 'original_query=' . $query . '<br /><br />';
    }
    if (isset($_GET[$page_holder])) {
      $page = $_GET[$page_holder];
    } elseif (isset($_POST[$page_holder])) {
      $page = $_POST[$page_holder];
    } else {
      $page = '';
    }

    if ($page == 'all') {
      $this->page_all = true;
      $override = $db->Execute($query);
      $max_rows = $override->RecordCount();
    }

    if (empty($page) || !is_numeric($page)) $page = 1;
    $this->current_page_number = $page;

    $this->number_of_rows_per_page = $max_rows;

    $pos_to = strlen($this->sql_query);

    $query_lower = strtolower($this->sql_query);
    $pos_from = strpos($query_lower, ' from', 0);

    $pos_group_by = strpos($query_lower, ' group by', $pos_from);
    if (($pos_group_by < $pos_to) && ($pos_group_by != false)) $pos_to = $pos_group_by;

    $pos_having = strpos($query_lower, ' having', $pos_from);
    if (($pos_having < $pos_to) && ($pos_having != false)) $pos_to = $pos_having;

    $pos_order_by = strpos($query_lower, ' order by', $pos_from);
    if (($pos_order_by < $pos_to) && ($pos_order_by != false)) $pos_to = $pos_order_by;

    if (strpos($query_lower, 'distinct') || strpos($query_lower, 'group by')) {
      $count_string = 'distinct ' . zen_db_input($count_key);
    } else {
      $count_string = zen_db_input($count_key);
    }
    $count_query = "select count(" . $count_string . ") as total " .
    substr($this->sql_query, $pos_from, ($pos_to - $pos_from));
    if ($debug) {
      echo 'count_query=' . $count_query . '<br /><br />';
    }
    $count = $db->Execute($count_query);

    $this->number_of_rows = $count->fields['total'];

    $this->number_of_pages = ceil($this->number_of_rows / $this->number_of_rows_per_page);

    if ($this->current_page_number > $this->number_of_pages) {
      $this->current_page_number = $this->number_of_pages;
    }

    $offset = ($this->number_of_rows_per_page * ($this->current_page_number - 1));

    // fix offset error on some versions
    if ($offset < 0) { $offset = 0; }

    $this->sql_query .= " limit " . $offset . ", " . $this->number_of_rows_per_page;
  }

  /* class functions */

  // display split-page-number-links
  function display_links($max_page_links, $parameters = '') {
    global $request_type;

    $display_links_string = '';

    $class = '';

    if (zen_not_null($parameters) && (substr($parameters, -1) != '&')) $parameters .= '&';

    if (!$this->page_all) $display_links_string .= '<a href="' . zen_href_link($_GET['main_page'], $parameters . $this->page_name . '=' . 'all', $request_type) . '" title=" ' . SHOW_ALL_TITLE . ' ">' . SHOW_ALL_BUTTON . '</a>  ';
    else $display_links_string .= '<a href="' . zen_href_link($_GET['main_page'], $parameters, $request_type) . '" title=" ' . SHOW_PAGEVIEW_TITLE . ' ">' . SHOW_PAGEVIEW_BUTTON . '</a>  ';

    // previous button - not displayed on first page
    if ($this->current_page_number > 1) $display_links_string .= '<a href="' . zen_href_link($_GET['main_page'], $parameters . $this->page_name . '=' . ($this->current_page_number - 1), $request_type) . '" title=" ' . PREVNEXT_TITLE_PREVIOUS_PAGE . ' ">' . PREVNEXT_BUTTON_PREV . '</a>  ';

    // check if number_of_pages > $max_page_links
    $cur_window_num = intval($this->current_page_number / $max_page_links);
    if ($this->current_page_number % $max_page_links) $cur_window_num++;

    $max_window_num = intval($this->number_of_pages / $max_page_links);
    if ($this->number_of_pages % $max_page_links) $max_window_num++;

    // previous window of pages
    if ($cur_window_num > 1) $display_links_string .= '<a href="' . zen_href_link($_GET['main_page'], $parameters . $this->page_name . '=' . (($cur_window_num - 1) * $max_page_links), $request_type) . '" title=" ' . sprintf(PREVNEXT_TITLE_PREV_SET_OF_NO_PAGE, $max_page_links) . ' ">...</a>';

    // page nn button - visa inte om alla sidor visas
    if (!$this->page_all) {
    for ($jump_to_page = 1 + (($cur_window_num - 1) * $max_page_links); ($jump_to_page <= ($cur_window_num * $max_page_links)) && ($jump_to_page <= $this->number_of_pages); $jump_to_page++) {
      if ($jump_to_page == $this->current_page_number) {
        $display_links_string .= ' <strong class="current">' . $jump_to_page . '</strong> ';
      } else {
        $display_links_string .= ' <a href="' . zen_href_link($_GET['main_page'], $parameters . $this->page_name . '=' . $jump_to_page, $request_type) . '" title=" ' . sprintf(PREVNEXT_TITLE_PAGE_NO, $jump_to_page) . ' ">' . $jump_to_page . '</a> ';
      }
    }
    }

    // next window of pages
    if ($cur_window_num < $max_window_num) $display_links_string .= '<a href="' . zen_href_link($_GET['main_page'], $parameters . $this->page_name . '=' . (($cur_window_num) * $max_page_links + 1), $request_type) . '" title=" ' . sprintf(PREVNEXT_TITLE_NEXT_SET_OF_NO_PAGE, $max_page_links) . ' ">...</a> ';

    // next button
    if (($this->current_page_number < $this->number_of_pages) && ($this->number_of_pages != 1)) $display_links_string .= ' <a href="' . zen_href_link($_GET['main_page'], $parameters . 'page=' . ($this->current_page_number + 1), $request_type) . '" title=" ' . PREVNEXT_TITLE_NEXT_PAGE . ' ">' . PREVNEXT_BUTTON_NEXT . '</a> ';

    if ($display_links_string == ' <strong class="current">1</strong> ') {
      return ' ';
    } else {
      return $display_links_string;
    }
  }

  // display number of total products found
  function display_count($text_output) {
    $to_num = ($this->number_of_rows_per_page * $this->current_page_number);
    if ($to_num > $this->number_of_rows) $to_num = $this->number_of_rows;

    $from_num = ($this->number_of_rows_per_page * ($this->current_page_number - 1));

    if ($to_num == 0) {
      $from_num = 0;
    } else {
      $from_num++;
   }

    if ($to_num <= 1) {
      // don't show count when 1
      return '';
    } else {
      return sprintf($text_output, $from_num, $to_num, $this->number_of_rows);
    }
  }
}
?>

As you can see there's four defines you'll have to define. This ugly hack works on all pages with splitting (search, category view, featured products, etc). This file is the only file you'll need to change (except for the defines), no other changes (e.g with templates etc) are needed!
Hope it'll work out for you guys!

// Sebban

16 Jun 2008, 12:14 PM
#28
izilla_pod avatar

izilla_pod

New Zenner

Join Date:
Sep 2006
Posts:
26
Plugin Contributions:
0

Re: "View All" link

I tried the method posted directly above by Sebban and it works great. I have confirmed that the "Show All" link does appear on all pages with splitting, even the search pages. Below is an example of the four defines you could insert in includes/languages/YOUR_TEMPLATE/english.php:

    define('SHOW_ALL_TITLE', 'Show All Products on One Page');
    define('SHOW_ALL_BUTTON', '[Show All]');
    define('SHOW_PAGEVIEW_TITLE', 'Split Products Among Multiple Pages');
    define('SHOW_PAGEVIEW_BUTTON', '[Split Pages]');
20 Jul 2008, 1:40 PM
#29
triplexxx avatar

triplexxx

New Zenner

Join Date:
May 2008
Posts:
31
Plugin Contributions:
0

Re: "View All" link

hi

iZilla_Pod how to hide the link "show all" when is only one page??

4 Sep 2008, 4:01 AM
#30
lisk avatar

lisk

Zen Follower

Join Date:
Jun 2006
Posts:
118
Plugin Contributions:
0

Re: "View All" link

This worked like a charm for me, Sebban. Thank you!

5 Nov 2009, 8:30 PM
#31
sugarhill avatar

sugarhill

New Zenner

Join Date:
Apr 2008
Location:
NYC
Posts:
4
Plugin Contributions:
0

Re: "View All" link

triplexxx:

hi

iZilla_Pod how to hide the link "show all" when is only one page??

I came up with a pretty easy solution to this. Simply change the following lines to hide the "show all" link from listings that fit on a single page.

Change the code on around line 108 FROM:

    if (!$this->page_all) $display_links_string .= '<a href="' . zen_href_link($_GET['main_page'], $parameters . $this->page_name . '=' . 'all', $request_type) . '" title=" ' . SHOW_ALL_TITLE . ' ">' . SHOW_ALL_BUTTON . '</a>  ';
    else $display_links_string .= '<a href="' . zen_href_link($_GET['main_page'], $parameters, $request_type) . '" title=" ' . SHOW_PAGEVIEW_TITLE . ' ">' . SHOW_PAGEVIEW_BUTTON . '</a>  ';
```TO:
```php
      if ((!$this->page_all) && ($this->number_of_pages > 1)) $display_links_string .= '<a href="' . zen_href_link($_GET['main_page'], $parameters . $this->page_name . '=' . 'all', $request_type) . '" title=" ' . SHOW_ALL_TITLE . ' ">' . SHOW_ALL_BUTTON . '</a>    ';
      elseif ($this->page_all) $display_links_string .= '<a href="' . zen_href_link($_GET['main_page'], $parameters, $request_type) . '" title=" ' . SHOW_PAGEVIEW_TITLE . ' ">' . SHOW_PAGEVIEW_BUTTON . '</a>  ';
```Hope this helps!

Dan - co-owner, SugarHill Works
13 Dec 2009, 11:39 PM
#32
theonlyduda avatar

theonlyduda

New Zenner

Join Date:
Jun 2009
Posts:
8
Plugin Contributions:
0

Re: "View All" link

I made the changes to the split_page_results.php and it worked great except for when I had a category with only one product in it, then nothing showed up on the page. No error, just an url with a blank page. Any advice? Thanks.

14 Dec 2009, 4:51 AM
#33
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: "View All" link

You might get the Debug Tool from the Free Software Add Ons and load that to your site to see if it lists the problem for you ...

19 Jan 2010, 9:23 PM
#34
jjdoench avatar

jjdoench

New Zenner

Join Date:
Feb 2008
Posts:
41
Plugin Contributions:
0

Re: "View All" link

Is there a way to exclude specific categories? I have a couple of "All ____" categories that have way too many items to show on one page.

JJd

15 Mar 2010, 12:00 PM
#35
kiddieshop avatar

kiddieshop

New Zenner

Join Date:
Dec 2008
Posts:
26
Plugin Contributions:
0

Re: "View All" link

This works fine until you go to new products and featured products and click on all products.

The link for the pages are

index.php?main_page=products_new&disp_order=6&page=all

and

index.php?main_page=featured_products&disp_order=1&page=all

but both display the following error message

1065 Query was empty
in:
[]

Any ideas how to fix this?

16 Mar 2010, 2:19 PM
#36
kiddieshop avatar

kiddieshop

New Zenner

Join Date:
Dec 2008
Posts:
26
Plugin Contributions:
0

Re: "View All" link

Has anyone else had the same problems?

16 Mar 2010, 4:28 PM
#37
kiddieshop avatar

kiddieshop

New Zenner

Join Date:
Dec 2008
Posts:
26
Plugin Contributions:
0

Re: "View All" link

I sorted it!!

If you find the code that was added from "sugarhill" post

 if ((!$this->page_all) && ($this->number_of_pages > 1)) $display_links_string .= '<a href="' . zen_href_link($_GET['main_page'], $parameters . $this->page_name . '=' . 'all', $request_type) . '" title=" ' . SHOW_ALL_TITLE . ' ">' . SHOW_ALL_BUTTON . '</a>    ';
      elseif ($this->page_all) $display_links_string .= '<a href="' . zen_href_link($_GET['main_page'], $parameters, $request_type) . '" title=" ' . SHOW_PAGEVIEW_TITLE . ' ">' . SHOW_PAGEVIEW_BUTTON . '</a>  ';  

and replace it with

if ((!$this->page_all) && ($this->number_of_pages > 1) && ($_GET['main_page'] != 'products_all') && ($_GET['main_page'] != 'featured_products') && ($_GET['main_page'] != 'specials') && ($_GET['main_page'] != 'products_new')) $display_links_string .= '<a href="' . zen_href_link($_GET['main_page'], $parameters . $this->page_name . '=' . 'all', $request_type) . '" title=" ' . SHOW_ALL_TITLE . ' ">' . SHOW_ALL_BUTTON . '</a>    ';
      elseif ($this->page_all) $display_links_string .= '<a href="' . zen_href_link($_GET['main_page'], $parameters, $request_type) . '" title=" ' . SHOW_PAGEVIEW_TITLE . ' ">' . SHOW_PAGEVIEW_BUTTON . '</a>  ';  

This will stop the SHOW ALL button displaying on the following pages

  • products_all
  • featured_products
  • specials
  • products_new
22 Oct 2010, 2:19 AM
#38
aozhaver avatar

aozhaver

Zen Follower

Join Date:
Sep 2010
Posts:
121
Plugin Contributions:
0

Re: "View All" link

Im absolutely dead tired and smashed! Ive been up all nite trying to figure out how to combine Ajeh's solution from page 1&2 of this thread

(all the other solutions on this thread are WAY too buggy trust me)

with Yellow1912 thread

(http://www.zen-cart.com/forum/showthread.php?t=84174&highlight=single+display)

about how to make your whole zen cart use 1 uniform way to display products which frankly is columnar to most of us. (who uses never ending lists of products cmon Zen Gods get with the 21st century! this should be out the box...)

His solution basically (theres nothing basic about it to a programming dummy like me) "copies" the product listing template files into the new, featured, all, special etc etc template files so that once you got your product listing file configured into columnar display with this module

http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=77

All the other product pages would follow suit and the formatting would be uniform.

PROBLEM IS that EVERYTHING else would also be the same!! So in this case how do you suppose I would switch off the "view all button"? I want it in my product listings but not in New or ALL products etc listings.

For starters who wants a "view all" on their ALL PRODUCTS page, I mean if you got thousands+ items thats just insane...

Anyway the View All button would display correctly on all pages inc NEW etc but when I click it it would throw me to the homepage.. This is because Ajeh's code is specifically for the product listing page and calls up the category path 'cPath=' which doesnt exist for the other product listings hence it would never work anyway so I had to remove it from those listings.

Cut a long story short to EXCLUDE the "view all" button/link but leave all the other good things on the page like LIMELITES "dropdown page sorter" and the ability to choose how many products to display on the fly (that part still isnt working for me...)
http://www.zen-cart.com/forum/showthread.php?t=37658

REPLACE Ajeh's code

<?php if ( ($listing_split->number_of_rows > 0)  && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) )  { 
?>

<div> 
<?php 
  if ($_GET['override'] == 'more') { 
    // Split pages or comment out to not show link when already showing all 
    echo ($listing_split->number_of_rows > MAX_DISPLAY_PRODUCTS_LISTING ? '<a href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . $_GET['cPath']) . '">' . 'PRODUCT_LISTINGS_SHOW_SPLIT_PAGES_PRODUCTS' . '</a>' : ''); 
  } else { 
    // only show link if more than one page 
    echo ($listing_split->number_of_rows > MAX_DISPLAY_PRODUCTS_LISTING ? '<a href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . $_GET['cPath'] . '&override=more') . '">' . 'PRODUCT_LISTINGS_SHOW_ALL_PRODUCTS' . '</a>' : ''); 
  } 
?> 
</div> 

<div id="productsListingTopNumber" class="navSplitPagesResult back"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></div> 
<div id="productsListingListingTopLinks" class="navSplitPagesLinks forward"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, zen_get_all_get_params(array('page', 'info', 'x', 'y', 'main_page'))); ?></div> 
<br class="clearBoth" /> 
<?php 
} 
?>

WITH

<?php if ( ($listing_split->number_of_rows > 0)  && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) )  { 
?> 


<div>

<?php if ( ($_GET['main_page'] != 'products_all') && ($_GET['main_page'] != 'featured_products') && ($_GET['main_page'] != 'specials') && ($_GET['main_page'] != 'products_new') ){ ?>


<div> 
<?php 
     if ($_GET['override'] == 'more') { 
           
         // Split pages or comment out to not show link when already showing all 
         echo ($listing_split->number_of_rows > MAX_DISPLAY_PRODUCTS_LISTING ? '<a href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . $_GET['cPath']) . '">' .   zen_image_submit (BUTTON_IMAGE_VIEW_SPLIT, 'View a few items per page') . '</a>' : ''); 
  } else { 
    // only show link if more than one page 
    echo ($listing_split->number_of_rows > MAX_DISPLAY_PRODUCTS_LISTING ? '<a href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . $_GET['cPath'] . '&override=more') . '">' . zen_image_submit (BUTTON_IMAGE_VIEW_ALL, 'View all Items in Category') . '</a>' : ''); 
    } 
?> 



</div> 

<?php 
} 
?>

</div>

<div id="productsListingTopNumber" class="navSplitPagesResult back"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></div> 
<div id="productsListingListingTopLinks" class="navSplitPagesLinks forward"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, zen_get_all_get_params(array('page', 'info', 'x', 'y', 'main_page'))); ?></div> 
<br class="clearBoth" /> 

<?php 
} 
?>

Seems simple huh... took me forever...

Look I'm so sorry about the crappy English and the unprofessional presentation but I really hope the point is clear and that someone else might also benefit from this without having a sleepless night.:eek:

If you want to see my results go to https://www.majesticsilver.co.uk

Im off to bed or PHP hospital or whatever.:P

21 Feb 2011, 10:35 PM
#39
ukrik avatar

ukrik

New Zenner

Join Date:
Feb 2008
Posts:
25
Plugin Contributions:
0

Re: "View All" link

Hi, Sorry but i am sort of noob! can't follow what was done, if it is not difficult for you, can you please describe steps 1.2.3... what must i do first and what files to edit in order to implement this idea. Like a final topic which will make everything clear about.
Thank you very much in advance.

28 Apr 2011, 6:51 PM
#40
marypotter avatar

marypotter

New Zenner

Join Date:
May 2008
Location:
Virginia Beach, Virginia, United States
Posts:
52
Plugin Contributions:
0

Re: "View All" link

Is there a way to make the default show all with the choice of picking show 10 per page?

I think it's a bad idea to do it this way. But my client insists. I think it's going to be bad for loading time. But there isn't much more I can say against it. Her mind is set.

I tried changing in split_page_results.php
if ($debug) {
echo 'original_query=' . $query . '<br /><br />';
}
if (isset($_GET[$page_holder])) {
$page = $_GET[$page_holder];
} elseif (isset($_POST[$page_holder])) {
$page = $_POST[$page_holder];
} else {
$page = '';
}

to
if ($debug) {
echo 'original_query=' . $query . '<br /><br />';
}
if (isset($_GET[$page_holder])) {
$page = $_GET[$page_holder];
} elseif (isset($_POST[$page_holder])) {
$page = $_POST[$page_holder];
} else {
$page = 'all';
}

but then the show 10 link no longer works.