- Posts: 59
- Thank you received: 0
disable pagination memory
13 years 5 months ago #99588
by Dodesign
disable pagination memory was created by Dodesign
how can i disable remembering pagination in hikashop?
for example:
1) i'm click on some category in categories menu.
2) then click any page in pagination(for example, 3)
3) go to any other page
4) when i return in same category i'm see third page, but i need to see first.
Is it possible to fix?
for example:
1) i'm click on some category in categories menu.
2) then click any page in pagination(for example, 3)
3) go to any other page
4) when i return in same category i'm see third page, but i need to see first.
Is it possible to fix?
Please Log in or Create an account to join the conversation.
13 years 5 months ago #99786
by nicolas
Replied by nicolas on topic disable pagination memory
There is nothing to fix as it's not a bug, it's normal that it works like that.
If you want to change that behavior, you will have to modify several lines of code in several HikaShop core files.
Please give links to the pages where you have listings where you want to change that so that we can tell you more exactly what you can do.
If you want to change that behavior, you will have to modify several lines of code in several HikaShop core files.
Please give links to the pages where you have listings where you want to change that so that we can tell you more exactly what you can do.
Please Log in or Create an account to join the conversation.
13 years 5 months ago #99804
by Dodesign
Replied by Dodesign on topic disable pagination memory
i'm use standard hikashop "products listing" menu.
url's:
kolinz.dodesign.by/katalog/kontaktnie-linzi/odnodnevnie.html
kolinz.dodesign.by/katalog/kontaktnie-linzi/ezhemesyachnie.html
kolinz.dodesign.by/katalog/kontaktnie-linzi/kvartalnie.html
kolinz.dodesign.by/katalog/kontaktnie-linzi/tradicionnie.html
kolinz.dodesign.by/katalog/kontaktnie-linzi/toricheskie.html
kolinz.dodesign.by/katalog/kontaktnie-linzi/cvetnie.html
kolinz.dodesign.by/katalog/aksessuari-dl...tvori-dlya-linz.html
kolinz.dodesign.by/katalog/aksessuari-dl...yajuschie-kapli.html
kolinz.dodesign.by/katalog/aksessuari-dl...hodu-i-ochistke.html
kolinz.dodesign.by/katalog/aksessuari-dl...ugie-aksessuari.html
kolinz.dodesign.by/katalog/brendi/alcon.html
kolinz.dodesign.by/katalog/brendi/bauschlomb.html
kolinz.dodesign.by/katalog/brendi/ciba-vision.html
kolinz.dodesign.by/katalog/brendi/cooper-vision.html
kolinz.dodesign.by/katalog/brendi/maxima.html
kolinz.dodesign.by/katalog/brendi/sauflon.html
kolinz.dodesign.by/katalog/brendi/drugie-brendi.html
url's:
kolinz.dodesign.by/katalog/kontaktnie-linzi/odnodnevnie.html
kolinz.dodesign.by/katalog/kontaktnie-linzi/ezhemesyachnie.html
kolinz.dodesign.by/katalog/kontaktnie-linzi/kvartalnie.html
kolinz.dodesign.by/katalog/kontaktnie-linzi/tradicionnie.html
kolinz.dodesign.by/katalog/kontaktnie-linzi/toricheskie.html
kolinz.dodesign.by/katalog/kontaktnie-linzi/cvetnie.html
kolinz.dodesign.by/katalog/aksessuari-dl...tvori-dlya-linz.html
kolinz.dodesign.by/katalog/aksessuari-dl...yajuschie-kapli.html
kolinz.dodesign.by/katalog/aksessuari-dl...hodu-i-ochistke.html
kolinz.dodesign.by/katalog/aksessuari-dl...ugie-aksessuari.html
kolinz.dodesign.by/katalog/brendi/alcon.html
kolinz.dodesign.by/katalog/brendi/bauschlomb.html
kolinz.dodesign.by/katalog/brendi/ciba-vision.html
kolinz.dodesign.by/katalog/brendi/cooper-vision.html
kolinz.dodesign.by/katalog/brendi/maxima.html
kolinz.dodesign.by/katalog/brendi/sauflon.html
kolinz.dodesign.by/katalog/brendi/drugie-brendi.html
Please Log in or Create an account to join the conversation.
13 years 5 months ago #99816
by nicolas
Replied by nicolas on topic disable pagination memory
Change the code:
to:
and:
to:
in the file components/com_hikashop/views/product/view.html.php and that should do what you want.
Code:
$oldValue = $app->getUserState($this->paramBase.'.list_limit');
if(empty($oldValue)){
$oldValue = $this->params->get('limit');
}
$pageInfo->limit->value = $app->getUserStateFromRequest( $this->paramBase.'.list_limit', 'limit_'.$this->params->get('main_div_name').$category_selected, $this->params->get('limit'), 'int' );
if($oldValue!=$pageInfo->limit->value){
JRequest::setVar('limitstart_'.$this->params->get('main_div_name').$category_selected,0);
}
Code:
$pageInfo->limit->value = JRequest::getVar('limitstart_'.$this->params->get('main_div_name').$category_selected,0);
Code:
$pageInfo->limit->start = $app->getUserStateFromRequest( $this->paramBase.'.limitstart', 'limitstart_'.$this->params->get('main_div_name').$category_selected, 0, 'int' );
Code:
$pageInfo->limit->start = JRequest::getInt('limitstart_'.$this->params->get('main_div_name').$category_selected, 0 );
The following user(s) said Thank You: DeeEmm
Please Log in or Create an account to join the conversation.
13 years 5 months ago #99849
by Dodesign
Replied by Dodesign on topic disable pagination memory
it's two lines with
on line 309 and 375
Code:
$oldValue = $app->getUserState($this->paramBase.'.list_limit');
if(empty($oldValue)){
$oldValue = $this->params->get('limit');
}
$pageInfo->limit->value = $app->getUserStateFromRequest( $this->paramBase.'.list_limit', 'limit_'.$this->params->get('main_div_name').$category_selected, $this->params->get('limit'), 'int' );
if($oldValue!=$pageInfo->limit->value){
JRequest::setVar('limitstart_'.$this->params->get('main_div_name').$category_selected,0);
}
Please Log in or Create an account to join the conversation.
13 years 2 months ago #113766
by alikon1
Replied by alikon1 on topic disable pagination memory
Dodesign, I changed only second and it works.
But not only pagination remembered. Selected filter remember too. How to disable it? So each time I open category, it has no filter applied.
But not only pagination remembered. Selected filter remember too. How to disable it? So each time I open category, it has no filter applied.
Please Log in or Create an account to join the conversation.
13 years 2 months ago #113838
by nicolas
Replied by nicolas on topic disable pagination memory
Regarding the filters, you can do like that:
www.hikashop.com/en/forum/2-general-talk...mechanics.html#98232
www.hikashop.com/en/forum/2-general-talk...mechanics.html#98232
The following user(s) said Thank You: alikon1
Please Log in or Create an account to join the conversation.
13 years 3 weeks ago #122537
by DeeEmm
Replied by DeeEmm on topic disable pagination memory
I found that if I made the replacements as described in post above the pagination was removed and the filter changed to 100.
So instead I simply commented out the two instances of
JRequest::setVar('limitstart_'.$this->params->get('main_div_name').$category_selected,0);
Now I always go to first page when revisiting the page.
/DM
So instead I simply commented out the two instances of
JRequest::setVar('limitstart_'.$this->params->get('main_div_name').$category_selected,0);
Now I always go to first page when revisiting the page.
/DM
Please Log in or Create an account to join the conversation.
13 years 3 weeks ago #122542
by DeeEmm
Replied by DeeEmm on topic disable pagination memory
Seems I spoke too soon. now no longer working 
Will try above mod again.
Will try above mod again.
Please Log in or Create an account to join the conversation.
13 years 3 weeks ago #122544
by DeeEmm
Replied by DeeEmm on topic disable pagination memory
To disable only the pagination memory it's just the second part - change
to:
in the file components/com_hikashop/views/product/view.html.php
Code:
$pageInfo->limit->start = $app->getUserStateFromRequest( $this->paramBase.'.limitstart', 'limitstart_'.$this->params->get('main_div_name').$category_selected, 0, 'int' );
to:
Code:
$pageInfo->limit->start = JRequest::getInt('limitstart_'.$this->params->get('main_div_name').$category_selected, 0 );
in the file components/com_hikashop/views/product/view.html.php
The following user(s) said Thank You: nicolas
Please Log in or Create an account to join the conversation.
Time to create page: 0.220 seconds