- Posts: 130
- Thank you received: 1
Minor display bug in product backend
14 years 9 months ago #33368
by karolko
Minor display bug in product backend was created by karolko
Setup:
In Joomla backend, Hikashop / Product you'll need to have 2 different categories:
a) Category 1 with more than 20 products (using Display 20 products per page option).
b) Category 2 with less than 20 products in it.
Steps to replicate:
1. In Joomla backend, Hikashop / Product, display Page 2 of products in Category 1.
2. Navigate to the products in Category 2.
3. See that NO products are visible in Category 2 (although there are some in it).
Notes:
It looks to me that in step 2) Hikashop is trying to display Page 2 of the products in Category 2 - but such page obviously doesn't exist for this particular category.
In Joomla backend, Hikashop / Product you'll need to have 2 different categories:
a) Category 1 with more than 20 products (using Display 20 products per page option).
b) Category 2 with less than 20 products in it.
Steps to replicate:
1. In Joomla backend, Hikashop / Product, display Page 2 of products in Category 1.
2. Navigate to the products in Category 2.
3. See that NO products are visible in Category 2 (although there are some in it).
Notes:
It looks to me that in step 2) Hikashop is trying to display Page 2 of the products in Category 2 - but such page obviously doesn't exist for this particular category.
Please Log in or Create an account to join the conversation.
14 years 9 months ago #33414
by nicolas
Replied by nicolas on topic Re: Minor display bug in product backend
Hi,
Thank you for reporting that problem.
Please change the line:
if(JRequest::getVar('search')!=$app->getUserState($this->paramBase.".search")){
to:
if(JRequest::getVar('search')!=$app->getUserState($this->paramBase.".search")||JRequest::getVar('filter_id')!=$app->getUserState($this->paramBase.".filter_id")){
in the file administrator/components/com_hikashop/views/product/view.html.php and that should fix the problem.
Thank you for reporting that problem.
Please change the line:
if(JRequest::getVar('search')!=$app->getUserState($this->paramBase.".search")){
to:
if(JRequest::getVar('search')!=$app->getUserState($this->paramBase.".search")||JRequest::getVar('filter_id')!=$app->getUserState($this->paramBase.".filter_id")){
in the file administrator/components/com_hikashop/views/product/view.html.php and that should fix the problem.
Please Log in or Create an account to join the conversation.
14 years 9 months ago #33632
by karolko
Replied by karolko on topic Re: Minor display bug in product backend
Fix worked for me. Thanks.
Please Log in or Create an account to join the conversation.
14 years 6 months ago #42775
by karolko
Replied by karolko on topic Re: Minor display bug in product backend
One thing we've discovered with this one, is that now we're always returned to the first page of the product list, even with scenarios such as:
1. Display list of products (20 per page).
2. Click on third page and pick a product from it.
3. Edit a product save or cancel --> you're returned to first page and NOT a third page.
Is it a unintended consequence of the fix below or different problem?
1. Display list of products (20 per page).
2. Click on third page and pick a product from it.
3. Edit a product save or cancel --> you're returned to first page and NOT a third page.
Is it a unintended consequence of the fix below or different problem?
Please Log in or Create an account to join the conversation.
14 years 6 months ago #42785
by nicolas
Replied by nicolas on topic Re: Minor display bug in product backend
You can replace the code in my previous post by:
$newFilterId = JRequest::getVar('filter_id');
$newSearch = JRequest::getVar('search');
if((!empty($newSearch)&&$newSearch!=$app->getUserState($this->paramBase.".search"))||(!empty($newFilterId) && $newFilterId!=$app->getUserState($this->paramBase.".filter_id"))){
in order to fix that.
$newFilterId = JRequest::getVar('filter_id');
$newSearch = JRequest::getVar('search');
if((!empty($newSearch)&&$newSearch!=$app->getUserState($this->paramBase.".search"))||(!empty($newFilterId) && $newFilterId!=$app->getUserState($this->paramBase.".filter_id"))){
in order to fix that.
Please Log in or Create an account to join the conversation.
14 years 6 months ago #42790
by karolko
Replied by karolko on topic Re: Minor display bug in product backend
Thanks Nicolas, working like charm.
Please Log in or Create an account to join the conversation.
Time to create page: 0.203 seconds