Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Long product name


Recommended Posts

Hi guys! sorry to fill this forums with silly question, but I do not have no ther places to ask for help...


Some of my products names are very long, hence specially the "New Product Notification" box is automaitaclly expand to ajust the long name. This is messing up my box setting "150 Pixel"


Could you guys please advise me how to fix this?


I tried to edit "Product_info.php" file with no luck.


Some one please help me....thanks


For example, if I have a very long name, I want the name to be appear like


Long na ...

thanks guys

Link to comment
Share on other sites

Some things have been removed to simplify the example.


<td><?php echo $products_name; ?></td>



replace with


<td><?php echo substr($products_name, 0, NL); ?>....</td>


where NL is the number of letters you want to appear, like 7 in your example to shorten Long name to Long na....


There is supposed to be four ellipsis points with no space when it comes at the end of a sentence, although I am not sure the name qualifies as a sentence. Use a space before and after an ellipsis if used in the middle of sentence.


substr (the string to shorten, starting character[, length of characters])

while (!succeed) {try()};


GMT -6:00

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...