Problem with filter in categories

  • Posts: 28
  • Thank you received: 3
  • Hikashop Business
3 years 11 months ago #334851

Hello
I have a problem with filtering. I have different categories and subcategories. As you can see, filtering works fine with all categories without subcategories. But when I click on "Halsbänder", no product is showing. What am I doing wrong? I also tried to set up a second filter for all subcategories in "Halsbänder", but again, no product is showing. Thanks for a help!

Alexandra

Attachments:

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

  • Posts: 84051
  • Thank you received: 13626
  • MODERATOR
3 years 11 months ago #334853

Hi,

The categories filter doesn't support sub categories. So if you want to have products displayed as results of selecting a category, these products need to be directly linked to the selected category.
Now each product can be linked to several categories. So you could add both the sub category and the main category to these products and they would then appear when using the filter on the main category.
Note also that alternatively to a category filter, you could use a HikaShop content module configured to display your categories, like we've done with the "CATEGORIES" module on the left sidebar of our demo website:
demo.hikashop.com/index.php/en/
That "CATEGORIES" module is actually a HikaShop content module configured to display two levels of categories. There's actually by default a "categories on 2 levels" module instance of the HikaShop content module preinstalled and preconfigured for you when you install HikaShop the first time on a Joomla website, so you might just need to go in your Joomla modules manager and enable it and position it to your template's preferred position to get what you want.

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

  • Posts: 28
  • Thank you received: 3
  • Hikashop Business
3 years 10 months ago #335008

Thank you – I could fix that, but facing another problem: In my product listing "Halsbänder", I activated infinite scroll. I have 78 products in this category; but only 41 are shown in frontend… Any suggestions?

And there is another very strange thing I just can't figure out: If you click on a product with the category "Halsbänder Leder und Filz kombiniert" (without clicking the filter) in the product listing "Halsbänder", it's generating an url without category, eg.: shop.pogo.dog/index.php/alle-halsbaender/product/pocahontas . But if you click on a product with the category "Halsbänder aus Filz" or "Halsbänder aus Leder", it's generating an url with the category in it, eg.: shop.pogo.dog/index.php/halsbaender/hals...sband-summer-of-love – that one is correct in my opinion. Where is the problem? I tried with deleting the category "Halsbänder Leder und Filz kombiniert" and setting up a new; but it doesn't work… As a result, some modules are shown on the product page of products in the category "Halsbänder Leder und Filz kombiniert" but not on the product page of the products in the other categories… Tried for hours to find a solution :S

Alexandra

Last edit: 3 years 10 months ago by alevogel.

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

  • Posts: 84051
  • Thank you received: 13626
  • MODERATOR
3 years 10 months ago #335011

Hi

1. If you turn off the "infinite scroll" setting of the menu item, you should normally see a pagination on the products listings (if you didn't deactivate the "pagination" option of the HikaShop configuration page).
Can you do that and check what the pagination says ?
If it says 41 total elements too, then it means that the issue has nothing to do with the infinite scroll system. It's likely that you don't see the other products because of how the menu item is configured. We would need a screenshot of the settings under the "products options" tab of the menu item to be able to check how you configured the listing. For example, if you've turned off the "out of stock" setting, then only products with a stock will appear on the listing. Or if you've turned on the "discounted only" setting, only products with a discount applying on them will appear on the listing.
If it says the total number of elements you expect in the normal pagination, then it's likely to be a bug with the infinite scroll system. Similarly we would still need a screenshot of the settings under the 'products options' tab of your menu item to better understand the situation.
Also, please make the screenshot while logged in English as it is otherwise hard for us to check each setting and we might miss something.


2. Regarding the URL of the products, I suppose that the URL you get correspond to the "canonical URL" you've configured in each product and you must have the "force canonical URLs on listings" setting activated in the HikaShop configuration. In that case, the system uses the canonical URL you specified in the "canonical URL" field of the product, regardless of the categories of the products etc. So if you want the URLs of some products to include the category alias, you'll want to update their canonical URL to reflect that.

Last edit: 3 years 10 months ago by nicolas.

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

  • Posts: 28
  • Thank you received: 3
  • Hikashop Business
3 years 10 months ago #335039

Hi

1. I disabled infinite scroll – yet, not all products are showing, but some more – 55 now… Please find a screenshot of the product options tab in die menu "Halsbänder".

2. I removed canonical urls in all products and set "Force canonical urls in listings" to no. But still the same problem: all products from categories "Halsbänder aus Filz" und "Halsbänder aus Leder" appear with category in url, all products from category "Halsbänder Leder und Filz kombiniert" without… Please find as screenshot as well.


Thanks, Alexandra

Attachments:

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

  • Posts: 84051
  • Thank you received: 13626
  • MODERATOR
3 years 10 months ago #335046

Hi,

1. You have the "recently viewed" setting activated in the settings of the menu item. In that case, the listing will only display the products which you had look at (their product page).
So you want to turn off that setting so that the listing is consistent, regardless of what the customer does on the website.

2. I can see two reasons why this would happen even though you have the "force canonical URLs on listings" setting turned off:
- You have caching on your website preventing you from seeing the change. You would have to clear the cache.
- You don't have a consistent main category (the first one in the "categories" setting of each product) in each product or you don't have a menu item for each sub category under the main menu item of the shop. We have a mechanism whereby HikaShop will try to find a menu item matching with the main category of the product (by looking at the "main category" setting of the menu item) and if there is a match, the system will switch to the sub menu item instead of staying on the current menu item.
This mechanism can actually be disabled by adding an entry with the namekey auto_search_menu_item_based_on_main_category and the value 0 in the hikashop_config table via your PHPMyAdmin

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

  • Posts: 28
  • Thank you received: 3
  • Hikashop Business
3 years 10 months ago #335054

Thank you – but still not working:

1. I turned off "recently viewed" and cleared browser cache – still not all products disappear. In the categories, all products appear…
2. I cleared browser cache – no change. I made a (hidden) submenu for each category in the main category "Halsbänder" (see attachment) – nothing changes…

Attachments:
Last edit: 3 years 10 months ago by alevogel. Reason: wrong attachment

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

  • Posts: 84051
  • Thank you received: 13626
  • MODERATOR
3 years 10 months ago #335063

Hi,

1. Besides the obvious "out of stock" setting activated, which means that product without stock won't be displayed on the listing, I don't see any other reason why all the products wouldn't display.
I guess we would need a backend access to check your settings further because as far as I can see it looks ok.
You can provide that via our contact form:
www.hikashop.com/support/contact-us.html
Make sure you include a link to this thread for reference.

2. Most of the products seem to have the corresponding sub menu item alias in the URL as far as I can see. I suppose that for those which don't, it's because their main category (the first one in their "categories" setting) is not the sub category but another category and thus the system can't match the sub menu items' main category with the main category of the product and thus it uses the alias of the current "alle-halsbaender" menu item.
So please check that.

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

  • Posts: 28
  • Thank you received: 3
  • Hikashop Business
3 years 10 months ago #335067

Hi
1. Changing that setting doesn't help… I provide you backend access.
2. Categories are correct and consistent…

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

  • Posts: 84051
  • Thank you received: 13626
  • MODERATOR
3 years 10 months ago #335080

Hi,

We got your backend access. However, there is a htaccess authentication on your backend on top of the Joomla backend login form and you didn't provide the information for the htaccess authentication. Could you also provide this please ?

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

  • Posts: 28
  • Thank you received: 3
  • Hikashop Business
3 years 10 months ago #335081

Sorry – I just removed administrator protection, so you should be able to login now.

Alexandra

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

  • Posts: 28
  • Thank you received: 3
  • Hikashop Business
3 years 10 months ago #335093

Could you access backend now?

Alexandra

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

  • Posts: 84051
  • Thank you received: 13626
  • MODERATOR
3 years 10 months ago #335094

Hi,

Yes, sorry for the delay most of the team is in vacations here.

1. Regarding the loading of the products missing some of them, from what I could check on your website, it seems to be a bug with the "semi-randomization" of the order of the products on the listing.
I think I found the solution. Add the line:
$start = 0;
after the line:
$already_used = array();
in the file components/com_hikashop/views/product/view.html.php and it should fix the problem.
If not please provide a FTP access so that we can look deeper into it.

2. I don't see a problem there.
I checked a few products and all the products for which the sub category alias was not in the URL was because the sub category was not the main category of the product. For example, I swapped the categories of the "Halsband Squaw" product so that the "Halsbänder Leder und Filz kombiniert" is the first one instead of being the second one in its "categories" setting and its link changed from shop.pogo.dog/alle-halsbaender/product/halsband-squaw to shop.pogo.dog/alle-halsbaender/halsband-...oduct/halsband-squaw
So it's consistent with what I had supposed was the problem and what I told you to do to fix it.
So please check again.

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

  • Posts: 28
  • Thank you received: 3
  • Hikashop Business
3 years 10 months ago #335102

Hi Nicolas
Thank you for help.

1. I tried your solution – it didn't help, but brought several blank pages… So I deleted line again. But actually, clicking on content module filter "Halsbänder aus Leder" now produces a blank page… As I would like to go live with my shop, it's quite urgent to solve this problem.
shop.pogo.dog/hikashop-menu-for-module-1...egory/halsband-leder
I provide you FTP Access via contact form.

2. There was obviously a misunderstanding: I didn't realise, that sorting of the categories in the product has an effect on the view… Now, everything is clear.

Alexandra

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

  • Posts: 84051
  • Thank you received: 13626
  • MODERATOR
3 years 10 months ago #335111

Hi,

I've made the modification for you.
I didn't notice white pages.
However, I did notice that your website often sends back 500 HTTP errors. But that's not really linked to the modification. Even without it, I'm regularily getting 500 HTTP errors even on normal product listing pages.
Now it's impossible to say why as a 500 HTTP error is a generic error returned by the web server. The real error message must have been logged in the PHP error log of the hosting which isn't available with the FTP access or in the backend of the website.
I would recommend you to check with your hosting support how to access that PHP error log if you don't know to look for the reason of that 500 error. You should find in it many "Fatal error" messages explaining what's going on.
I would say that it's likely a limitation of your hosting regarding resources (memory / processing) since the same page will display fine one time, and when refreshing it, it might display the 500 error or fine. If it was a bug in HikaShop, the issue would happen all the time. So I'm inclined to think that there is some kind of limitation. Turning off the "random" option of the menu item seems to help a bit (it's less resource hungry) but the issue still happens for some pages of the pagination when using the infinite scroll.
I've keep the random option turned off for now on your main menu item to avoid the issue.

I've also removed the category listing module at the top and changed the type of the menu item to a categories listing instead of a products listing. That way, it displays the same but it's a bit less resources hungry.

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

  • Posts: 28
  • Thank you received: 3
  • Hikashop Business
3 years 10 months ago #335112

Hi
I just talked with my hosting provider: There must be something wrong in the shop system – they upgraded resources for testing up to 1 GB; but still hikashop is asking for more resources and blank pages/error 500 appears. They also restarted all PHP processes; but still the same problems.

Actually, the problems with error 500 appeared first time this morning, when I changed the PHP file. Before, everything was ok (except not showing all products in random view). So I would be very happy, if you could check again; I really think it has something to do with the changes I/you made in the PHP.

Alexandra

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

  • Posts: 84051
  • Thank you received: 13626
  • MODERATOR
3 years 10 months ago #335114

Hi,

The only change I made is the one I told you about before.
I didn't change anything else.
So you can always revert that change.
However, I had 500 errors before that change too.
So again, I don't think it's linked to that.
The problem though is that we don't know why the server is giving back a 500 error. And without information from the logs of the server, I don't know what is causing the 500 error.
Can't they check the logs of the server to see what is causing these 500 errors ?

Last edit: 3 years 10 months ago by nicolas.

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

  • Posts: 28
  • Thank you received: 3
  • Hikashop Business
3 years 10 months ago #335117

Hi
It‘s just strange, that everything worked well until yesterday evening; I just can‘t explain, what sudden problem it could be. I downloaded the error log of today and the one of yesterday as well. Maybe it helps to find the problem? For me, unfortunately, it‘s just like „chinese“ – I don‘t understand anything…

Thank you
Alexandra

File Attachment:

File Name: shop.pogo....logs.txt
File Size:95 KB

Attachments:

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

  • Posts: 28
  • Thank you received: 3
  • Hikashop Business
3 years 10 months ago #335118

UPDATE: Just figured out the problem! There are 3 products in the category „Halsbänder aus Leder“ that caused the problem… When I wanted to modified them yesterday with a mass action, the action „freezed“. So I guess, that has caused the whole mess. Now, everything works fine – including infinite scroll and random product, also content modules don‘t cause any problems :) :) :) :)

Thanks a lot for your patience and always very fast help!

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

Time to create page: 0.111 seconds
Powered by Kunena Forum