Problem with Categories (Brands) Listing Page

  • Posts: 98
  • Thank you received: 3
  • Hikashop Business
2 weeks 2 days ago #312552

-- HikaShop version -- : 4.2.2
-- Joomla version -- : 3.9.12
-- PHP version -- : 7.2.14

Hello, I have a problem with proper display of products on categories listing page.

I created two Brands: Brand ABC and Brand 123
I created two Product Categories: Category ABC and Category 123
I created two Products: Product ABC which is assigned to Brand ABC and Category ABC and Product 123 which is assigned to Brand 123 and Category 123
I created two Categories (Brand) Listing Products menu items: Categories Listing Products ABC with main category assigned to Brand ABC and Categories Listing Products 123 with main category assigned to Brand 123 (I also tried to assign Categories Listing Products ABC to Category ABC and Categories Listing Products 123 to Category 123)

Unfortunately when I use link to the product manufacturer on product page (placed in show_block_dimensions.php) all products assigned to the manufacturer (brand) are display always on Categories Listing Products ABC page and never on Categories Listing Products 123 page.

I am looking for the solution how to display (using link to the product manufacturer on product page) Products ABC assigned to Brand ABC on Categories Listing Products ABC page and Products 123 assigned to Brand 123 on Categories Listing Products 123 page.

Regards,
Greg

Last edit: 2 weeks 2 days ago by Greg_C.

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

  • Posts: 67389
  • Thank you received: 9992
  • MODERATOR
2 weeks 2 days ago #312553

Hi,

What you want to do is to enter the URL of the menu item you want for your brand in the "canonical URL" field of each brand.
Then, if you have the "force canonical URLs on listings" setting activated in the HikaShop configuration, it will use that URL instead of generating it using the current menu item.

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

  • Posts: 98
  • Thank you received: 3
  • Hikashop Business
2 weeks 2 days ago #312575

Hi Nicolas, thank you for your answer

is it possible to import "canonical URL" for the brand during products import from CSV file ? In case of many brands and many products it would be inefficient to complete "canonical URL" manually

if not, is it possible to use different solution for proper presentation of Categories Listing Page ? I plan to have only 4 different Categories Listing Pages - is it possible to change code in show_block_dimensions.php, which would generate listing of products using relevant Categories Listing Pages ?

Regards,
Greg

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

  • Posts: 67389
  • Thank you received: 9992
  • MODERATOR
2 weeks 1 day ago #312586

Hi,

1. No, there is no column for the import of the canonical URL of brands with the CSV import in HikaShop. Maybe there is with the CSV import of CSV Improved (which can import products to HikaShop). You would have to check with them.

2. Well, if you write code in show_block_dimensions, you can do whatever you want.
For example, you could run a MySQL query to load all the menu items from the database of the type "categories listing", and check their parameters to get the one with the "main category" corresponding to the id of the brand in $this->element->product_manufacturer_id
Then, you could just use the id of that menu item instead of the current menu item id and you'll get the exact link you're looking for.

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

  • Posts: 98
  • Thank you received: 3
  • Hikashop Business
1 week 6 days ago #312710

Hi Nicolas, thank you for your feedback

could you give me an example of the code, which allow to get list of products assigned to the manufacturer (of course same manufacturer as product displayed on product page) and present results on Categories Listing Page, which is assigned to same main category (Category Listing Page - Categories Option - Data Display - Main Category) as product is ?

In fact I will have 4 main categories of products (A, B, C, D) and I would like to assign each Categories Listing Pages (Q, X, Y, Z) to one of such categories of products (using Category Listing Page - Categories Option - Data Display - Main Category). Then if user click on the link displayed on product page (e.g. product is assigned to category A and category A is assign to Categories Listing Page Q) then system should show list of products assigned to category A and display this list on Categories Listing Page Q

I know the request is a little exaggerated :) but it can give me a picture either for direct usage or for further customization

Regards,
Greg

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

  • Posts: 67389
  • Thank you received: 9992
  • MODERATOR
1 week 6 days ago #312712

Hi,

I'm sorry but this is a user support forum. I cannot work for a few hours on a custom PHP code.
If that's something you want us to work on for you, that's possible. In that case, please use our contact form to request a quote:
www.hikashop.com/support/contact-us.html
Make sure that you include a link to this thread.

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

  • Posts: 98
  • Thank you received: 3
  • Hikashop Business
1 week 4 days ago #312755

Hi Nicolas, Thank you for your answer. I Understood. However It seems that the solution proposed by me is more user friendly then existing one. In my proposal selection of Categories Listing Page is chosen by the main category assigned to the Categories Listing Page without necessity of additional parameterization of Canonical URL for each Brands (if you have many Brands and more than one Categories Product Listing page existing solution seems to be less practical). Please reconsider if it is not a good idea to implement such a solution in further version of Hikashop

Regards,
Greg

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

  • Posts: 67389
  • Thank you received: 9992
  • MODERATOR
1 week 2 days ago #312767

Hi,

It could be a nice idea to add in the future.
However, this requires to configure one menu item for each brand. In that case, why not just include the menu item URL as canonical URL and activate the "force canonical URLs on listing" setting ? You would then get the same solution, with each brand using its corresponding menu item on the product page. You could even automate that work with a mass action to use the alias of the brand to generate the canonical URL.
So the usefulness of such improvement is limited for the time it will take us to work on that.

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

  • Posts: 98
  • Thank you received: 3
  • Hikashop Business
1 week 2 days ago #312776

Hi Nicolas, Thank you for your answer

If my understanding is proper my proposal doesn’t require to configure one menu item for each brand. My proposal only require to assign proper category to product and proper category to categories listing page. For example if you have 2 categories listing pages:
Categories Listing Page A assigned to Category A (categories options > main category)
Categories Listing Page B assigned to Category B (categories options > main category)
and you have
products assigned to Category A
products assigned to Category B
then if you choose manufacturer from product page (which product is assigned to Category A ) you should see list of products (assigned to this manufacturer and assigned to Category A ) on Categories Listing Page A
same if you choose manufacturer from product page (which product is assigned to Category B ) you should see list of products (assigned to the manufacturer and assigned to Category B ) on Categories Listing Page B
so in this scenario you don’t need further parameterization and this not require to configure one menu item for each brand

Unfortunately I cannot use canonical URL because I am working on multi-language site (two languages) and I am not using Falang or other third party component for translation as well as I am not duplicating products for each language (so I cannot use different aliases for products depends on language). I am just using language override and Joomla multi-language mechanism. So for English product listing my URL looks like that: domain/index.php/en/buy_product/product/productname and for Polish looks like that: domain/index.php/kup_produkt/product/productname. When I try to use canonical URL product is presented only in one language no matter what language is chosen.

Regards,
Greg

Last edit: 1 week 2 days ago by Greg_C.

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

  • Posts: 67389
  • Thank you received: 9992
  • MODERATOR
1 week 2 days ago #312778

Hi,

What I propose is to have one menu item for each brand.
That's basically what you do but you do it through categories with the same name as the brand.
In either case, it doesn't change the fact that there is not already a system to auto select the menu item based on the brand of the product (either directly or through a category with the same name).
Now, if we were to develop that in HikaShop, we would do it directly: we would get the id of a menu item assigned to the brand of the product.
Going through categories is not something I can see done by default in HikaShop. This looks like something really specific to your need.
Having one canonical URL per language per product would indeed require the use of Falang at the moment. Or it could be developed, which would be easier than searching for the corresponding menu item.

Now this thread is about finding a solution to your situation, not about what we could develop in the future in HikaShop. So you can either :
- use Falang with canonical URLs
- develop some custom coding
I don't see any other solution in the short term.

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

  • Posts: 98
  • Thank you received: 3
  • Hikashop Business
1 week 1 day ago #312808

Hi Nicolas, ok, thank you for you information

I have only one additional question regarding multi-language and canonical URL - I really want to avoid implementation of third party components and I did a lot of effort to prepare multi-language working without third party components - do you plan to implement changes which allows to use canonical URL with standard Joomla multi-language solution ? I think it would be very helpful not only for me but also for other Hikashop users

Regards,
Greg

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

  • Posts: 67389
  • Thank you received: 9992
  • MODERATOR
1 week 1 day ago #312813

Hi,

Well, what we could do is support translation overrides for canonical URLs, like we did for the product name.
That would be easy enough.
What I think we could do in the future is have translation overrides support for all the translatable fields and then reuse the translation edition interfaces we developed for Falang support to be able to generate translation overrides. That way, you would get the same function than what you would have with Falang but without Falang. And bonus points, it would be a lot faster (and less hungry in resources) than with Falang.

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

  • Posts: 98
  • Thank you received: 3
  • Hikashop Business
1 week 1 day ago #312838

Hi Nicolas,
it would be great !!
do you think this is possible in the nearest future ?

Regards,
Greg

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

  • Posts: 67389
  • Thank you received: 9992
  • MODERATOR
1 week 10 hours ago #312877

Hi,

Yes, we'll look at adding that for the next release of HikaShop.

The following user(s) said Thank You: Greg_C

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

  • Posts: 98
  • Thank you received: 3
  • Hikashop Business
1 week 9 hours ago #312879

Hi Nicolas, great news :)
thank you !

Regards,
Greg

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

Time to create page: 0.074 seconds
Powered by Kunena Forum