Adding line break to product name for display

  • Posts: 13
  • Thank you received: 0
10 years 7 months ago #188448

-- HikaShop version -- : 2.3.5
-- Joomla version -- : 3.3.6

When a product name takes up more than one line in the product display grid it wraps to the second like. That's fine in many cases, but sometimes, it's just to much for one line by a small amount so that the top linke can be filled with text whilst the second line has a small amount of text on the second line. Visually it would look better if the text were more evenly split between the lines.

An example is here:
_______________
This is the product
name



but how to do this:

_______________
This is the
product name

Is it possible to add a line break in a product name?

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

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
10 years 7 months ago #188451

Hi,

It can be done with just CSS rules.
www.hikashop.com/support/support/documen...ize-the-display.html

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: 13
  • Thank you received: 0
10 years 7 months ago #188551

Jerome wrote: Hi,

It can be done with just CSS rules.
www.hikashop.com/support/support/documen...ize-the-display.html

Regards,

Thanks again Jerome, but unfortunately I am getting the same problem as with my other post in that the page the link takes me to is unavailable. Please can you update the link. Thank you.

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

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
10 years 7 months ago #188558

Hi,

The documentation page and the link are correct ; Even if the displayed text is truncated...
Here the no-truncated version:

http://www.hikashop.com/support/documentation/153-customize-the-display.html

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: 43
  • Thank you received: 0
10 years 2 months ago #205036

Hi,
What do I add to/change in the code to add a line break?
I can't find it there.

Regards

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

  • Posts: 84304
  • Thank you received: 13699
  • MODERATOR
10 years 2 months ago #205043

Hi,

It's not possible to add a break line in the product name. The br tag is stripped automatically by the system if you try.
And that's normal since otherwise, you would also have the break line everywhere: on the checkout, in the order, the invoices, the emails and it would just look bad.
Now if you really want to do that, you can change the line:
$noFilter = array();
to:
$noFilter = array('product_name');
in the file administrator/components/com_hikashop/classes/field.php but I don't recommend it.

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

Time to create page: 0.073 seconds
Powered by Kunena Forum