set specific category for related products

  • Posts: 251
  • Thank you received: 2
13 years 1 month ago #33402

Hi Nicolas it is possible to set a specific category for the url of related products?

i.e.

www.mysite.com/maincategory/product/show/product-nameX
In this product page I can have some related products that have "maincategory" in their url


I can also have
www.mysite.com/categoryXXX/product/show/product-nameY

In this product page the url of the related products it will be
www.mysite.com/categoryXXX/product/show/...meA/related_productB

It is possible to always have "maincategory" so

www.mysite.com/maincategory/product/show...meA/related_productB

I hope it's clear.

Thank you!

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

  • Posts: 83103
  • Thank you received: 13416
  • MODERATOR
13 years 1 month ago #33461

Hi,

Yes, it's possible. You should edit the hikashop options of your related products module and select the menu which uses that "maincategory" alias in the "menu" option. You can access the hikashop options of your module via the menu Display->Content modules.

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

  • Posts: 251
  • Thank you received: 2
13 years 1 month ago #33519

Maybe I didn't understood!

I selected the menu which uses "maincategory" in the related products module but, as you can see in the image, nothing changes



In my case the maincategory is "catalogo" but in the bottom of page, the category in the url is "top-design"

Attachments:

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

  • Posts: 83103
  • Thank you received: 13416
  • MODERATOR
13 years 4 weeks ago #33565

Could you add the code:
$module_item_id = $this->params->get('itemid');
if(!empty($module_item_id)){
$url_itemid='&Itemid='.(int)$module_item_id;
}

before the code:
if(empty($category_pathway) && !empty($menu) && strpos($menu->link,'option='.HIKASHOP_COMPONENT)!==false && (strpos($menu->link,'view=category')!==false || strpos($menu->link,'view=')===false) && !JRequest::getInt('no_cid',0)){
$category_pathway = '&category_pathway='.reset($pageInfo->filter->cid);
}

in the file components/com_hikashop/views/product/view.html.php and try again (making sure that you selected the menu you want in the menu option of your module ) ?

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

  • Posts: 251
  • Thank you received: 2
13 years 4 weeks ago #33611

Great! It works!

Thank you!

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

  • Posts: 83103
  • Thank you received: 13416
  • MODERATOR
13 years 4 weeks ago #33613

We'll add that modification in next release.

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

  • Posts: 251
  • Thank you received: 2
13 years 4 weeks ago #33615

Great work!
This modification, without "related_product" and "category_patway" at the end of urls prevents some of content duplications.

;)

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

  • Posts: 83103
  • Thank you received: 13416
  • MODERATOR
13 years 4 weeks ago #33644

The related_product and category_pathway parameters are needed to calculate the breadcrumbs correctly. That's why we can't just remove them. But we'll look at adding an option for that in a future release.

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

  • Posts: 251
  • Thank you received: 2
13 years 4 weeks ago #33684

Sure! I know!
but you should find a way to create url not indexable by search engines, with this parameters. ;)

I have much problems of duplicated contents, cause of different categories... and I'm working hard to resolve.

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

  • Posts: 60
  • Thank you received: 8
12 years 10 months ago #41685

We upgraded to the latest version of hikashop 1.5.6 but we are not seeing the feature to turn off the ?related_product= in the URLs.

We are getting lots of duplicate content for this and would like to remove that from our product urls.

In the 1.5.6 changelog it says:

"You can now have URLs without the category_pathway and related_product parameters thanks to a new option of the configuration for SEF. It is activated by default only for new installations "

We did an upgrade instead of a new installation. Where do we go to activate this?

I have attached a screen shot of what we are seeing in our configuration area in the SEF url options. Is there somewhere else we go to activate this?


Ecommerce expert for hire. DaveKarlsven.com

I love helping businesses make lots of money online.
Attachments:

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

  • Posts: 83103
  • Thank you received: 13416
  • MODERATOR
12 years 10 months ago #41859

It's the option "simplified breadcrumbs" which needs to be turned on as you already did.

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

  • Posts: 251
  • Thank you received: 2
12 years 10 months ago #41924

Hi Wildfire,

for me the only and simply way to solve the problem of duplicated contents is to set to "no index" the parameters "related_product" and "category_pathway" through the google webmaster tool...
If the pages with this parameters are already indexed, it still be reachable as well.

Bye

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

  • Posts: 60
  • Thank you received: 8
12 years 10 months ago #41982

Nicolas,

We set the "Simplified Breadcrumbs" option to "Yes", but the "related_produt=..." is still showing up on the end of our URLs.

Is there anything else that needs to be changed to get rid of the parameters on the end of the related products urls?

Here is an example of a page on our site with the related products so you can see what the related product urls look like:

www.glasstilewarehouse.com/khaki-tan-blend


Ecommerce expert for hire. DaveKarlsven.com

I love helping businesses make lots of money online.

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

  • Posts: 83103
  • Thank you received: 13416
  • MODERATOR
12 years 10 months ago #42061

I checked the code and I think that there is a piece missing.

In the file components/com_hikashop/views/product/view.html.php

add the code:

if($config->get('simplified_breadcrumbs',1)){
			$category_pathway='';
		}
before the code
$this->assignRef('category_pathway',$category_pathway);

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

  • Posts: 60
  • Thank you received: 8
12 years 10 months ago #42148

Thanks, Nicolas. That did the trick.

We now have very SEO friendly URLs on our site with absolutely no duplicate content issues, thanks to Hikashop and AceSEF.

Awesome!


Ecommerce expert for hire. DaveKarlsven.com

I love helping businesses make lots of money online.

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

Time to create page: 0.092 seconds
Powered by Kunena Forum