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

#   Word-wrap in cart module.

##

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

Less More

- Posts: 13
- Thank you received: 0
-
-

13 years 7 months ago -  13 years 7 months ago [\#96078](#96078) by [kapis555](/forum/user/14823-kapis555 "View kapis555's Profile")  *[Word-wrap in cart module.](/forum/4-how-to/79651-word-wrap-in-cart-module#96078 "Hello,  My problem is that I have to put products with very long names in cart, but when word is longer than, I don't know 6 chars, it stretches the cart outside the page.  Like in example, part 10&#95;MITTELDRUCKFILTER is to long. But part 60&#95;RUCKLAUFF.. don't stretch cart, because I putted SPACE in the middle of the word, when I added this product in product list.  So where I have to add CSS to wrap that long words?")* was created by *[kapis555](/forum/user/14823-kapis555 "View kapis555's Profile")*

Hello,

My problem is that I have to put products with very long names in cart, but when word is longer than, I don't know 6 chars, it stretches the cart outside the page.

Like in example, part 10_MITTELDRUCKFILTER is to long.
But part 60_RUCKLAUFF.. don't stretch cart, because I putted SPACE in the middle of the word, when I added this product in product list.

So where I have to add CSS to wrap that long words?

[ ![&#91;img](http://i1359.photobucket.com/albums/q790/kapis555/Untitled-3_zps8d9daaee.jpg) ](http://i1359.photobucket.com/albums/q790/kapis555/Untitled-3_zps8d9daaee.jpg "&#91;img")

Last edit: 13 years 7 months ago by [kapis555](/forum/user/14823-kapis555 "View kapis555's Profile").

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

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

Less More

- Posts: 2334
- Thank you received: 403
-
-

13 years 7 months ago [\#96118](#96118) by [Eliot](/forum/user/1824-eliot "View Eliot's Profile")  Replied by *[Eliot](/forum/user/1824-eliot "View Eliot's Profile")* on topic *[Word-wrap in cart module.](/forum/4-how-to/79651-word-wrap-in-cart-module#96118 "Hello,  My problem is that I have to put products with very long names in cart, but when word is longer than, I don't know 6 chars, it stretches the cart outside the page.  Like in example, part 10&#95;MITTELDRUCKFILTER is to long. But part 60&#95;RUCKLAUFF.. don't stretch cart, because I putted SPACE in the middle of the word, when I added this product in product list.  So where I have to add CSS to wrap that long words?")*

Hi there,

Is it in the cart or the minicart?
Just give us a link to your page so we'll tell you with div you have to edit.
Also, you can try it by yourself, you just have to right click on the given zone, user "inspect element" (available in opera, chrome, firefox...) and see the name of the div.
You'll then just have to change the with and it should works fine ![:)](/media/kunena/emoticons/3.png ":)")

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

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

Less More

- Posts: 13
- Thank you received: 0
-
-

13 years 7 months ago [\#96261](#96261) by [kapis555](/forum/user/14823-kapis555 "View kapis555's Profile")  Replied by *[kapis555](/forum/user/14823-kapis555 "View kapis555's Profile")* on topic *[Word-wrap in cart module.](/forum/4-how-to/79651-word-wrap-in-cart-module#96261 "Hello,  My problem is that I have to put products with very long names in cart, but when word is longer than, I don't know 6 chars, it stretches the cart outside the page.  Like in example, part 10&#95;MITTELDRUCKFILTER is to long. But part 60&#95;RUCKLAUFF.. don't stretch cart, because I putted SPACE in the middle of the word, when I added this product in product list.  So where I have to add CSS to wrap that long words?")*

[ i-neuson.com/index.php/katalogs/ch-1200/rezerves-dalas](http://i-neuson.com/index.php/katalogs/ch-1200/rezerves-dalas)

You have to login to see cart login: kaspars
pasw: traks
I added some CSS to div's but no change.
[ ![&#91;img](http://i1359.photobucket.com/albums/q790/kapis555/Untitled-2_zps76e67971.png) ](http://i1359.photobucket.com/albums/q790/kapis555/Untitled-2_zps76e67971.png "&#91;img")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc5NjUxLXdvcmQtd3JhcC1pbi1jYXJ0LW1vZHVsZT90bXBsPW1hcmtkb3du) 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 7 months ago [\#96316](#96316) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Word-wrap in cart module.](/forum/4-how-to/79651-word-wrap-in-cart-module#96316 "Hello,  My problem is that I have to put products with very long names in cart, but when word is longer than, I don't know 6 chars, it stretches the cart outside the page.  Like in example, part 10&#95;MITTELDRUCKFILTER is to long. But part 60&#95;RUCKLAUFF.. don't stretch cart, because I putted SPACE in the middle of the word, when I added this product in product list.  So where I have to add CSS to wrap that long words?")*

Hi,

Thanks to try to set a fixed width to the class ".hikashop_cart_module_product_name_value{ ... }".
Else you can try to edit the view "product / cart".

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

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

Less More

- Posts: 13
- Thank you received: 0
-
-

13 years 7 months ago [\#96343](#96343) by [kapis555](/forum/user/14823-kapis555 "View kapis555's Profile")  Replied by *[kapis555](/forum/user/14823-kapis555 "View kapis555's Profile")* on topic *[Word-wrap in cart module.](/forum/4-how-to/79651-word-wrap-in-cart-module#96343 "Hello,  My problem is that I have to put products with very long names in cart, but when word is longer than, I don't know 6 chars, it stretches the cart outside the page.  Like in example, part 10&#95;MITTELDRUCKFILTER is to long. But part 60&#95;RUCKLAUFF.. don't stretch cart, because I putted SPACE in the middle of the word, when I added this product in product list.  So where I have to add CSS to wrap that long words?")*

Hi Xavier,

Thanks for replay, I tried your solution, but no effect.

I even tried ".hikashop_cart_module_product_name_value a { ... }".

[ ![&#91;img](http://i1359.photobucket.com/albums/q790/kapis555/Untitled-5_zps6aacf128.png) ](http://i1359.photobucket.com/albums/q790/kapis555/Untitled-5_zps6aacf128.png "&#91;img")

You told something about "product / cart", what I have to change there?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc5NjUxLXdvcmQtd3JhcC1pbi1jYXJ0LW1vZHVsZT90bXBsPW1hcmtkb3du) 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 7 months ago [\#96439](#96439) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Word-wrap in cart module.](/forum/4-how-to/79651-word-wrap-in-cart-module#96439 "Hello,  My problem is that I have to put products with very long names in cart, but when word is longer than, I don't know 6 chars, it stretches the cart outside the page.  Like in example, part 10&#95;MITTELDRUCKFILTER is to long. But part 60&#95;RUCKLAUFF.. don't stretch cart, because I putted SPACE in the middle of the word, when I added this product in product list.  So where I have to add CSS to wrap that long words?")*

To wrap the word, you can edit the view "product / cart" and replace the line : Code:

&lt;?php echo $row-&gt;product_name; ?&gt;

By a php function to change the value of $row-&gt;product_name.
Something like: Code:

&lt;?php $productName = wordwrap($row-&gt;product_name, 20, "&lt;br /&gt;\n"); echo $productName; ?&gt;

You can change "20" to the number of letters desired.

Here is the doc for the wordwrap function:
[ php.net/manual/en/function.wordwrap.php](http://php.net/manual/en/function.wordwrap.php)

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

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

Less More

- Posts: 13
- Thank you received: 0
-
-

13 years 7 months ago [\#98117](#98117) by [kapis555](/forum/user/14823-kapis555 "View kapis555's Profile")  Replied by *[kapis555](/forum/user/14823-kapis555 "View kapis555's Profile")* on topic *[Word-wrap in cart module.](/forum/4-how-to/79651-word-wrap-in-cart-module#98117 "Hello,  My problem is that I have to put products with very long names in cart, but when word is longer than, I don't know 6 chars, it stretches the cart outside the page.  Like in example, part 10&#95;MITTELDRUCKFILTER is to long. But part 60&#95;RUCKLAUFF.. don't stretch cart, because I putted SPACE in the middle of the word, when I added this product in product list.  So where I have to add CSS to wrap that long words?")*

Thanks, Xavier!

Line that worked for me was Code:

&lt;?php $productName = wordwrap($row-&gt;product_name, 14, "-\n", true); echo $productName; ?&gt;

BUT, I have extra question. When I'm removing product from cart, after 3rd removed product page is redirected to Checkout, why does that happen?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc5NjUxLXdvcmQtd3JhcC1pbi1jYXJ0LW1vZHVsZT90bXBsPW1hcmtkb3du) 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 7 months ago [\#98184](#98184) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Word-wrap in cart module.](/forum/4-how-to/79651-word-wrap-in-cart-module#98184 "Hello,  My problem is that I have to put products with very long names in cart, but when word is longer than, I don't know 6 chars, it stretches the cart outside the page.  Like in example, part 10&#95;MITTELDRUCKFILTER is to long. But part 60&#95;RUCKLAUFF.. don't stretch cart, because I putted SPACE in the middle of the word, when I added this product in product list.  So where I have to add CSS to wrap that long words?")*

Hi,

Have you set an url for the option "url where to redirect when the cart is empty" in Config &gt; Main &gt; Cart ?
Is the 3rd product the last one which was present in the cart ?

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

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