poliquinp Posted November 8, 2018 Share Posted November 8, 2018 Hello, I am developping a custom theme in WHMCS and I am having issues working with ClientArea pages. It looks like many people are having this issue. On my Client Area (www.mydomain.com/clientarea.php?action=products), it only shows 10 items. When I do a {debug} from the template file, I get those two configurations : $itemlimit (Origin: "Smarty object") with a value of 10 $itemsperpage (Origin: "Smarty object") with a value of 10 I am trying to find a place in the Admin Panel or in the database if I can alter those values. I keep searching and I will post updates as soon as I have. In the meantime, if any body can help me it would be nice! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted November 11, 2018 Share Posted November 11, 2018 On 08/11/2018 at 16:32, poliquinp said: I am trying to find a place in the Admin Panel or in the database if I can alter those values. I don't think it's in either - it will be determined by your Datatables settings... which you should be able to tweak by either editing /includes/tablelist.tpl or with JavaScript... the documentation on their site should prove useful to you as you'll find nothing about it in the official WHMCS documentation! 🙄 0 Quote Link to comment Share on other sites More sharing options...
vdswin.com Posted July 18, 2022 Share Posted July 18, 2022 (edited) On 11/8/2018 at 6:32 PM, poliquinp said: It looks like many people are having this issue I faced with same trouble. Only 10 items is displayed by default for any table (tickets, invoices, email etc.). Smarty value {$invoices} contains only 10 items. If I add &itemlimit=all to URI - it start displaying all items until logoff / cookie clear. How and what should I change, so all items was displayed by default? If I enable default twenty-one theme there is no such issue, all records displayed by default. Edited July 18, 2022 by vdswin.com 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted July 18, 2022 Share Posted July 18, 2022 It's DataTables. Simply use pageLenght API. 0 Quote Link to comment Share on other sites More sharing options...
vdswin.com Posted July 18, 2022 Share Posted July 18, 2022 1 minute ago, Kian said: It's DataTables. Simply use pageLenght API. Not so easy.... In fact it does not matter what pageLenght is set (I set it to -1) because WHMCS gives only 10 records to DataTables. So if create clientareainvoices.tpl just as {$invoices|count} it shows "10" by default until I add &itemlimit=all to query string. So this issue has no relation to DataTable settings =( I can not figure out why theme "trweny-one" sets this itemlimit to all by default (( 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted July 18, 2022 Share Posted July 18, 2022 2 hours ago, vdswin.com said: because WHMCS gives only 10 records to DataTables I have no direct experience with twenty-one but are you sure that WHMCS gives only 10 records? As far as I know WHMCS doesn't use server-side processing of DataTables hence all rows are accessible from {$invoices}. For example at the moment I am browsing a system where I have almost 4000 invoices. Each of them is accessible from {$invoices}. In fact when I change page limite from "10" to "All" they all show up without any need of ajax POST. 0 Quote Link to comment Share on other sites More sharing options...
vdswin.com Posted July 18, 2022 Share Posted July 18, 2022 (edited) Yes, with "six" or "twenty-one" theme all existing records are passed to $invoices and DataTables has all of them. But with custom theme it is like default &itemlimit=10 is set and so only 10 records is passed to $invoices. So there is only 10 records in page source. And DataTable can display only 10 invoices (like there is ONLY 10 invoices exists) regardless of settings, changing Limit in datatble, or setting "pageLength": -1. "Showing 1 to 10 of 10 entries" until I add &itemlimit=10 and then get "Showing 1 to 10 of 54 entries" like in "six" or "twenty-one" theme. 1) Is it possible to change some internal WMCS setting, that is managed by adding URL parameter &itemlimit from 10 to "all" by default? 2) Why can WHCMS return different number of items with different theme? 3) Could you please try add any custom theme to WHMCS, place just {$invoices|count} into clientareainvoices.tpl, clear cookie and check how many records will WHMCS return by default? If it is only 10 - could this be changed to "-1" or "all" in some way? Edited July 18, 2022 by vdswin.com 0 Quote Link to comment Share on other sites More sharing options...
mudlusamoi Posted July 26, 2022 Share Posted July 26, 2022 You should edit the theme.yaml file. templates\THEME_NAME\theme.yaml Add the following lines. properties: serverSidePagination: false Full code: name: "Custom Theme" description: "Custom theme description" author: "Samet Girginer" properties: serverSidePagination: false 1 Quote Link to comment Share on other sites More sharing options...
vdswin.com Posted July 31, 2022 Share Posted July 31, 2022 Thank you. This is EXACTLY is I was looking for. 0 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.