Zen Cart Logo
Forums / General Questions / Page 2 link in product listing doesn't work

Page 2 link in product listing doesn't work

Views: 1,222

Results 1 to 20 of 22
29 Jan 2013, 8:58 AM
#1
gmartakis avatar

gmartakis

New Zenner

Join Date:
Feb 2011
Posts:
73
Plugin Contributions:
0

Page 2 link in product listing doesn't work

Hi,
I was wondering if anyone could help me here please see the site http://www.sellisbike.gr/demo/index.php?main_page=index&cPath=36_42. If you press the second page link it doesn't work. and it guides the user here http://www.sellisbike.gr/demo/index.php?main_page=index&page=2. Now I know that the link has to be http://www.sellisbike.gr/demo/index.php?main_page=index&cPath=36_42&page=2 in order to be correct. The thing is I don't know where it is in order to fix it....

Any Help would be appreciated here.
Thanks

29 Jan 2013, 11:04 AM
#2
gmartakis avatar

gmartakis

New Zenner

Join Date:
Feb 2011
Posts:
73
Plugin Contributions:
0

Re: Page 2 link in product listing doesn't work

Anyone?

29 Jan 2013, 11:38 AM
#3
gmartakis avatar

gmartakis

New Zenner

Join Date:
Feb 2011
Posts:
73
Plugin Contributions:
0

Re: Page 2 link in product listing doesn't work

Can anyone help here please? I'm having a hard time... I'm trying this for a long time but I wasn't able to find it..

30 Jan 2013, 7:47 AM
#4
gmartakis avatar

gmartakis

New Zenner

Join Date:
Feb 2011
Posts:
73
Plugin Contributions:
0

Re: Page 2 link in product listing doesn't work

Why does not anyone help here? I think I'm on the right forum here....any suggestions?

30 Jan 2013, 8:29 AM
#5
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: Page 2 link in product listing doesn't work

gmartakis:

Why does not anyone help here? I think I'm on the right forum here....any suggestions?What template are you using?

30 Jan 2013, 9:01 AM
#6
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Page 2 link in product listing doesn't work

Your Template Monster template (compared to a site unmodified in this area) has changed the order of these lines in the output, and changed a class tag and does not show the "sort" parameter, so I would ask them what else they have changed in the processing of that output.

<div id="productsListingListingTopLinks" class="navSplitPagesLinks forward">  <strong class="current">1</strong>  <a href="http://www.sellisbike.gr/demo/index.php?main_page=index&page=2" title=" Σελίδα 2 ">2</a>...
<div id="productsListingTopNumber" class="navSplitPagesResult fleft">Προϊόν <strong>1</strong> έως ...
<div id="productsListingTopNumber" class="navSplitPagesResult back">Displaying <strong>1</strong> to ...
<div id="productsListingListingTopLinks" class="navSplitPagesLinks forward">  <strong class="current">1</strong>  <a href="http://www.futurelics.com/index.php?main_page=index&cPath=3_25&sort=3a&page=2" title=" Page 2 ">2</a>...
30 Jan 2013, 9:20 AM
#7
gmartakis avatar

gmartakis

New Zenner

Join Date:
Feb 2011
Posts:
73
Plugin Contributions:
0

Re: Page 2 link in product listing doesn't work

Thank you gjh42 for the response....
I know what they have changed...and I Know what kind of changes need to be done in order to work properly. But I cannot find the files associated with the problem in order to change it.

30 Jan 2013, 9:28 AM
#8
gmartakis avatar

gmartakis

New Zenner

Join Date:
Feb 2011
Posts:
73
Plugin Contributions:
0

Re: Page 2 link in product listing doesn't work

Thanks for the reply gjh42,
I know that the file associated with this problem is tpl_modules_product_listing.php but I cannot find the file that is needed to add in the link the $cPath parameter. If you find anything please help me....This template is a disaster. I'd rather do it my self from the beginning instead of solving the problems that this template has.

30 Jan 2013, 9:52 AM
#9
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Page 2 link in product listing doesn't work

Look in the /template_default/ version of the file to see the stock code for this area.

30 Jan 2013, 9:57 AM
#10
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Page 2 link in product listing doesn't work

<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>
30 Jan 2013, 10:01 AM
#11
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Page 2 link in product listing doesn't work

What does this line in your TM file look like?

30 Jan 2013, 10:13 AM
#12
gmartakis avatar

gmartakis

New Zenner

Join Date:
Feb 2011
Posts:
73
Plugin Contributions:
0

Re: Page 2 link in product listing doesn't work

Thanks again for your quick prompt gjh42,
I have replaced the code from tpl_modules_product_listing.php in /MY_TEMPLATE with tpl_modules_product_listing.php in /template_default and it gives me the same results. Nothing happends... What to you mean look the stock code?
Regards

30 Jan 2013, 10:18 AM
#13
gmartakis avatar

gmartakis

New Zenner

Join Date:
Feb 2011
Posts:
73
Plugin Contributions:
0

Re: Page 2 link in product listing doesn't work

it looks different but it gives me the same results...probably the code of the link has to change but the problem is where....

30 Jan 2013, 10:23 AM
#14
gmartakis avatar

gmartakis

New Zenner

Join Date:
Feb 2011
Posts:
73
Plugin Contributions:
0

Re: Page 2 link in product listing doesn't work

/my_template code
tpl_modules_product_listing.php

<?php /** * Module Template * * @package templateSystem * @copyright Copyright 2003-2005 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_product_listing.php 3241 2006-03-22 04:27:27Z ajeh $ */ include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_PRODUCT_LISTING)); ?> <div id="productListing"> <?php if ( ($listing_split->number_of_rows > 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) { ?> <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> <div id="productsListingTopNumber" class="navSplitPagesResult fleft"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></div> <br class="clearBoth" /> <?php } ?> <div class="tie tie-margin1"> <div class="tie-indent">
	<?php
	// only show when there is something to submit and enabled
		if ($show_top_submit_button == true) {
	?>
	<div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_ADD_PRODUCTS_TO_CART, BUTTON_ADD_PRODUCTS_TO_CART_ALT, 'id="submit1" name="submit1"'); ?></div>
	<br class="clearBoth" />
	<?php
		} // show top submit
	?>
	
	
	<?php
	/**
	 * load the list_box_content template to display the products
	 */
	  require($template->get_template_dir('tpl_tabular_display.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_tabular_display.php');
	?>
	
	
	<?php
	// only show when there is something to submit and enabled
		if ($show_bottom_submit_button == true) {
	?>
	<div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_ADD_PRODUCTS_TO_CART, BUTTON_ADD_PRODUCTS_TO_CART_ALT, 'id="submit2" name="submit1"'); ?></div>
	<br class="clearBoth" />
	<?php
		} // show_bottom_submit_button
	?>
</div> <?php // if ($show_top_submit_button == true or $show_bottom_submit_button == true or (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART != 0 and $show_submit == true and $listing_split->number_of_rows > 0)) { if ($show_top_submit_button == true or $show_bottom_submit_button == true) { ?> </form> <?php } ?> <div class="clear"></div> </div> </div> <?php if ( ($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) { ?> <div id="productsListingBottomNumber" class="navSplitPagesResult back"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></div> <div id="productsListingListingBottomLinks" 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'))); ?></div> <br class="clearBoth" /> <?php } ?>
30 Jan 2013, 10:24 AM
#15
gmartakis avatar

gmartakis

New Zenner

Join Date:
Feb 2011
Posts:
73
Plugin Contributions:
0

Re: Page 2 link in product listing doesn't work

/template_default
tpl_modules_product_listing.php

<?php /** * Module Template * * @package templateSystem * @copyright Copyright 2003-2005 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_product_listing.php 3241 2006-03-22 04:27:27Z ajeh $ */ include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_PRODUCT_LISTING)); ?> <div id="productListing"> <?php // only show when there is something to submit and enabled if ($show_top_submit_button == true) { ?> <div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_ADD_PRODUCTS_TO_CART, BUTTON_ADD_PRODUCTS_TO_CART_ALT, 'id="submit1" name="submit1"'); ?></div> <br class="clearBoth" /> <?php } // show top submit ?> <?php if ( ($listing_split->number_of_rows > 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) { ?> <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 } ?> <?php /** * load the list_box_content template to display the products */ require($template->get_template_dir('tpl_tabular_display.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_tabular_display.php'); ?> <?php if ( ($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) { ?> <div id="productsListingBottomNumber" class="navSplitPagesResult back"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></div> <div id="productsListingListingBottomLinks" 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'))); ?></div> <br class="clearBoth" /> <?php } ?> <?php // only show when there is something to submit and enabled if ($show_bottom_submit_button == true) { ?> <div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_ADD_PRODUCTS_TO_CART, BUTTON_ADD_PRODUCTS_TO_CART_ALT, 'id="submit2" name="submit1"'); ?></div> <br class="clearBoth" /> <?php } // show_bottom_submit_button ?> </div> <?php // if ($show_top_submit_button == true or $show_bottom_submit_button == true or (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART != 0 and $show_submit == true and $listing_split->number_of_rows > 0)) { if ($show_top_submit_button == true or $show_bottom_submit_button == true) { ?> </form> <?php } ?>
30 Jan 2013, 10:26 AM
#16
gmartakis avatar

gmartakis

New Zenner

Join Date:
Feb 2011
Posts:
73
Plugin Contributions:
0

Re: Page 2 link in product listing doesn't work

There are many differences...but If I replace the code from the default template the result is the same.....

30 Jan 2013, 10:27 AM
#17
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Page 2 link in product listing doesn't work

Then I suppose either the $listing_split->display_links() class method or the zen_get_all_get_params() function have been altered by TM, or the $_GET parameters have been modified so that the relevant ones are no longer all being created/processed. Only looking at the code for all of those compared to stock will reveal the issue.

Do you have any possibly related mods beside the template?

30 Jan 2013, 10:32 AM
#18
gmartakis avatar

gmartakis

New Zenner

Join Date:
Feb 2011
Posts:
73
Plugin Contributions:
0

Re: Page 2 link in product listing doesn't work

This piece of code is responsible for the division of the page....is exactly identical with template_default file

<?php if ( ($listing_split->number_of_rows > 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) { ?> <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 } ?>
30 Jan 2013, 10:35 AM
#19
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Page 2 link in product listing doesn't work

Yes, that is why I suggested the other items that could be responsible for the behavior.
They will be in other files... a class file, a functions file or probably one of the header or main_template_vars files.

30 Jan 2013, 10:36 AM
#20
gmartakis avatar

gmartakis

New Zenner

Join Date:
Feb 2011
Posts:
73
Plugin Contributions:
0

Re: Page 2 link in product listing doesn't work

Yes I have installed some add ons.. stock by attributes... editors...ezpages_footer_colum, Tabbed Products Pro v1.07 and some others....