

Claudia
Member-
Posts
234 -
Joined
-
Last visited
-
Days Won
2
Everything posted by Claudia
-
Pagination does not work after upgrade to 6.5.0
Claudia replied to Claudia's topic in Technical Help
Thank you! Thank You! Thank You! Hey if you get a chance read my "About Us" page. -
Pagination does not work after upgrade to 6.5.0
Claudia replied to Claudia's topic in Technical Help
Not to shoot a dead horse but, I was checking out my search (searched "dog") and noticed that the same thing as above happened in the search. I got stuck on page 1 even if I clicked page 3 - for example. I upgraded to 6.5.1 and the same thing. I tried to check with Foundation but its pagination isn't the same as mine so I really couldn't. I compared files and all look ok. I like the layout of the search as it is and have no plans to use Elasticsearch. Any ideas? https://www.cambargainstore.com search for dogs -
Pagination does not work after upgrade to 6.5.0
Claudia replied to Claudia's topic in Technical Help
Thanks Brian .... That was very interesting information. Glad for the knowledge! -
Pagination does not work after upgrade to 6.5.0
Claudia replied to Claudia's topic in Technical Help
Github only shows 3 files. I have not a clue what I'm suppose to do with the Epoch Time -
Pagination does not work after upgrade to 6.5.0
Claudia replied to Claudia's topic in Technical Help
Could I just change the three files that are changed in 6.5.1 without doing and actual upgrade? -
Pagination does not work after upgrade to 6.5.0
Claudia replied to Claudia's topic in Technical Help
I tried twice but all I got was a blank screen with the spinning thing -
Pagination does not work after upgrade to 6.5.0
Claudia replied to Claudia's topic in Technical Help
I just uploaded the file above and it all works now. How could my code get so messed up when I didn't change anything in the file? Thanks for all you do Brian. -
Pagination does not work after upgrade to 6.5.0
Claudia replied to Claudia's topic in Technical Help
Lines 1785 - 1864 public function searchCatalogue($search_data = null, $page = 1, $per_page = 10, $search_mode = 'elastic') { $per_page = (!is_numeric($per_page) || $per_page < 1) ? 10 : $per_page; $GLOBALS['debug']->debugMessage('At '.__METHOD__.', line ('.__LINE__.'), $page is '.$page.' and $per_page is '.$per_page); if (strtolower($page) != 'all') { $page = (is_numeric($page)) ? $page : 1; $limit = sprintf('LIMIT %d OFFSET %d', (int)$per_page, $per_page*($page-1)); } else { $limit = 'LIMIT 100'; } $GLOBALS['debug']->debugMessage('At '.__METHOD__.', line ('.__LINE__.'), $page is '.$page.' and $per_page is '.$per_page); $original_search_data = $search_data; /* Allow plugins to add to conditions and joins or change the search_data Where conditions may be added to the $where variable and must be self contained (e.g. no AND prefix or suffix) since they will be ANDed together below $where[] = "I.price > 100"; Joins may be added to the $joins variable - keep in mind the need for unique table aliases as appropriate $joins[] = "`plugin_myPlugin` as P ON P.`product_id`=I.`product_id` AND P.`my_field`='some_value'"; The only guaranteed table alias is I for CubeCart_inventory G for CubeCart_pricing_group CI for CubeCart_category_index C for CubeCart_category */ if($search_mode == 'elastic') { if($GLOBALS['config']->get('config', 'elasticsearch')=='1') { $es = new ElasticsearchHandler; $es->query($search_data, false); $result = $es->search($page, $per_page); $pids = array(); if($result) { foreach($result["hits"]["hits"] as $hit) { array_push($pids, $hit['_id']); } } $this->_category_count = $result["hits"]["total"]["value"]; if(!empty($pids)) { $this->_category_products = $GLOBALS['db']->select('CubeCart_inventory', false, array('product_id' => $pids)); $this->_sort_by_relevance = true; } else { $this->_elasticsearch = false; return $this->searchCatalogue($original_search_data, 1, $per_page, 'fulltext'); } } else { return $this->searchCatalogue($original_search_data, 1, $per_page, 'fulltext'); } } else { $where = array(); $joins = array(); foreach ($GLOBALS['hooks']->load('class.catalogue.pre_search') as $hook) { include $hook; } $sale_mode = $GLOBALS['config']->get('config', 'catalogue_sale_mode'); if ($sale_mode == 2) { $sale_percentage = $GLOBALS['config']->get('config', 'catalogue_sale_percentage'); } $user = (array)$GLOBALS['user']->get(); $group_id = 'WHERE group_id = 0'; if (($memberships = $GLOBALS['user']->getMemberships()) !== false) { $group_id = 'WHERE '; foreach ($memberships as $membership) { $group_id .= 'group_id = '.$membership['group_id'].' OR '; } $group_id = substr($group_id, 0, -4); } if (strtolower($page) != 'all') { $page = (is_numeric($page)) ? $page : 1; $limit = sprintf('LIMIT %d OFFSET %d', (int)$per_page, $per_page*($page-1)); } else { $limit = 'LIMIT 100'; } // Presence of a join is similar to presence of a search keyword if (!empty($joins) || is_array($search_data)) { -
Pagination does not work after upgrade to 6.5.0
Claudia replied to Claudia's topic in Technical Help
What next? -
Pagination does not work after upgrade to 6.5.0
Claudia replied to Claudia's topic in Technical Help
code in cubecart class is the same Aromatherapy First Page GET: 'Before Sanitise:' => 'seo_path' => aromatherapy 'After Sanitise:' => '_a' => category 'cat_id' => 55 Debug Messages: [0] At Cubecart::_category, line (883), $page is 1 and $catalogue_products_per_page is 48 [1] At Catalogue::searchCatalogue, line (2121), $page is 1 and $per_page is 48 [2] At Catalogue::getCategoryProducts, line (801), $page is 1 and $per_page is 48 [3] At Catalogue::getProductData, line (1112), $page is 1 and $per_page is 48 Page 2 GET: 'Before Sanitise:' => 'seo_path' => aromatherapy 'page' => 2 'After Sanitise:' => '_a' => category 'cat_id' => 55 'page' => 2 Debug Messages: [0] At Cubecart::_category, line (883), $page is 2 and $catalogue_products_per_page is 48 [1] At Catalogue::searchCatalogue, line (2121), $page is 1 and $per_page is 48 [2] At Catalogue::getCategoryProducts, line (801), $page is 1 and $per_page is 48 [3] At Catalogue::getProductData, line (1112), $page is 1 and $per_page is 48 View All GET: 'Before Sanitise:' => 'seo_path' => aromatherapy 'page' => all 'After Sanitise:' => '_a' => category 'cat_id' => 55 'page' => all Debug Messages: [0] At Cubecart::_category, line (883), $page is all and $catalogue_products_per_page is 48 [1] At Catalogue::searchCatalogue, line (2121), $page is 1 and $per_page is 48 [2] At Catalogue::getCategoryProducts, line (801), $page is 1 and $per_page is 48 [3] At Catalogue::getProductData, line (1112), $page is 1 and $per_page is 48 Forget the above. The debug code didn't take Forget the above. The debug code didn't take View all: GET: 'Before Sanitise:' => 'seo_path' => aromatherapy 'page' => all 'After Sanitise:' => '_a' => category 'cat_id' => 55 'page' => all [0] At Cubecart::_category, line (883), $page is all and $catalogue_products_per_page is 48 [1] At Catalogue::searchCatalogue, line (1788), $page is all and $per_page is 48 [2] At Catalogue::searchCatalogue, line (1796), $page is all and $per_page is 48 [3] At Catalogue::searchCatalogue, line (1788), $page is 1 and $per_page is 48 [4] At Catalogue::searchCatalogue, line (1796), $page is 1 and $per_page is 48 [5] At Catalogue::searchCatalogue, line (2122), $page is 1 and $per_page is 48 [6] At Catalogue::getCategoryProducts, line (801), $page is 1 and $per_page is 48 [7] At Catalogue::getProductData, line (1112), $page is 1 and $per_page is 48 First Page GET: 'Before Sanitise:' => 'seo_path' => aromatherapy 'After Sanitise:' => '_a' => category 'cat_id' => 55 Debug Messages: [0] At Cubecart::_category, line (883), $page is 1 and $catalogue_products_per_page is 48 [1] At Catalogue::searchCatalogue, line (1788), $page is 1 and $per_page is 48 [2] At Catalogue::searchCatalogue, line (1796), $page is 1 and $per_page is 48 [3] At Catalogue::searchCatalogue, line (1788), $page is 1 and $per_page is 48 [4] At Catalogue::searchCatalogue, line (1796), $page is 1 and $per_page is 48 [5] At Catalogue::searchCatalogue, line (2122), $page is 1 and $per_page is 48 [6] At Catalogue::getCategoryProducts, line (801), $page is 1 and $per_page is 48 [7] At Catalogue::getProductData, line (1112), $page is 1 and $per_page is 48 Second Page GET: 'Before Sanitise:' => 'seo_path' => aromatherapy 'page' => 2 'After Sanitise:' => '_a' => category 'cat_id' => 55 'page' => 2 Debug Messages: [0] At Cubecart::_category, line (883), $page is 2 and $catalogue_products_per_page is 48 [1] At Catalogue::searchCatalogue, line (1788), $page is 2 and $per_page is 48 [2] At Catalogue::searchCatalogue, line (1796), $page is 2 and $per_page is 48 [3] At Catalogue::searchCatalogue, line (1788), $page is 1 and $per_page is 48 [4] At Catalogue::searchCatalogue, line (1796), $page is 1 and $per_page is 48 [5] At Catalogue::searchCatalogue, line (2122), $page is 1 and $per_page is 48 [6] At Catalogue::getCategoryProducts, line (801), $page is 1 and $per_page is 48 [7] At Catalogue::getProductData, line (1112), $page is 1 and $per_page is 48 -
Pagination does not work after upgrade to 6.5.0
Claudia replied to Claudia's topic in Technical Help
Looking at the first page of aromatherapy: GET: 'Before Sanitise:' => 'seo_path' => aromatherapy 'After Sanitise:' => '_a' => category 'cat_id' => 55 Debug Messages: [0] At Cubecart::_category, line (883), $page is 1 and $catalogue_products_per_page is 48 [1] At Catalogue::searchCatalogue, line (2114), $page is 1 and $per_page is 48 [2] At Catalogue::getCategoryProducts, line (801), $page is 1 and $per_page is 48 [3] At Catalogue::getProductData, line (1112), $page is 1 and $per_page is 48 Looking at the second page of aromatherapy: GET: 'Before Sanitise:' => 'seo_path' => aromatherapy 'page' => 2 'After Sanitise:' => '_a' => category 'cat_id' => 55 'page' => 2 Debug Messages: [0] At Cubecart::_category, line (883), $page is 2 and $catalogue_products_per_page is 48 [1] At Catalogue::searchCatalogue, line (2114), $page is 1 and $per_page is 48 [2] At Catalogue::getCategoryProducts, line (801), $page is 1 and $per_page is 48 [3] At Catalogue::getProductData, line (1112), $page is 1 and $per_page is 48 Looking at the view all page of aromatherapy: GET: 'Before Sanitise:' => 'seo_path' => aromatherapy 'page' => all 'After Sanitise:' => '_a' => category 'cat_id' => 55 'page' => all Debug Messages: [0] At Cubecart::_category, line (883), $page is all and $catalogue_products_per_page is 48 [1] At Catalogue::searchCatalogue, line (2114), $page is 1 and $per_page is 48 [2] At Catalogue::getCategoryProducts, line (801), $page is 1 and $per_page is 48 [3] At Catalogue::getProductData, line (1112), $page is 1 and $per_page is 48 -
Pagination does not work after upgrade to 6.5.0
Claudia replied to Claudia's topic in Technical Help
This is what I get: [0] At Cubecart::_category, line (883), $page is 1 and $catalogue_products_per_page is 48 [1] At Catalogue::searchCatalogue, line (2114), $page is 1 and $per_page is 48 [2] At Catalogue::getCategoryProducts, line (801), $page is 1 and $per_page is 48 [3] At Catalogue::getProductData, line (1112), $page is 1 and $per_page is 48 I changed the amount per page to 48 because people couldn't see items after the first page of 12 if there are more that 12 items in that category -
Pagination does not work after upgrade to 6.5.0
Claudia replied to Claudia's topic in Technical Help
Does it have something to do with this? Search Returns Page 1 Results Regardless of Specified Page Number in Certain Cases #3066. If so this has been going on a long time. https://github.com/cubecart/v6/issues/3066 -
Pagination does not work after upgrade to 6.5.0
Claudia replied to Claudia's topic in Technical Help
Was anything ever figured out on this? -
Pagination does not work after upgrade to 6.5.0
Claudia replied to Claudia's topic in Technical Help
Limit 12 could be before I changed config? -
Pagination does not work after upgrade to 6.5.0
Claudia replied to Claudia's topic in Technical Help
Is this what you are looking for? [0] At Catalogue::searchCatalogue, line (2114), $page is 1 and $per_page is 48 [1] At Catalogue::getCategoryProducts, line (801), $page is 1 and $per_page is 48 [2] At Catalogue::getProductData, line (1112), $page is 1 and $per_page is 48 I changed the products per page from 12 to 48 in skin config and admin to show more products -
Pagination does not work after upgrade to 6.5.0
Claudia replied to Claudia's topic in Technical Help
Do you need my login info for cpanel? -
Pagination does not work after upgrade to 6.5.0
Claudia replied to Claudia's topic in Technical Help
It's code change I made to the db. Added to several databases so I could use it thru admin products and orders. I sort my products in the categories by it. Layout in admin let me choose it. -
Pagination does not work after upgrade to 6.5.0
Claudia replied to Claudia's topic in Technical Help
I have it at line 1845 $sale_mode = $GLOBALS['config']->get('config', 'catalogue_sale_mode'); if ($sale_mode == 2) { $sale_percentage = $GLOBALS['config']->get('config', 'catalogue_sale_percentage'); } $user = (array)$GLOBALS['user']->get(); $group_id = 'WHERE group_id = 0'; if (($memberships = $GLOBALS['user']->getMemberships()) !== false) { $group_id = 'WHERE '; foreach ($memberships as $membership) { $group_id .= 'group_id = '.$membership['group_id'].' OR '; } $group_id = substr($group_id, 0, -4); } if (strtolower($page) != 'all') { $page = (is_numeric($page)) ? $page : 1; $limit = sprintf('LIMIT %d OFFSET %d', (int)$per_page, $per_page*($page-1)); } else { $limit = 'LIMIT 100'; } // Presence of a join is similar to presence of a search keyword if (!empty($joins) || is_array($search_data)) { if($GLOBALS['config']->get('config', 'hide_out_of_stock')=='1') { $search_data['inStock'] = true; } -
Pagination does not work after upgrade to 6.5.0
Claudia replied to Claudia's topic in Technical Help
GET: 'Before Sanitise:' => 'seo_path' => ashtrays 'page' => 2 'After Sanitise:' => '_a' => category 'cat_id' => 3 'page' => 2 This is the only thing I closely resembling query 31. Hack: 1681070244.17480 --- Duration: 7838 µs [CACHE WRITE] --- Key: sql.42a84a6e1af5e736143e4cb797ab58da SELECT * FROM `CubeCart_inventory` WHERE `product_id` IN (80,100,79,103,113,115,124,7,116,29,104,106,108,109,110,112,27,28,26,111,78,75,14,8,15,9,122,119,65,66,64,67,121,126) AND CubeCart_inventory.status = '1' ORDER BY `excel_name` ASC LIMIT 12 OFFSET 0; 32. Hack: 1681070244.17700 --- Duration: 1999 µs [CACHE WRITE] --- Key: sql.f5558282f2540e546ea7a9f62bb3fbc4 SELECT COUNT(*) AS `Count` FROM `CubeCart_inventory` WHERE `product_id` IN (80,100,79,103,113,115,124,7,116,29,104,106,108,109,110,112,27,28,26,111,78,75,14,8,15,9,122,119,65,66,64,67,121,126) AND CubeCart_inventory.status = '1' ; As for the list of product_ids, how many values are in your list? Where do I find this? All above is if I'm on page 2 of ashtrays Here's what I have on view all page 23. Hack: 1681071325.20270 --- Duration: 424 µs [CACHE READ] --- Key: sql.42a84a6e1af5e736143e4cb797ab58da SELECT * FROM `CubeCart_inventory` WHERE `product_id` IN (80,100,79,103,113,115,124,7,116,29,104,106,108,109,110,112,27,28,26,111,78,75,14,8,15,9,122,119,65,66,64,67,121,126) AND CubeCart_inventory.status = '1' ORDER BY `excel_name` ASC LIMIT 12 OFFSET 0; -
Just noticed that after upgrade to 6.5.0 my pagination does not work on the storefront category page. If I click page 1 or 2 or view all it stays on the first page. https://www.cambargainstore.com/ashtrays
-
I noticed something else - I have added the image title to a product with the front view / back view appendage ( two photos and I haven't implemented your code above yet) When you look at the product page the main image will show the correct front view and the thumbnails will show their front or back view. But if you hover of the back view and it becomes the main image it still shows the title as front view. Here's an example page. Image Titles
-
Thanks Brian!!!
-
On the product page of a store if you click on the main image it goes to a page with an enlarged image of the main image with thumbnails under in. It also shows the Product title given when the product was created in admin. Is there a way for the product title to be the image title created when the photos are uploaded? For example in the image shown below the Image title I created for each photos is 1967 Jim Beam Decanter: Alaska Purchase Centennial: Front View 1967 Jim Beam Decanter: Alaska Purchase Centennial: Back View I'd like this to show for each thumbnail when it is enlarged if I have added the image title in admin. I haven't added it to all my products yet.
-
Thanks Brian. If you say these, and more, warnings aren't hurting anything and my site is working correctly I'll stop bugging you with this.