Incorrectly generates an alias and canonical links

  • Posts: 95
  • Thank you received: 0
9 years 5 months ago #236190

-- HikaShop version -- : 2.6.2
-- Joomla version -- : 3.5.1

Hi,
When the automatic generation of an alias if there is a comma in the product name, alias also appears to mark the decimal point. Naturally, the comma in the aliases do not need. How to fix it?

And the second problem
When I turn on the settings "Display the manufacturer", in the item card link appears on the manufacturer. When I turn it on a page where the manufacturer is shown only its description, without the products. But I need to open the page with the manufacturer of its products both in picture 3 when I go to the card manufacturer through a list of all manufacturers. The canonical link to the page manufacturer is shown in picture 4.

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

  • Posts: 84310
  • Thank you received: 13701
  • MODERATOR
9 years 5 months ago #236552

Hi,

1. The conversion of the product name into the alias isn't done by HikaShop but by Joomla via your language package. So the problem should ideally be fixed in your Joomla language package, not in HikaShop.
But we can also add a fix for it, it will be simpler.
Replace the line:

$element->alias = $lang->transliterate($element->alias);
to:
$element->alias = str_replace(',','-',$lang->transliterate($element->alias));
in the file administrator/components/com_hikashop/classes/product.php and that should do it.

2. So the problem is that the thing displaying the brand link on your page doesn't take into account the canonical URL. But it does with the default layout views of HikaShop in recent versions of HikaShop. So I guess you're using old code in a view override for the product page leading to that problem.
From what I can see in your screenshot, I would guess that the problem is with the view file "show_block_dimensions". So please check it.
It should normally have this code:
if($this->config->get('manufacturer_display', 0) && !empty($this->element->product_manufacturer_id)){
	$categoryClass = hikashop_get('class.category');
	$manufacturer = $categoryClass->get($this->element->product_manufacturer_id);
	if($manufacturer->category_published){
		$menuClass = hikashop_get('class.menus');
		$Itemid = $menuClass->loadAMenuItemId('manufacturer','listing');
		if(empty($Itemid)){
			$Itemid = $menuClass->loadAMenuItemId('','');
		}
		$categoryClass->addAlias($manufacturer);
		echo JText::_('MANUFACTURER').': '.'<a href="'.hikashop_contentLink('category&task=listing&cid='.$manufacturer->category_id.'&name='.$manufacturer->alias.'&Itemid='.$Itemid,$manufacturer).'">'.$manufacturer->category_name.'</a>';
		echo "<span style='display:none;' itemprop='brand'>". $manufacturer->category_name ."</span>";
	}
}

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

  • Posts: 95
  • Thank you received: 0
9 years 5 months ago #236590

The first problem is solved, thanks!

The second problem is not resolved. I took your code and put it here in this file /components/com_hikashop/views/product/tmpl/show_block_dimensions.php

Old code looks like this:

if($this->config->get('manufacturer_display', 0) && !empty($this->element->product_manufacturer_id)){
	$categoryClass = hikashop_get('class.category');
	$manufacturer = $categoryClass->get($this->element->product_manufacturer_id);
	if($manufacturer->category_published){
		$menuClass = hikashop_get('class.menus');
		$Itemid = $menuClass->loadAMenuItemId('manufacturer','listing');
		if(empty($Itemid)){
			$Itemid = $menuClass->loadAMenuItemId('','');
		}
		$categoryClass->addAlias($manufacturer);
		echo JText::_('MANUFACTURER').': '.'<a href="'.hikashop_contentLink('category&task=listing&cid='.$manufacturer->category_id.'&name='.$manufacturer->alias.'&Itemid='.$Itemid,$manufacturer).'" itemprop="brand" itemscope itemtype="http://schema.org/brand">'.$manufacturer->category_name.'</a>';
	}
}

After the change has been no change.

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

  • Posts: 95
  • Thank you received: 0
9 years 4 months ago #237168

Hello, so can second my problem solved or not?

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

  • Posts: 84310
  • Thank you received: 13701
  • MODERATOR
9 years 4 months ago #237264

Hi,

Please download again the 2.6.2 install package from our website and install it on your website. We've added several patches since the release regarding the menu items handling.
If you still have the problem after that, it means that the problem is with the settings of the menu items.
We would need a backend access in that case in order to check their settings to be able to say more on what's going on.

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

  • Posts: 95
  • Thank you received: 0
9 years 4 months ago #237374

Hello,

I install the latest version, but the problem has not disappeared. Data for access to the admin will send you through the form of an indication of the number of the topic.

Also just accidentally revealed another problem. Please also look at it through the admin panel. The essence of the problem, one of the producers (Brit) according to the manufacturer of the filter module for some reason does not appear, although the product manufacturer is selected. I checked all the settings, and in the module, and the appropriate filter. I recorded a video for the understanding that all all-inclusive, but does not appear in the filter manufacturer, I hope it will clear the error.

https://drive.google.com/open?id=0B4-sU1nFmYJ-TnlmN2hCdTJWeU0

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

  • Posts: 84310
  • Thank you received: 13701
  • MODERATOR
9 years 4 months ago #237393

Hi,

1. So you problem is exactly what I had said here:
www.hikashop.com/forum/product-category-...al-links.html#236552
take.ms/UsBqR
You don't have the correct code in the show_block_dimensions file.
You must not have checked the correct file.
I've changed the code for you and it works fine now.

2. Turn off the "dynamic display" of your filter and it should help.

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

  • Posts: 95
  • Thank you received: 0
9 years 4 months ago #237453

nicolas wrote: Hi,

1. I've changed the code for you and it works fine now.


Apparently I'm not quite true that some did. Now everything is fine, thank you, I'm with you! :)

nicolas wrote: Hi,

2. Turn off the "dynamic display" of your filter and it should help.


Unfortunately, this option does not suit me, if I turn off the dynamic display in the category "food" in the filter output is absolutely all manufacturers, not just food producers, violated the very filter action logic for the buyer, why would he in the category "food" to see manufacturers from the category for example, "tanks"?
In addition, in a strange way that the function "dynamic display" only affect one particular producer, the others are displayed correctly with this option enabled.

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

  • Posts: 84310
  • Thank you received: 13701
  • MODERATOR
9 years 4 months ago #237462

Hi,

2. Then just make sure that at least one product in the listing is linked to that brand and it will display in the dropdown of the filter.

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

  • Posts: 95
  • Thank you received: 0
9 years 4 months ago #237581

nicolas wrote: Hi,

2. Then just make sure that at least one product in the listing is linked to that brand and it will display in the dropdown of the filter.


In fact of the matter is that this is all right, all the products associated with this brand, in the video I showed, but the drop-down filter list, while the dynamic display of this brand is not displayed.

And just discovered another strange problem, perhaps it is linked with the latest adjustments that you have made since I did not change any settings. In this category are not only displayed http://www.keks-store.ru/katalog/koshki/napolniteli-dlya-koshek products in this category! There is some conflict, because not displayed yet and some modules. Natural products are assigned this category. Please help, I have a whole section of the goods available for sale :(

Last edit: 9 years 4 months ago by Keks-Store. Reason: New problem

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

  • Posts: 84310
  • Thank you received: 13701
  • MODERATOR
9 years 4 months ago #237716

Hi,

I'm not following you.
When I go to a category where there is at least a product associated with that "brit" brand, I do see it in the brand filter:
take.ms/Bg4C6
So as far as I can see, it works just fine.

Please provide more details to reproduce the problem you're talking about because I don't see any problem.

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

  • Posts: 84310
  • Thank you received: 13701
  • MODERATOR
9 years 4 months ago #237717

Hi,

And regarding your other problem with the display of the products, the problem coems from your template view overrides.
Rename the file templates/YOUR_TEMPLATE/html/com_hikashop/category/listing.php via FTP and that should solve the problem.

I would recommend to contact your template provider to notify them about that problem with their template.

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

  • Posts: 95
  • Thank you received: 0
9 years 4 months ago #237719

nicolas wrote: Hi,

I'm not following you.
When I go to a category where there is at least a product associated with that "brit" brand, I do see it in the brand filter:
take.ms/Bg4C6
So as far as I can see, it works just fine.

Please provide more details to reproduce the problem you're talking about because I don't see any problem.


You do not see a problem because it is present only in this category http://www.keks-store.ru/katalog/sobaki/korm
On your picture you are in the category http://www.keks-store.ru/katalog/koshki/korm

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

  • Posts: 95
  • Thank you received: 0
9 years 4 months ago #237745

nicolas wrote: Hi,

And regarding your other problem with the display of the products, the problem coems from your template view overrides.
Rename the file templates/YOUR_TEMPLATE/html/com_hikashop/category/listing.php via FTP and that should solve the problem.

I would recommend to contact your template provider to notify them about that problem with their template.


Straight to the point, thank you! :)
But in the same category is not displayed HikaShop Filter Module. Also need to rename any file pattern?

Last edit: 9 years 4 months ago by Keks-Store. Reason: New problem

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

  • Posts: 84310
  • Thank you received: 13701
  • MODERATOR
9 years 4 months ago #237850

Hi,

1. I think I understand the problem. It's that the products linked to that brand don't have a price configured in their main product, and the way the query is done to load the brands of the products on the current listing depends on that.
Change the line:
hikashop_addACLFilters($conditions, 'price_access', 'pprice');
to:
hikashop_addACLFilters($conditions, 'price_access', 'pprice', 2, true);
in the file administrator/components/com_hikashop/classes/filter.php and that should solve that problem.

2. It's normal. You've turned off the "categories listing" display option of the filter module and that menu item is a categories listing menu item.

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

  • Posts: 95
  • Thank you received: 0
9 years 4 months ago #237853

All the problems have been solved, thank you!

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

Time to create page: 0.091 seconds
Powered by Kunena Forum