tag in product name

  • Posts: 35
  • Thank you received: 0
13 years 4 months ago #21322

Hi,

I'm adding a <br /> tag in my product names in order to get the right display in the product list (divs).
But then the <br /> is displayed as the browser page title for the product, which makes sense but does not look so good.
Any idea or workaround?

Here is the page where it happens: www.mandaline.fr/index.php/accessoires

Many thanks

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 4 months ago #21333

Hi,
You can change the code:
$document->setTitle( $product_name );

to:
$document->setTitle( strip_tags($product_name) );

in the file components/com_hikashop/views/product/view.html.php in order to fix the problem. We'll do that on our end too

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

  • Posts: 35
  • Thank you received: 0
13 years 4 months ago #21334

Thanks!

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

  • Posts: 35
  • Thank you received: 0
13 years 4 months ago #21778

Hi Nicolas,

I notices that the tag also appears in the url as "lbr-g"
Can I do something to make this URL more SEF?

See one of my product URLs :
www.mandaline.fr/index.php/component/hik...-meditation?Itemid=0

Thanks
Mathieu

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 4 months ago #21781

Hi,

You need to change the lines:
$rows[$key]->alias = $app->stringURLSafe($row->product_name);

$rows[$key]->alias = JFilterOutput::stringURLSafe($row->product_name);

$element->alias = $app->stringURLSafe($element->product_name);

$element->alias = JFilterOutput::stringURLSafe($element->product_name);

$prod->alias = $app->stringURLSafe($prod->product_name);

$prod->alias = JFilterOutput::stringURLSafe($prod->product_name);

by:
$rows[$key]->alias = $app->stringURLSafe(strip_tags($row->product_name));

$rows[$key]->alias = JFilterOutput::stringURLSafe(strip_tags($row->product_name));

$element->alias = $app->stringURLSafe(strip_tags($element->product_name));

$element->alias = JFilterOutput::stringURLSafe(strip_tags($element->product_name));

$prod->alias = $app->stringURLSafe(strip_tags($prod->product_name));

$prod->alias = JFilterOutput::stringURLSafe(strip_tags($prod->product_name));

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

We'll add that to next release.

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

  • Posts: 35
  • Thank you received: 0
13 years 4 months ago #21887

Thanks Nicolas, it works great + I'm happy if I can contribute (just a little) and help you make Hikashop even better!

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

Time to create page: 0.063 seconds
Powered by Kunena Forum