Breadcrumbs change incorrectly for related product

  • Posts: 11
  • Thank you received: 0
10 years 8 months ago #187398

-- url of the page with the problem -- : 192.185.162.78/~whiteice/index.php?optio...&category_pathway=56
-- HikaShop version -- : 2.3.5
-- Joomla version -- : 3.3.6

On the site I am currently working on when you go to a related product the top level category changes in the breadcrumbs.
The site has 4 main categories. Paint, SafeT Mark, Hockey and Curling. Hockey and Curling have several sub-categories. If I am in a product in curling and click on a related product the sub category in the breadcrumbs remains correct but the top category Curling switches to Hockey. Most of the products/related products that this is happening on are not anywhere in any of the Hockey subcategories.

You should be able to see this happening in the url provided.

Any suggestions?

Last edit: 10 years 8 months ago by Heckman.

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

  • Posts: 11
  • Thank you received: 0
10 years 8 months ago #187401

As an added note I also noted whether going to a related product in hockey or curling sections the breadcrumbs also drop the subcategory and add in the product that it was related to.

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

  • Posts: 26275
  • Thank you received: 4046
  • MODERATOR
10 years 8 months ago #187494

Hi,

The link of the related product does not have a "category_pathway".
192.185.162.78/~whiteice/index.php?optio...&related_product=248
So, HikaShop is using the information from the "related product" parameter to build the breadcrumb.

You can edit the file "components/com_hikashop/views/product/view.html.php" and replace

$pathway_sef_name = $config->get('pathway_sef_name','category_pathway');
$related_sef_name = $config->get('related_sef_name','related_product');
$category_pathway = JRequest::getInt($pathway_sef_name,0);
$category_pathway = '&'.$pathway_sef_name.'='.JRequest::getInt($category_pathway,0).'&'.$related_sef_name.'='.$product_id;
By
$pathway_sef_name = $config->get('pathway_sef_name','category_pathway');
$related_sef_name = $config->get('related_sef_name','related_product');
$category_pathway = '&'.$pathway_sef_name.'='.JRequest::getInt($pathway_sef_name,0).'&'.$related_sef_name.'='.$product_id;
It will keep the category_pathway and the url and you will have something better in the breadcrumb:
192.185.162.78/~whiteice/index.php?option=com_hikashop&ctrl=product&task=show&cid=250&name=bootboy-waterpan-regular&Itemid=253&category_pathway=56&related_product=248

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 11
  • Thank you received: 0
10 years 8 months ago #187600

Worked wonderfully
Thank you

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

Time to create page: 0.067 seconds
Powered by Kunena Forum