Page 1 of 1

Bug in affiliate transaction pagination

Posted: Tue Apr 11, 2017 9:28 pm
by jsling
Encounter a bug in the affiliate transaction section.
It happen if you change your default Default Items Per Page (Admin) not equal to 10

/***************************************************************************************************************/
$results = $this->model_marketing_affiliate->getTransactions($this->request->get['affiliate_id'], ($page - 1) * 10, 10);


$pagination = new Pagination();
$pagination->total = $transaction_total;
$pagination->page = $page;
$pagination->limit = $this->config->get('config_limit_admin');
$pagination->url = $this->url->link('marketing/affiliate/transaction', 'token=' . $this->session->data['token'] . '&affiliate_id=' . $this->request->get['affiliate_id'] . '&page={page}', 'SSL');


$data['results'] = sprintf($this->language->get('text_pagination'), ($transaction_total) ? (($page - 1) * 10) + 1 : 0, ((($page - 1) * 10) > ($transaction_total - 10)) ? $transaction_total : ((($page - 1) * 10) + 10), $transaction_total, ceil($transaction_total / 10));
/***************************************************************************************************************/

Currently the pagination limit was hard coded to 10 in admin/controller/marketing/affiliate.php

Just replace all 10 to $this->config->get('config_limit_admin');

Re: Bug in affiliate transaction pagination

Posted: Wed Apr 12, 2017 8:32 am
by Qphoria
:yahoo: