Trim Product Name Length

  • Posts: 61
  • Thank you received: 0
11 years 5 months ago #111210

Is there an easy way to trim the product name length? or do I have to hack the code to do this myself?
In case you are lost about what I am talking about.

"This is a very long product name"
becomes
"This is a..."

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

  • Posts: 13201
  • Thank you received: 2322
11 years 5 months ago #111229

Hi,

You will have to edit the view where the product name must be trimmed.
If it's in the product listing, just edit the view "product / listing_img_title" and add the trim on "echo $this->row->product_name;"
To edit the view you have to go in the Display > Views menu.

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

  • Posts: 61
  • Thank you received: 0
11 years 5 months ago #111317

Is there a way to do this in an update safe manner?

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

  • Posts: 2334
  • Thank you received: 403
11 years 5 months ago #111320

The method Xavier gave you is update safe ;)
Hikashop views system allow users to override files so it is preserved during an update.
If you want to use the original view, you can delete your customization and the last version of the view will be used.

if you want more informations about our view system, take a look at our documentation: www.hikashop.com/fr/support/documentatio...ashop-view-form.html

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

  • Posts: 61
  • Thank you received: 0
11 years 4 months ago #118782

Are you saying the file:
"product / listing_img_title" will not be overwritten if I update the software?

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

  • Posts: 13201
  • Thank you received: 2322
11 years 4 months ago #118805

Hi,

If you edited that view form the menu Display > Views, it will not be overwritten if you update.
Your will keep your changes.

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

Time to create page: 0.083 seconds
Powered by Kunena Forum