Skip to main content

Adding line break to product name for display

More
11 years 8 months ago #188448 by Anastasis
-- 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.

More
11 years 8 months ago #188451 by Jerome
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.

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

More
11 years 8 months ago #188551 by Anastasis

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.

More
11 years 8 months ago #188558 by Jerome
Hi,

The documentation page and the link are correct ; Even if the displayed text is truncated...
Here the no-truncated version:
Code:
http://www.hikashop.com/support/documentation/153-customize-the-display.html

Regards,

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

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

More
11 years 3 months ago #205036 by elbertbos
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.

More
11 years 3 months ago #205043 by nicolas
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.187 seconds
Powered by Kunena Forum