Page 1 of 1

Order Confirmation Option Character Limit - OC 2.1.0.1

Posted: Tue Nov 01, 2016 10:04 pm
by MacronCardiff
Hi Everyone, we have a small issue relating to the email that you get when someone places an order.

When they checkout with the text field option filled in most of the message ends up getting cut off in the confirmation email. Is there anyway to increase the character limit of this? I've had a look inside of the tpl files for the email and I can't seem to find an imposed limit.

All I can see relating to product options is:

Code: Select all

<?php echo $option['value']; ?>
Here is an example of what I mean.

What we see in the invoice
Image

What we see in the confirmation email
Image

Re: Order Confirmation Option Character Limit - OC 2.1.0.1

Posted: Fri Nov 04, 2016 9:27 am
by IP_CAM
I found two Values, related to this:

oc-2.1.0.2\upload\catalog\controller\account\order.php

Code: Select all

$option_data[] = array(
						'name'  => $option['name'],
						'value' => (utf8_strlen($value) > 20 ? utf8_substr($value, 0, 20) . '..' : $value)
					); 
oc-2.1.0.2\upload\catalog\controller\checkout\confirm.php

Code: Select all

$option_data[] = array(
						'name'  => $option['name'],
						'value' => (utf8_strlen($value) > 20 ? utf8_substr($value, 0, 20) . '..' : $value)
					); 
The routine means, if more than 20 Characters exist, then, cut by 20 and add two dot's: ..
So,try to make ($value, 0, 20) to be ($value, 0, 100) or so, clean all Cache, and try again !
And if it still not works, then, I possibly just overlooked another similar Code..., somewhere! ::)

It could be coded simpler, without a Limit, but Be aware, too much Content could break your Invoice Layout,
and make it look real ugly! :o
I cannot test it, I use no OC-2, sorry!
Good Luck! ;)
Ernie