Minor display bug in product backend

  • Posts: 130
  • Thank you received: 1
12 years 11 months ago #33368

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.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 11 months ago #33414

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.

Please Log in or Create an account to join the conversation.

  • Posts: 130
  • Thank you received: 1
12 years 11 months ago #33632

Fix worked for me. Thanks.

Please Log in or Create an account to join the conversation.

  • Posts: 130
  • Thank you received: 1
12 years 8 months ago #42775

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?

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 8 months ago #42785

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.

Please Log in or Create an account to join the conversation.

  • Posts: 130
  • Thank you received: 1
12 years 8 months ago #42790

Thanks Nicolas, working like charm.

Please Log in or Create an account to join the conversation.

Time to create page: 0.060 seconds
Powered by Kunena Forum