Re: Set number of products displayed per page (support thread)
................................................................................ ..........................................
AND THE ORIGINAL COPY FROM THE tpl_module_product_listing.php of the COLUMN GRID is :
<?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 $
* UPDATED TO WORK WITH COLUMNAR PRODUCT LISTING 04/04/2006
* Modified for admin control of customer option by Glenn Herbert (gjh42) 2012-09-21 & add grid sorter 2012-09-29
*/
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
*/
if ($product_listing_layout_style == 'columns') {
if (PRODUCT_LISTING_GRID_SORT) {
echo '<ul id="gridSorter">' . PRODUCT_LISTING_GRID_SORT_TEXT;
for ($col=0;$col<sizeof($grid_sort);$col++) {
echo '<li class="item">' . $grid_sort[$col]['text'] . '</li>';
}
echo '</ul>';
}
require($template->get_template_dir('tpl_columnar_display.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_columnar_display.php');
} else {// (PRODUCT_LISTING_LAYOUT_STYLE == 'rows')
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 } ?>
Thank you for helping me.
Re: Set number of products displayed per page (support thread)
I don't see anything in tpl_modules_product_listing.php that looks out of place (assuming that you copied the "set number" code properly).
Something I neglected to ask before: what do you have in your /cache/ folder for myDebug log files? Post the latest one. This should tell what file and line the error is in.
Re: Set number of products displayed per page (support thread)
Thank you gjh42,I appreciate your help.Below is the latest one I have in the cache folder and there are so many of this particular file generated between 16th and 18th of october,I am sure hundreds of this same file was generated in the cache folder during this period.I pray it will lead to my solution,thank you so much
Please one last question on the cache folder,I seem to have about 9998 files in this folder with a very large percentage of it occuring between october 16th and 18th 2012,is this normal?
[18-Oct-2012 11:48:33] PHP Warning: require_once(/home/spatm/public_html/plugins/riCjLoader/RiCjLoaderPlugin.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in /home/spatm/public_html/includes/init_includes/init_ricjloader.php on line 12
[18-Oct-2012 11:48:33] PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required '/home/spatm/public_html/plugins/riCjLoader/RiCjLoaderPlugin.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/spatm/public_html/includes/init_includes/init_ricjloader.php on line 12
Re: Set number of products displayed per page (support thread)
That debug log refers to a CSS/JS loader mod (RiCjLoaderPlugin.php) which you apparently tried to install on the 16th or so. I think you may have filled the cache to capacity with those, so that new logs are discarded. Try emptying the cache of debug logs (there are a few other files in there that you do not want to delete), open your site again and see what you get for new debug logs.
Re: Set number of products displayed per page (support thread)
Thank you so much gjh42,I cannot thank you enough.you pointed me to the right direction,it was the cjloader module I installed that caused the whole problem and many errors were written in the cache folder,I try to delete the files but they were just so many i had over 9000 files in that short time,so I got tired of deleting and restored my site from a back up I did on the 15th of october before installing the cjloader.That solved the problem and well I have my site back I am not sure I want to reinstall the cjloader yet,am just glad I have my site back.Thank you and I will really watch out for how my installations are done to prevent complicated errors like the last one.Thank you once again.
Re: Set number of products displayed per page (support thread)
I am have a problem with adding this addon. When I add the files and the inserts, I get a 500 error and the website store will not come up. I tried without the inserts and still the same error. Checked the error log and the it is showing the last (includes/classes/db/mysql/query_factory.php on line 120-(error msg)). I am installing on 1.51 with several addons. The minute I take off this addon my store returns to normal. Any suggestions.
Re: Set number of products displayed per page (support thread)
Exactly what other addons do you have? There may be some interferences. If two mods alter the same file, they need to be merged for both to operate. Replacing a custom file from one mod with a file from another mod may eliminate some code that is essential for PHP processing.
Seeing the site live may help us advise.
Re: Set number of products displayed per page (support thread)
There is nothing added to either the module product_listing file or the template/modules_product_listing file.
The only addon that has been added to those 2 files is: column layout grid 2.3.1.
My other addons are dealing with admin, shipping, template alteration, and product_info but none dealt with either of these files.
Re: Set number of products displayed per page (support thread)
What files are in the "set number" mod package? If you have Column Grid installed, this mod most likely needs to alter one or more of the same files, which would cause problems.
Re: Set number of products displayed per page (support thread)
files are in the "set number" mod package? If you have Column Grid installed, this mod most likely needs to alter one or more of the same files, which would cause problems.
These are the files I added:
2 files in extra functions(set_num_products & set_num_product_dd) and lang/english/template/set_num_products, and of course the modifications to modules/template/product_listing and templates/mytemplate/template/tple_modules_product_listing.
I took off set_num_products under functions/extra functions and the website comes up and the addon is working for now. Not sure if this is a good fix or will problems arise after disabling the one file.