variantname for breadcrump

  • Posts: 503
  • Thank you received: 21
  • Hikashop Business
5 years 9 months ago #293553

-- HikaShop version -- : 3.3.0
-- Joomla version -- : 3.8.8
-- PHP version -- : 7.0

Hi,

Is there a way to have the variantname displayed in the breadcrump?

Now it always shows the productname, even when using a canonical url for the variant.
f.e.: jouwnaambord.nl/aluminium-basis-naambord...1-basis-naambordje-1

B.R.

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

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
5 years 9 months ago #293556

Hi,

There is no option for that.
You would have a view file of the product page like product / show.php and add custom PHP to fill in the breacrumb yourself:
www.samontheweb.co.uk/add-or-remove-item...a-breadcrumb-system/
Or you could also change the code in components/com_hikashop/views/product/view.html.php :

$pathway->addItem($product_name, hikashop_completeLink('product&task=show&cid='.(int)$element->product_id.'&name='.$element->alias.$category_pathway.$url_itemid));
Instead of $product_name, you could use $this->element->product_name

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

  • Posts: 503
  • Thank you received: 21
  • Hikashop Business
5 years 9 months ago #293584

Hi Nicolas,

Thanks, I changed the line in the component. It changes the breadcrumb to the right name, but also adds a <span class> to it:

jouwnaambord.nl/aluminium-basis-naambord...1-basis-naambordje-1

Is there a way to strip this?

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

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
5 years 9 months ago #293588

Hi,

You can use the strip_tags function on the variable $product_name.
So instead of $product_name you would have strip_tags($product_name)

The following user(s) said Thank You: michelpouli

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

  • Posts: 503
  • Thank you received: 21
  • Hikashop Business
5 years 9 months ago #293675

Thanks Nicolas,

That's just the way I wanted it.

Michel.

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

Time to create page: 0.059 seconds
Powered by Kunena Forum