Selecting the close button in the filter module

  • Posts: 21
  • Thank you received: 1
  • Hikamarket Frontedition Hikaserial Standard Hikashop Business
7 years 11 months ago #257343

-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.6.4
-- PHP version -- : 5.6.23

I have 2 menu's for my shop; a category listing and a product listing.

Normally the category listing is used.
The product listing is used if I want to search for a product code or description. Working fine.
When I select the close button in the filter module the filtering is cleared, but the site shows an overview of all the products (after some time).

Is it possible to redirect the site to the category listing instead?

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
7 years 11 months ago #257373

Hi,

There is no option to do that.
With the next version of hikaShop (the 3.0 which should be out next month), you'll be able to edit the file "listing" of the view "product" via the menu Display>Views and add the code below at the top and it will work:

<?php if($_REQUEST['ctrl']=='product' && !$this->module && empty($this->filter_set)){
$app = JFactory::getApplication();
$app->redirect('http://mywebsite.com/link/to/my/categories/listing');
}
?>
with the current version the variable $this->filter_set is not yet available in that view so the code won't work.

Last edit: 7 years 7 months ago by Mohamed Thelji.
The following user(s) said Thank You: Luchen6

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

  • Posts: 21
  • Thank you received: 1
  • Hikamarket Frontedition Hikaserial Standard Hikashop Business
7 years 11 months ago #257410

Thanks for the answer. Will have to be patient for some weeks (no problem).

Will react on result when the new version is out.

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

  • Posts: 21
  • Thank you received: 1
  • Hikamarket Frontedition Hikaserial Standard Hikashop Business
7 years 7 months ago #265858

Nicolas,
It took some time, but finaly got the new version of HikaShop and changed the file.
It works the way I wanted.

By the way, you forgot an closing "}" at the end of your code. :side:

Last edit: 7 years 7 months ago by Luchen6.

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

  • Posts: 21
  • Thank you received: 1
  • Hikamarket Frontedition Hikaserial Standard Hikashop Business
6 years 10 months ago #285052

On a desktop the filter module is shown left from the main site content. On a smaller device (tablet / phone) the module is shown below the main site content.

If the filter option is used on a tablet / phone this does not work.
Actually in the file classes/filter.php on line 508 the filter value is not determined, so nothing happens when I enter a filter value and try to filter the result.

Is this familiar to you ?

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 10 months ago #285053

Hi,

No. Could you provide a link to the page with the issue so that we could look at the situation ?
Also, which version of HikaShop are you using now ?

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

  • Posts: 21
  • Thank you received: 1
  • Hikamarket Frontedition Hikaserial Standard Hikashop Business
6 years 10 months ago #285121

Nicolas,
I am using version 3.2.12 of the Business Edition.
The URL of the site (in Dutch) is www.volvokv.nl ; the URL of the webshop is www.volvokv.nl/onderdelenshop

In order to see the filter module you have to login to the site (account send by Private Mail).
The public search module is a regular Joomla search.

A good value to search for is 1003.

Thanks in advance

Last edit: 6 years 10 months ago by Luchen6.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 10 months ago #285127

Hi,

The issue is that you have the same filter module displayed twice on the page:
monosnap.com/file/LuCUw9GO4vfyqOIVm7gikrEZG3kKdn
And since they are the same module with the same id, when you click on the submit button it always validates the last one on the page.
When you are on a desktop, you get to see and use the last one so it works fine.
But when you are on a mobile, you get to see and use the first one even though it's the last one that is submited to the website and that's why it doesn't do anything since the text you entered is not in the data sent.

So the problem is actually not the module. It's the way you/your template duplicated the display of the modules on the page to handle the responsive display of the page.
I would rather recommend to use two different position with two different sets of module instances. That would avoid duplicated ID in your HTML and thus avoid such conflicts.
Or use only one set of modules, and improve your CSS to rearrange the divs on the page without the need for duplication of the elements.

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

  • Posts: 21
  • Thank you received: 1
  • Hikamarket Frontedition Hikaserial Standard Hikashop Business
6 years 10 months ago #285162

Nicolas,

Problem is clear to me now.
Will work on the solution as provided by you.

Thanks for the quick response!

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

  • Posts: 21
  • Thank you received: 1
  • Hikamarket Frontedition Hikaserial Standard Hikashop Business
5 years 2 months ago #310622

When updating Hikashop 4.1.0 to 4.2.1 the code for resetting the filter is not working anymore.

Is there a change in the code?
What happens is that the variable $this->filter_set is not resetted after emptying the search value.

Could you pleas have a look on this?

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
5 years 2 months ago #310626

Hi,

Yes, we had to do many changes in some of the view files of the product view in order to support AJAX filters. So if you have view overrides on product / filter.php or product / listing.php or product / listing_div.php I'm afraid you'll have to redo the override with the new version of the view file in order to get all the modifications for the filters to work properly.

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

Time to create page: 0.077 seconds
Powered by Kunena Forum