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

#   How to add short description on product list?

##

- **[Phil](/forum/user/33943-phil "View Phil's Profile")**
- [![Phil's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/33943-phil "View Phil's Profile") Topic Author
- [ Offline](/forum/user/33943-phil)

Less More

- Posts: 16
- Thank you received: 0
-
-

12 years 2 months ago [\#169266](#169266) by [Phil](/forum/user/33943-phil "View Phil's Profile")  *[How to add short description on product list?](/forum/26-product-category-display/870682-how-to-add-short-description-on-product-list#169266 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.1 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : safari 7.0.6  I swear I have looked for a while in the forum but didn't find the answer. I have looked carefully on the tutorial, documentation, topics and bug reports... :(  On my main product list page I would like to display a short description of each product. (before the add to cart button) Didn't find any option in the settings. Do I have to hack the display files? Or is it because I'm running the Starter version? :(  Thanks.")* was created by *[Phil](/forum/user/33943-phil "View Phil's Profile")*

-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3.1
-- PHP version -- : 5.3.28
-- Browser(s) name and version -- : safari 7.0.6

I swear I have looked for a while in the forum but didn't find the answer. I have looked carefully on the tutorial, documentation, topics and bug reports... ![:(](/media/kunena/emoticons/22.png ":(")

On my main product list page I would like to display a short description of each product. (before the add to cart button)
Didn't find any option in the settings.
Do I have to hack the display files?
Or is it because I'm running the Starter version? ![:(](/media/kunena/emoticons/22.png ":(")

Thanks.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzA2ODItaG93LXRvLWFkZC1zaG9ydC1kZXNjcmlwdGlvbi1vbi1wcm9kdWN0LWxpc3Q/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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86567
- Thank you received: 14314
-
-

12 years 2 months ago [\#169281](#169281) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[How to add short description on product list?](/forum/26-product-category-display/870682-how-to-add-short-description-on-product-list#169281 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.1 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : safari 7.0.6  I swear I have looked for a while in the forum but didn't find the answer. I have looked carefully on the tutorial, documentation, topics and bug reports... :(  On my main product list page I would like to display a short description of each product. (before the add to cart button) Didn't find any option in the settings. Do I have to hack the display files? Or is it because I'm running the Starter version? :(  Thanks.")*

Hi,

You can do like this:
[ www.hikashop.com/forum/4-how-to/32677-sh...roduct-listings.html](http://www.hikashop.com/forum/4-how-to/32677-short-description-at-the-product-listings.html)

The following user(s) said Thank You: [Phil](/forum/user/33943-phil "View Phil's Profile")

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

- **[Phil](/forum/user/33943-phil "View Phil's Profile")**
- [![Phil's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/33943-phil "View Phil's Profile") Topic Author
- [ Offline](/forum/user/33943-phil)

Less More

- Posts: 16
- Thank you received: 0
-
-

12 years 2 months ago [\#170070](#170070) by [Phil](/forum/user/33943-phil "View Phil's Profile")  Replied by *[Phil](/forum/user/33943-phil "View Phil's Profile")* on topic *[How to add short description on product list?](/forum/26-product-category-display/870682-how-to-add-short-description-on-product-list#170070 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.1 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : safari 7.0.6  I swear I have looked for a while in the forum but didn't find the answer. I have looked carefully on the tutorial, documentation, topics and bug reports... :(  On my main product list page I would like to display a short description of each product. (before the add to cart button) Didn't find any option in the settings. Do I have to hack the display files? Or is it because I'm running the Starter version? :(  Thanks.")*

![:P](/media/kunena/emoticons/14.png ":P") This might help others. It does the trick.

I have added the little hack in the **listing\_img\_title** file between end of product name and product price.
it displays 175 caracters from the regular description and replace last space by '...' and Read More.
you can manage class 'shortdesc' has you want.

I'm not pro so the hack can certainly be improved.
Code:

&lt;!-- description --&gt; &lt;div class="shortdesc"&gt; &lt;?php $maxLength = 175; $longDesc = $this-&gt;row-&gt;product_description; if (strlen($longDesc)&gt;$maxLength){ $longDesc = substr($longDesc, 0, $maxLength); $position_espace = strrpos($longDesc, " "); $longDesc = substr($longDesc, 0, $position_espace); $longDesc = $longDesc." ... "; } echo $longDesc; echo '&lt;a href="'.$link.'"&gt;Read more&lt;/a&gt;'; ?&gt; &lt;/div&gt; &lt;!-- EO description --&gt;

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

- **[naranjacuatro](/forum/user/35487-naranjacuatro "View naranjacuatro's Profile")**
- [![naranjacuatro's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/35487-naranjacuatro "View naranjacuatro's Profile")
- [ Offline](/forum/user/35487-naranjacuatro)

Less More

- Posts: 21
- Thank you received: 0
-
-

11 years 10 months ago [\#184160](#184160) by [naranjacuatro](/forum/user/35487-naranjacuatro "View naranjacuatro's Profile")  Replied by *[naranjacuatro](/forum/user/35487-naranjacuatro "View naranjacuatro's Profile")* on topic *[How to add short description on product list?](/forum/26-product-category-display/870682-how-to-add-short-description-on-product-list#184160 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.1 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : safari 7.0.6  I swear I have looked for a while in the forum but didn't find the answer. I have looked carefully on the tutorial, documentation, topics and bug reports... :(  On my main product list page I would like to display a short description of each product. (before the add to cart button) Didn't find any option in the settings. Do I have to hack the display files? Or is it because I'm running the Starter version? :(  Thanks.")*

hi there,

Im trying but didn´t get any result yet, just to confirm, you said in the liting_img_title but... from product, right?

cheers

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzA2ODItaG93LXRvLWFkZC1zaG9ydC1kZXNjcmlwdGlvbi1vbi1wcm9kdWN0LWxpc3Q/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)
-

11 years 10 months ago [\#184161](#184161) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[How to add short description on product list?](/forum/26-product-category-display/870682-how-to-add-short-description-on-product-list#184161 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.1 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : safari 7.0.6  I swear I have looked for a while in the forum but didn't find the answer. I have looked carefully on the tutorial, documentation, topics and bug reports... :(  On my main product list page I would like to display a short description of each product. (before the add to cart button) Didn't find any option in the settings. Do I have to hack the display files? Or is it because I'm running the Starter version? :(  Thanks.")*

Hi,

Yes from product. But are you sure that you are using the "image and title" display type ?
You can check that in your menu / module settings.

[ www.hikashop.com/support/support/documen...ize-the-display.html](http://www.hikashop.com/support/support/documentation/153-customize-the-display.html)

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

- **[Tuscan Triangle](/forum/user/35422-tuscan-triangle "View Tuscan Triangle's Profile")**
- [![Tuscan Triangle's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/35422-tuscan-triangle "View Tuscan Triangle's Profile")
- [ Offline](/forum/user/35422-tuscan-triangle)

Less More

- Posts: 32
- Thank you received: 0
-
-

11 years 10 months ago [\#184175](#184175) by [Tuscan Triangle](/forum/user/35422-tuscan-triangle "View Tuscan Triangle's Profile")  Replied by *[Tuscan Triangle](/forum/user/35422-tuscan-triangle "View Tuscan Triangle's Profile")* on topic *[How to add short description on product list?](/forum/26-product-category-display/870682-how-to-add-short-description-on-product-list#184175 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.1 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : safari 7.0.6  I swear I have looked for a while in the forum but didn't find the answer. I have looked carefully on the tutorial, documentation, topics and bug reports... :(  On my main product list page I would like to display a short description of each product. (before the add to cart button) Didn't find any option in the settings. Do I have to hack the display files? Or is it because I'm running the Starter version? :(  Thanks.")*

naranjacuatro:

/components/com_hikashop/views/product/tmpl

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

- **[naranjacuatro](/forum/user/35487-naranjacuatro "View naranjacuatro's Profile")**
- [![naranjacuatro's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/35487-naranjacuatro "View naranjacuatro's Profile")
- [ Offline](/forum/user/35487-naranjacuatro)

Less More

- Posts: 21
- Thank you received: 0
-
-

11 years 10 months ago [\#184186](#184186) by [naranjacuatro](/forum/user/35487-naranjacuatro "View naranjacuatro's Profile")  Replied by *[naranjacuatro](/forum/user/35487-naranjacuatro "View naranjacuatro's Profile")* on topic *[How to add short description on product list?](/forum/26-product-category-display/870682-how-to-add-short-description-on-product-list#184186 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.1 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : safari 7.0.6  I swear I have looked for a while in the forum but didn't find the answer. I have looked carefully on the tutorial, documentation, topics and bug reports... :(  On my main product list page I would like to display a short description of each product. (before the add to cart button) Didn't find any option in the settings. Do I have to hack the display files? Or is it because I'm running the Starter version? :(  Thanks.")*

Hello! thanks a lot for answering so fast, I changed it but it doesn´t change anything...

I have "read more" enable in the shop, and a read more line in my product description...

is there anything else that needs to be changed? or just that...?
cheers!

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

- **[naranjacuatro](/forum/user/35487-naranjacuatro "View naranjacuatro's Profile")**
- [![naranjacuatro's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/35487-naranjacuatro "View naranjacuatro's Profile")
- [ Offline](/forum/user/35487-naranjacuatro)

Less More

- Posts: 21
- Thank you received: 0
-
-

11 years 10 months ago [\#184240](#184240) by [naranjacuatro](/forum/user/35487-naranjacuatro "View naranjacuatro's Profile")  Replied by *[naranjacuatro](/forum/user/35487-naranjacuatro "View naranjacuatro's Profile")* on topic *[How to add short description on product list?](/forum/26-product-category-display/870682-how-to-add-short-description-on-product-list#184240 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.1 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : safari 7.0.6  I swear I have looked for a while in the forum but didn't find the answer. I have looked carefully on the tutorial, documentation, topics and bug reports... :(  On my main product list page I would like to display a short description of each product. (before the add to cart button) Didn't find any option in the settings. Do I have to hack the display files? Or is it because I'm running the Starter version? :(  Thanks.")*

Hi there!
I got it now! ![^&#95;^](/anime.gif "^&#95;^")

Just one last question... is there anything I can do in that file just to get image 2 more similar to image 1?
like... image to the left.. name and short description in the center and price to the right?

Because squares in image 2 are too big.. ![:-/](/irritated.gif ":-/")

thanks a lot for your help ![:)](/media/kunena/emoticons/3.png ":)")

- [ ![1.png](/forum/attachment/21348) ](/forum/attachment/21348 "1.png") [ ](/forum/attachment/21348?download=1 "1.png")
- [ ![2.png](/forum/attachment/21349) ](/forum/attachment/21349 "2.png") [ ](/forum/attachment/21349?download=1 "2.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzA2ODItaG93LXRvLWFkZC1zaG9ydC1kZXNjcmlwdGlvbi1vbi1wcm9kdWN0LWxpc3Q/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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86567
- Thank you received: 14314
-
-

11 years 10 months ago [\#184242](#184242) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[How to add short description on product list?](/forum/26-product-category-display/870682-how-to-add-short-description-on-product-list#184242 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.1 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : safari 7.0.6  I swear I have looked for a while in the forum but didn't find the answer. I have looked carefully on the tutorial, documentation, topics and bug reports... :(  On my main product list page I would like to display a short description of each product. (before the add to cart button) Didn't find any option in the settings. Do I have to hack the display files? Or is it because I'm running the Starter version? :(  Thanks.")*

Hi,

You can edit the products listing menu/module via the menu Display&gt;Content menus/modules and change the "type of layout" option to "table" and that should make it look similar.

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

- **[naranjacuatro](/forum/user/35487-naranjacuatro "View naranjacuatro's Profile")**
- [![naranjacuatro's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/35487-naranjacuatro "View naranjacuatro's Profile")
- [ Offline](/forum/user/35487-naranjacuatro)

Less More

- Posts: 21
- Thank you received: 0
-
-

11 years 10 months ago [\#184376](#184376) by [naranjacuatro](/forum/user/35487-naranjacuatro "View naranjacuatro's Profile")  Replied by *[naranjacuatro](/forum/user/35487-naranjacuatro "View naranjacuatro's Profile")* on topic *[How to add short description on product list?](/forum/26-product-category-display/870682-how-to-add-short-description-on-product-list#184376 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.1 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : safari 7.0.6  I swear I have looked for a while in the forum but didn't find the answer. I have looked carefully on the tutorial, documentation, topics and bug reports... :(  On my main product list page I would like to display a short description of each product. (before the add to cart button) Didn't find any option in the settings. Do I have to hack the display files? Or is it because I'm running the Starter version? :(  Thanks.")*

but in that case "short description" is not shown... u^_^

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzA2ODItaG93LXRvLWFkZC1zaG9ydC1kZXNjcmlwdGlvbi1vbi1wcm9kdWN0LWxpc3Q/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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86567
- Thank you received: 14314
-
-

11 years 10 months ago [\#184381](#184381) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[How to add short description on product list?](/forum/26-product-category-display/870682-how-to-add-short-description-on-product-list#184381 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.1 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : safari 7.0.6  I swear I have looked for a while in the forum but didn't find the answer. I have looked carefully on the tutorial, documentation, topics and bug reports... :(  On my main product list page I would like to display a short description of each product. (before the add to cart button) Didn't find any option in the settings. Do I have to hack the display files? Or is it because I'm running the Starter version? :(  Thanks.")*

Image 1.png doesn't have any description ![;)](/media/kunena/emoticons/24.png ";)")

If you want to add the description on the products listing with a table layout, here is a thread about that:
[ www.hikashop.com/forum/4-how-to/75263-us...-in-productlist.html](http://www.hikashop.com/forum/4-how-to/75263-using-description-in-productlist.html)

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

- **[naranjacuatro](/forum/user/35487-naranjacuatro "View naranjacuatro's Profile")**
- [![naranjacuatro's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/35487-naranjacuatro "View naranjacuatro's Profile")
- [ Offline](/forum/user/35487-naranjacuatro)

Less More

- Posts: 21
- Thank you received: 0
-
-

11 years 10 months ago [\#184462](#184462) by [naranjacuatro](/forum/user/35487-naranjacuatro "View naranjacuatro's Profile")  Replied by *[naranjacuatro](/forum/user/35487-naranjacuatro "View naranjacuatro's Profile")* on topic *[How to add short description on product list?](/forum/26-product-category-display/870682-how-to-add-short-description-on-product-list#184462 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.1 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : safari 7.0.6  I swear I have looked for a while in the forum but didn't find the answer. I have looked carefully on the tutorial, documentation, topics and bug reports... :(  On my main product list page I would like to display a short description of each product. (before the add to cart button) Didn't find any option in the settings. Do I have to hack the display files? Or is it because I'm running the Starter version? :(  Thanks.")*

thanks! I´ll follow those steps ![:)](/media/kunena/emoticons/3.png ":)")

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

- **[mojweb](/forum/user/5128-mojweb "View mojweb's Profile")**
- [![mojweb's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/5128-mojweb "View mojweb's Profile")
- [ Offline](/forum/user/5128-mojweb)

Less More

- Posts: 432
- Thank you received: 22
-

11 years 4 months ago [\#205519](#205519) by [mojweb](/forum/user/5128-mojweb "View mojweb's Profile")  Replied by *[mojweb](/forum/user/5128-mojweb "View mojweb's Profile")* on topic *[How to add short description on product list?](/forum/26-product-category-display/870682-how-to-add-short-description-on-product-list#205519 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.1 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : safari 7.0.6  I swear I have looked for a while in the forum but didn't find the answer. I have looked carefully on the tutorial, documentation, topics and bug reports... :(  On my main product list page I would like to display a short description of each product. (before the add to cart button) Didn't find any option in the settings. Do I have to hack the display files? Or is it because I'm running the Starter version? :(  Thanks.")*

> Phil wrote: ![:P](/media/kunena/emoticons/14.png ":P") This might help others. It does the trick.
>
> I have added the little hack in the **listing\_img\_title** file between end of product name and product price.
> it displays 175 caracters from the regular description and replace last space by '...' and Read More.
> you can manage class 'shortdesc' has you want.
>
> I'm not pro so the hack can certainly be improved.
>
> Code:
>
> &lt;!-- description --&gt; &lt;div class="shortdesc"&gt; &lt;?php $maxLength = 175; $longDesc = $this-&gt;row-&gt;product_description; if (strlen($longDesc)&gt;$maxLength){ $longDesc = substr($longDesc, 0, $maxLength); $position_espace = strrpos($longDesc, " "); $longDesc = substr($longDesc, 0, $position_espace); $longDesc = $longDesc." ... "; } echo $longDesc; echo '&lt;a href="'.$link.'"&gt;Read more&lt;/a&gt;'; ?&gt; &lt;/div&gt; &lt;!-- EO description --&gt;

I use this code Code:

&lt;!-- description--&gt; &lt;div class="shortdesc"&gt; &lt;?php $maxLength = 90; $longDesc = $this-&gt;row-&gt;product_description; if (strlen($longDesc)&gt;$maxLength){ $longDesc = substr($longDesc, 0, $maxLength); $position_espace = strrpos($longDesc, " "); $longDesc = substr($longDesc, 0, $position_espace); $longDesc = $longDesc." ... "; } echo $longDesc; ?&gt; &lt;/div&gt;

And it works great.
Is any way to strip html tags?
Now if there is &lt;strong&gt; tag in first scentence and if it not closed before character limit, all site from there is bold.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzA2ODItaG93LXRvLWFkZC1zaG9ydC1kZXNjcmlwdGlvbi1vbi1wcm9kdWN0LWxpc3Q/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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86567
- Thank you received: 14314
-
-

11 years 4 months ago [\#205537](#205537) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[How to add short description on product list?](/forum/26-product-category-display/870682-how-to-add-short-description-on-product-list#205537 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.1 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : safari 7.0.6  I swear I have looked for a while in the forum but didn't find the answer. I have looked carefully on the tutorial, documentation, topics and bug reports... :(  On my main product list page I would like to display a short description of each product. (before the add to cart button) Didn't find any option in the settings. Do I have to hack the display files? Or is it because I'm running the Starter version? :(  Thanks.")*

Hi,

Change the line:
$longDesc = $this-&gt;row-&gt;product_description;
to:
$longDesc = strip_tags($this-&gt;row-&gt;product_description);

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzA2ODItaG93LXRvLWFkZC1zaG9ydC1kZXNjcmlwdGlvbi1vbi1wcm9kdWN0LWxpc3Q/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.113 seconds

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