phpemailopencartopencart2.x

How to show full OPTION name in OpenCart 2 checkout and email notification?


I want to have my option names fully visible on all pages and email notifications.

By modifying catalog/controller/checkout/cart.php I have managed to fix the problem for shopping cart only, but option name is still being cut off on checkout totals and emails that buyer and admins receive.


Here is example of my problem :

problem picture, option names are cut off

Here is example of what I want to achieve on emails and checkout page:

fixed problem for cart view only


I have managed to remove that limitation on shopping cart view only by modifying catalog/controller/checkout/cart.php controller by replacing lines 112 - 115 with the following:

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

Solution

  • You have to do same changes for the checkout total and for Email

    For checkout Total go to

    controller/checkout/confirm.php on line 347

    change

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

    to

    'value' => $value
    

    and for Email got to model/checkout/order.php and on line 562

    change

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

    to

    'value' => $value