Jump to content

Search the Community

Showing results for tags 'Pagination'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • CubeCart News & Announcements
    • News & Announcements
  • CubeCart Support Forums
    • Issue / Bug Reporting & Feature Requests
    • Install & Upgrade Support
    • Official CubeCart Hosting
    • Technical Help
    • Customising Look & Feel
  • CubeCart Extension Marketplace
    • Visit the CubeCart Extension Marketplace
    • Extension Discussion
    • Developer Forum
  • General
    • General Discussion
    • Show Off

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start




Found 2 results

  1. In the admin area, when viewing the orders list and the products list, when you click on any page numbers you are bounced back to the overview/dashboard. I can't navigate to the second page of products to edit them, or view any orders after the first page. v4.3.4 php v5.3 Recently moved from a different server, that is when it broke. The old server was running an older version of php. Not sure what went wrong.
  2. There may times when the pagination sequence in the admin Orders Summary listing does not appear, or may have the incorrect number of links (1-2-3 instead of 1-2-...-29-30). The following series of edits should fix that. Unfortunately, while there is much in the Database Class to get the necessary info efficiently (that is, make one complex query instead of two), there is other database activity that gets in the way and pollutes that info. So, we must make two queries. (I really wanted to make all this function correctly using the tools in the class, but as I was working through it, it became evident I was building a very lengthy list of edits to make - more than I would reasonably ask anyone here to undertake.) In the file admin/sources/orders.index.inc.php, near line 563, find: $where = (isset($where) && !empty($where)) ? $where : false; Make it look like: if(isset($where) && !empty($where)) { $_GET['page'] = 'all'; } else { $where = false; } Don't do the above edit. Instead do this, near line 578, find: $page = (isset($_GET['page'])) ? $_GET['page'] : 1; On the same line, after the existing statement, add: if($where) $page = 'all'; This will get rid of the erroneous &page=all in the querystring that may appear after doing a search followed by editing one of the found orders. Near line 596, find a statement that begins with: $orders = $GLOBALS['db']->select(sprintf('`%1$sCubeCart_order_summary` On the same line, directly in front of that statement, add this statement: $orders_count = $GLOBALS['db']->count('CubeCart_order_summary', 'cart_order_id', $where); Near lines 622 and 623, find: $GLOBALS['smarty']->assign('PAGINATION', $GLOBALS['db']->pagination(false, $per_page, $page, 9)); $GLOBALS['smarty']->assign('TOTAL_RESULTS', $GLOBALS['db']->getFoundRows()); Make them look like this: if (!$where) $GLOBALS['smarty']->assign('PAGINATION', $GLOBALS['db']->pagination($orders_count, $per_page, $page, 9)); $GLOBALS['smarty']->assign('TOTAL_RESULTS', $orders_count); What this does is to drop pagination on results from a search. That is, if you have 600 orders over two years, and, for example, you search on dates from 1Jul2013 to 1Sep2013, all of only those results will be listed. So, don't be stupid. Keep your search parameters such that you can expect to get a tightly focused result. This also uses the count of a query that is not restricted, otherwise having limited the results to 20 at a time, for the pagination (if appropriate) and Total Count at the bottom of the table. Also, it should be noted that in the Orders Summary, Search Orders tab, you can search by Order Details, or by Order Date. But not both. (But I think that's an easy edit to fix.) (Edit: turns out the database class, where() function, is not written flexibly enough to do this.)
  • Create New...