How to add wordwrap in Cart | OC 2.0.3
How can I add wordwrap to the Product Name column in my shopping cart? I have a text area option for a product and it requires inputting a long list. I want the customer to be able to review this long list in the shopping cart. With the current php code it limits the cart description to 20 characters.
Current code in the "controller/checkout/cart.php":
[code]'value' => (utf8_strlen($value) > 2000 ? utf8_substr($value, 0, 2000) . '..' : $value));[/code]
I found this in another topic forum but it creates errors and leaves out the option values:
[code]'value' => (wordwrap($option['option_value'],2000, "
"))[/code] [u]Error message:[/u] Notice: Undefined index: option_value in /home/shopndeliver/public_html/catalog/controller/checkout/cart.php on line 114Notice: Undefined index: option_value in /home/shopndeliver/public_html/catalog/controller/checkout/cart.php on line 114Notice: Undefined index: option_value in /home/shopndeliver/public_html/catalog/controller/checkout/cart.php on line 114Notice: Undefined index: option_value in /home/shopndeliver/public_html/catalog/controller/checkout/cart.php on line 114Notice: Undefined index: option_value in /home/shopndeliver/public_html/catalog/controller/checkout/cart.php on line 114Notice: Undefined index: option_value in /home/shopndeliver/public_html/catalog/controller/checkout/cart.php on line 114 I am using OC 2.0.3 Webpage: http://www.shop-n-deliver.com/index.php?route=checkout/cart
"))[/code] [u]Error message:[/u] Notice: Undefined index: option_value in /home/shopndeliver/public_html/catalog/controller/checkout/cart.php on line 114Notice: Undefined index: option_value in /home/shopndeliver/public_html/catalog/controller/checkout/cart.php on line 114Notice: Undefined index: option_value in /home/shopndeliver/public_html/catalog/controller/checkout/cart.php on line 114Notice: Undefined index: option_value in /home/shopndeliver/public_html/catalog/controller/checkout/cart.php on line 114Notice: Undefined index: option_value in /home/shopndeliver/public_html/catalog/controller/checkout/cart.php on line 114Notice: Undefined index: option_value in /home/shopndeliver/public_html/catalog/controller/checkout/cart.php on line 114 I am using OC 2.0.3 Webpage: http://www.shop-n-deliver.com/index.php?route=checkout/cart
Thank you for contacting us about adding WordWrap in OpenCart and sharing the solution. I 'm glad you were able to get it working.
If you have any further question, feel free to post them below.
Thank you,
John-Paul