PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, October 16, 2022

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

 October 16, 2022     email, opencart, opencart2.x, php     No comments   

Issue

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


Answered By - Raja Usman Mehmood
Answer Checked By - Marie Seifert (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing