Post by aungpdx@gmail.com » Wed Jul 27, 2016 5:02 pm

Hi,
I am on OC 2.2. the option texts are cut off(turncated) in confirmation emails so I have to login to admin to check again. Please advise. Thank you.


Posts

Joined
Thu Feb 11, 2016 2:14 pm

Post by straightlight » Thu Jul 28, 2016 2:57 am

For demonstration purposes, in your catalog/model/checkout/order.php file,

find:

Code: Select all

'value' => (utf8_strlen($value) > 20 ? utf8_substr($value, 0, 20) . '..' : $value)
replace with:

Code: Select all

'value' => $value
Then, find twice:

Code: Select all

$text .= chr(9) . '-' . $option['name'] . ' ' . (utf8_strlen($value) > 20 ? utf8_substr($value, 0, 20) . '..' : $value) . "\n";
replace both instances with:

Code: Select all

$text .= chr(9) . '-' . $option['name'] . ' ' . $value . "\n";
This should resolved the truncated text to be full text in the next order confirmation bills. Not previous ones, though.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by IP_CAM » Thu Jul 28, 2016 3:27 am

check here for such:
http://www.opencart.com/index.php?route ... ion%20Text

there is only one free Extension on the Board, but it's only for OC v.1.5.6.x:
http://www.opencart.com/index.php?route ... n_id=13125

and check on this one, it may suit your needs:
http://www.opencart.com/index.php?route ... n_id=19655
Good Luck!
Ernie

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by straightlight » Thu Jul 28, 2016 3:31 am

IP_CAM wrote:check here for such:
http://www.opencart.com/index.php?route ... ion%20Text

there is only one free Extension on the Board, but it's only for OC v.1.5.6.x:
http://www.opencart.com/index.php?route ... n_id=13125

and check on this one, it may suit your needs:
http://www.opencart.com/index.php?route ... n_id=19655
Good Luck!
Ernie
- The first link points to inaccurate subjects.
- The second post links to an invalid contribution link or no longer active.
- The third link does not demonstrate any facts from the XML or TXT files which indicates the removal of the truncated functions.

while my solution above not only provides an accurate solution but also FREE as demonstration purposes and explained on my previous post as such. The third link also does NOT demonstrate the use for OC v2.2 release.

Edit: The 2nd link has now been restored by the developer who handles that particular extension.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by IP_CAM » Thu Jul 28, 2016 3:53 am

Sorry, but all my links work swell, but I did not see your posting, before I replied to, I should have been reloading the page first. Will never happen again , I promise ..., next time, I'll wait for a day first... 8)
Ernie

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by supak111 » Mon Jan 17, 2022 6:21 am

Does anyone know how to do this on OC 3? Because code below isn't in this file catalog/model/checkout/order.php in OC 3

Code: Select all

'value' => (utf8_strlen($value) > 20 ? utf8_substr($value, 0, 20) . '..' : $value)
NEVER MIND in OC3 I found the above code in: catalog/controller/mail/order.php if anyone needs this in the future

~ OC 3.0.3.2 and OCmods only ~


User avatar
Active Member

Posts

Joined
Fri Feb 13, 2015 12:09 pm
Who is online

Users browsing this forum: No registered users and 167 guests