[Skip to main content](#vessel-content)

#   Truncate Product Name length

##

- **[in2computing](/forum/user/9278-in2computing "View in2computing's Profile")**
- [![in2computing's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar9278.png)](/forum/user/9278-in2computing "View in2computing's Profile") Topic Author
- [ Offline](/forum/user/9278-in2computing)

Less More

- Posts: 60
- Thank you received: 1
-
-
-
- [](http://www.in2computing.com)
-

13 years 9 months ago [\#84747](#84747) by [in2computing](/forum/user/9278-in2computing "View in2computing's Profile")  *[Truncate Product Name length](/forum/4-how-to/77317-truncate-product-name-length#84747 "Hi  I was wondering how to truncate the length of the Product Name on front end display.  My eshop is   in2computing.com/eShop/product/listing.html  Any help would be much appreciated.  Thanks and regards Yogi")* was created by *[in2computing](/forum/user/9278-in2computing "View in2computing's Profile")*

Hi

I was wondering how to truncate the length of the Product Name on front end display.

My eshop is [ in2computing.com/eShop/product/listing.html](https://in2computing.com/eShop/product/listing.html)

Any help would be much appreciated.

Thanks and regards
Yogi

---

Thanks and regards
Yogi

[ www.barnetpcservices.com](http://www.barnetpcservices.com)
[ www.in2computing.com](http://www.in2computing.com)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc3MzE3LXRydW5jYXRlLXByb2R1Y3QtbmFtZS1sZW5ndGg/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 9 months ago [\#84816](#84816) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Truncate Product Name length](/forum/4-how-to/77317-truncate-product-name-length#84816 "Hi  I was wondering how to truncate the length of the Product Name on front end display.  My eshop is   in2computing.com/eShop/product/listing.html  Any help would be much appreciated.  Thanks and regards Yogi")*

Hi,

To truncate it in the product listing, you have to edit the view "product / listing_img_title" and replace the line "echo $this-&gt;row-&gt;product_name;" by "echo substr($this-&gt;row-&gt;product_name, 0, 50);"
Where "50" is the number of char to display.

The following user(s) said Thank You: [in2computing](/forum/user/9278-in2computing "View in2computing's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc3MzE3LXRydW5jYXRlLXByb2R1Y3QtbmFtZS1sZW5ndGg/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[in2computing](/forum/user/9278-in2computing "View in2computing's Profile")**
- [![in2computing's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar9278.png)](/forum/user/9278-in2computing "View in2computing's Profile") Topic Author
- [ Offline](/forum/user/9278-in2computing)

Less More

- Posts: 60
- Thank you received: 1
-
-
-
- [](http://www.in2computing.com)
-

13 years 9 months ago -  13 years 9 months ago [\#84850](#84850) by [in2computing](/forum/user/9278-in2computing "View in2computing's Profile")  Replied by *[in2computing](/forum/user/9278-in2computing "View in2computing's Profile")* on topic *[Truncate Product Name length](/forum/4-how-to/77317-truncate-product-name-length#84850 "Hi  I was wondering how to truncate the length of the Product Name on front end display.  My eshop is   in2computing.com/eShop/product/listing.html  Any help would be much appreciated.  Thanks and regards Yogi")*

> Xavier wrote: replace the line "echo $this-&gt;row-&gt;product\_name;" by "echo substr($this-&gt;row-&gt;product\_name, 0, 50);"
> Where "50" is the number of char to display.

Hello Xavier

Thanks for your quick response... That sorted out the problem... I have added "..." at the end of the product name as it truncates in the middle of the word...

echo substr($this-&gt;row-&gt;product_name, 0, 50)."...";
![:)](/media/kunena/emoticons/8.png ":)")

Thanks again

---

Thanks and regards
Yogi

[ www.barnetpcservices.com](http://www.barnetpcservices.com)
[ www.in2computing.com](http://www.in2computing.com)

Last edit: 13 years 9 months ago by [in2computing](/forum/user/9278-in2computing "View in2computing's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc3MzE3LXRydW5jYXRlLXByb2R1Y3QtbmFtZS1sZW5ndGg/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[in2computing](/forum/user/9278-in2computing "View in2computing's Profile")**
- [![in2computing's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar9278.png)](/forum/user/9278-in2computing "View in2computing's Profile") Topic Author
- [ Offline](/forum/user/9278-in2computing)

Less More

- Posts: 60
- Thank you received: 1
-
-
-
- [](http://www.in2computing.com)
-

13 years 9 months ago [\#84928](#84928) by [in2computing](/forum/user/9278-in2computing "View in2computing's Profile")  Replied by *[in2computing](/forum/user/9278-in2computing "View in2computing's Profile")* on topic *[Truncate Product Name length](/forum/4-how-to/77317-truncate-product-name-length#84928 "Hi  I was wondering how to truncate the length of the Product Name on front end display.  My eshop is   in2computing.com/eShop/product/listing.html  Any help would be much appreciated.  Thanks and regards Yogi")*

Where do I make the changes for the shopping cart module for the same reason?

---

Thanks and regards
Yogi

[ www.barnetpcservices.com](http://www.barnetpcservices.com)
[ www.in2computing.com](http://www.in2computing.com)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc3MzE3LXRydW5jYXRlLXByb2R1Y3QtbmFtZS1sZW5ndGg/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 9 months ago [\#84990](#84990) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Truncate Product Name length](/forum/4-how-to/77317-truncate-product-name-length#84990 "Hi  I was wondering how to truncate the length of the Product Name on front end display.  My eshop is   in2computing.com/eShop/product/listing.html  Any help would be much appreciated.  Thanks and regards Yogi")*

You have to edit the view "product / cart" for this content.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc3MzE3LXRydW5jYXRlLXByb2R1Y3QtbmFtZS1sZW5ndGg/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[in2computing](/forum/user/9278-in2computing "View in2computing's Profile")**
- [![in2computing's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar9278.png)](/forum/user/9278-in2computing "View in2computing's Profile") Topic Author
- [ Offline](/forum/user/9278-in2computing)

Less More

- Posts: 60
- Thank you received: 1
-
-
-
- [](http://www.in2computing.com)
-

13 years 9 months ago [\#85179](#85179) by [in2computing](/forum/user/9278-in2computing "View in2computing's Profile")  Replied by *[in2computing](/forum/user/9278-in2computing "View in2computing's Profile")* on topic *[Truncate Product Name length](/forum/4-how-to/77317-truncate-product-name-length#85179 "Hi  I was wondering how to truncate the length of the Product Name on front end display.  My eshop is   in2computing.com/eShop/product/listing.html  Any help would be much appreciated.  Thanks and regards Yogi")*

Sorry Xavier! Can you please be a bit more specific? I am not able to figure out which file to modify...

---

Thanks and regards
Yogi

[ www.barnetpcservices.com](http://www.barnetpcservices.com)
[ www.in2computing.com](http://www.in2computing.com)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc3MzE3LXRydW5jYXRlLXByb2R1Y3QtbmFtZS1sZW5ndGg/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

13 years 9 months ago [\#85273](#85273) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Truncate Product Name length](/forum/4-how-to/77317-truncate-product-name-length#85273 "Hi  I was wondering how to truncate the length of the Product Name on front end display.  My eshop is   in2computing.com/eShop/product/listing.html  Any help would be much appreciated.  Thanks and regards Yogi")*

Hi,

It would be difficult to be more specific.
Last time you have edit the view "product &#124; listing_img_title" and this time you should edit the view "product &#124; cart".

Regards,

---

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

The following user(s) said Thank You: [in2computing](/forum/user/9278-in2computing "View in2computing's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc3MzE3LXRydW5jYXRlLXByb2R1Y3QtbmFtZS1sZW5ndGg/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[in2computing](/forum/user/9278-in2computing "View in2computing's Profile")**
- [![in2computing's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar9278.png)](/forum/user/9278-in2computing "View in2computing's Profile") Topic Author
- [ Offline](/forum/user/9278-in2computing)

Less More

- Posts: 60
- Thank you received: 1
-
-
-
- [](http://www.in2computing.com)
-

13 years 9 months ago [\#86592](#86592) by [in2computing](/forum/user/9278-in2computing "View in2computing's Profile")  Replied by *[in2computing](/forum/user/9278-in2computing "View in2computing's Profile")* on topic *[Truncate Product Name length](/forum/4-how-to/77317-truncate-product-name-length#86592 "Hi  I was wondering how to truncate the length of the Product Name on front end display.  My eshop is   in2computing.com/eShop/product/listing.html  Any help would be much appreciated.  Thanks and regards Yogi")*

Thanks Jerome

I got it sorted now. Sorry for being a bit thick earlier.

---

Thanks and regards
Yogi

[ www.barnetpcservices.com](http://www.barnetpcservices.com)
[ www.in2computing.com](http://www.in2computing.com)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc3MzE3LXRydW5jYXRlLXByb2R1Y3QtbmFtZS1sZW5ndGg/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[in2computing](/forum/user/9278-in2computing "View in2computing's Profile")**
- [![in2computing's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar9278.png)](/forum/user/9278-in2computing "View in2computing's Profile") Topic Author
- [ Offline](/forum/user/9278-in2computing)

Less More

- Posts: 60
- Thank you received: 1
-
-
-
- [](http://www.in2computing.com)
-

10 years 5 months ago [\#239192](#239192) by [in2computing](/forum/user/9278-in2computing "View in2computing's Profile")  Replied by *[in2computing](/forum/user/9278-in2computing "View in2computing's Profile")* on topic *[Truncate Product Name length](/forum/4-how-to/77317-truncate-product-name-length#239192 "Hi  I was wondering how to truncate the length of the Product Name on front end display.  My eshop is   in2computing.com/eShop/product/listing.html  Any help would be much appreciated.  Thanks and regards Yogi")*

> Xavier wrote: Hi,
>
> To truncate it in the product listing, you have to edit the view "product / listing\_img\_title" and replace the line "echo $this-&gt;row-&gt;product\_name;" by "echo substr($this-&gt;row-&gt;product\_name, 0, 50);"
> Where "50" is the number of char to display.

This line is different in the latest version. &lt;a href="&lt;?php echo $link;?&gt;" title="&lt;?php echo $this-&gt;escape($this-&gt;row-&gt;product_name); ?&gt;"&gt;

What do I do now please?

---

Thanks and regards
Yogi

[ www.barnetpcservices.com](http://www.barnetpcservices.com)
[ www.in2computing.com](http://www.in2computing.com)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc3MzE3LXRydW5jYXRlLXByb2R1Y3QtbmFtZS1sZW5ndGg/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14266
-
-

10 years 5 months ago [\#239256](#239256) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Truncate Product Name length](/forum/4-how-to/77317-truncate-product-name-length#239256 "Hi  I was wondering how to truncate the length of the Product Name on front end display.  My eshop is   in2computing.com/eShop/product/listing.html  Any help would be much appreciated.  Thanks and regards Yogi")*

Hi,

Instead of : Code:

&lt;a href="&lt;?php echo $link;?&gt;" title="&lt;?php echo $this-&gt;escape($this-&gt;row-&gt;product_name); ?&gt;"&gt;

you can do: Code:

&lt;a href="&lt;?php echo $link;?&gt;" title="&lt;?php echo $this-&gt;escape(substr($this-&gt;row-&gt;product_name, 0, 50)); ?&gt;"&gt;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc3MzE3LXRydW5jYXRlLXByb2R1Y3QtbmFtZS1sZW5ndGg/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.424 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
