Jump to content

Truncate accessory name in non default theme ? Solution found, sharing.


Recommended Posts

Hi,

I've been working with prestashop for two months.

 

I am looking to find out how to shorten the name of a product in accessories because it messes up the look of the site when the accessories aren't as long as each other.

 

CASQUE STUDIO BEYERDYNAMIC DT 770 PRO...

next to

CASQUE STUDIO BLUE MO-FI

changes the height of the first and makes it look weird.

 

I needed to truncate to 24.

 

I did this by changing the code in my-active-theme/productdetail-right.tpl:

 

<a href="{$accessoryLink|escape:'html':'UTF-8'}">
{$accessory.name|truncate:24:'...':true|escape:'html':'UTF-8'}
</a>
 
I hope this helps someone.
 
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...