Page 1 of 1

How to display complete product option text in shopping cart beyond the 20 character limit truncation?

Posted: Tue Oct 29, 2019 11:02 am
by ArtGallery
I have some fairly long product options that need to be displayed in the shopping cart and in the order email. They are currently truncated to 20 characters which renders most of them useless for verifying what the customer has in their cart or in their final order. The only way that I can see exactly what options they selected is in the completed order in the Admin, which is unacceptable. The customer needs to clearly see all the options in their entirety in the cart and in the order email.

I saw that there was a mod for an older version of OC but nothing for 3.0x. Any help would be greatly appreciated.

Re: How to display complete product option text in shopping cart beyond the 20 character limit truncation?

Posted: Wed Oct 30, 2019 1:30 am
by xxvirusxx
Code is the same....
viewtopic.php?t=169910

Just test

Re: How to display complete product option text in shopping cart beyond the 20 character limit truncation?

Posted: Wed Oct 30, 2019 2:13 am
by ArtGallery
I made the changes to the files as listed in the link. Cleared the cache in OC and in my browser.... No change to the truncated option values in the cart which is the number one most important issue. I didn't check the order email but I am assuming it would be the same.

Re: How to display complete product option text in shopping cart beyond the 20 character limit truncation?

Posted: Wed Oct 30, 2019 8:13 am
by letxobnav
in catalog/controller/checkout/cart.php

Code: Select all

					$option_data[] = array(
						'name'  => $optionName,
						'value' => (utf8_strlen($value) > 20 ? utf8_substr($value, 0, 20) . '..' : $value)
					);

change the 20 or take a chance and remove the limitation altogether:

Code: Select all

					$option_data[] = array(
						'name'  => $optionName,
						'value' => $value)
					);