ajax load only one page of search results
This commit is contained in:
parent
a5379043e9
commit
accb900d4f
@ -48,6 +48,8 @@ $category = GETPOST('category', 'alphanohtml'); // Can be id of category or 'sup
|
|||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$term = GETPOST('term', 'alpha');
|
$term = GETPOST('term', 'alpha');
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
|
$search_start = GETPOST('search_start', 'int');
|
||||||
|
$search_limit = GETPOST('search_limit', 'int');
|
||||||
|
|
||||||
if (empty($user->rights->takepos->run)) {
|
if (empty($user->rights->takepos->run)) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
@ -232,6 +234,9 @@ if ($action == 'getProducts') {
|
|||||||
$reshook=$hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook
|
||||||
$sql .= $hookmanager->resPrint;
|
$sql .= $hookmanager->resPrint;
|
||||||
|
|
||||||
|
// load only one page of products
|
||||||
|
$sql.= ' LIMIT '. $search_start . ',' . $search_limit;
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
$rows = array();
|
$rows = array();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user