Post by formula409 » Thu Jun 21, 2012 2:47 pm

i have Opencart 1.5.3.1 installed with the default theme.

My problem is this. All products have options and the descriptions are not terribly long, but when an order is placed, the invoice produced and sent by e-mail cuts off the description of each option that is not outright short.

whats expected and the desired result is:

The Giardino Red Cedar (8'x8' base price)
- Pergola Size: 10'x12' (7'x9' post to post)
- profile: End profile shape A
- Freestanding or Attached: Attached to concrete block wall
- Posts will be going: On patio or deck (8' posts with mounting hardware)


What i get is this:

The Giardino Red Cedar (8'x8' base price)
- Pergola Size: 12'x12' (9'x9' post ..
- profile: End profile shape A
- Freestanding or Attached: Attached to concrete..
- Posts will be going: On patio or deck (8'..


Changing the table size in the order.TPL has no effect. Iv looked for a solution but have not found one. Is there some way to fix this?

Thanks
Last edited by formula409 on Fri Jun 22, 2012 7:27 am, edited 1 time in total.

Newbie

Posts

Joined
Thu Jun 21, 2012 2:31 pm

Post by formula409 » Fri Jun 22, 2012 4:09 am

Iv been looking through the cart.tpl and order.tpl files and just about every other possibly related on in both the admin and catalog directories. I spent some time today looking through the database and tried changing the "text" to long "longtext" or even setting a custom size for what looked to be the logical MySQL fields. Can anybody tell me if Im looking in the right area to allow me have the full option descriptions in the invoice that is sent out in email and shown at the end of an order?

Newbie

Posts

Joined
Thu Jun 21, 2012 2:31 pm

Post by rph » Fri Jun 22, 2012 4:21 am

In /catalog/model/checkout/order.php look for:

Code: Select all

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

Code: Select all

'value' => $value
Alternately if you just want a larger number of characters displayed change both instances of '20' to the number of characters you want shown instead.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by formula409 » Fri Jun 22, 2012 7:05 am

Thanks rph! man.. your a life saver! worked perfect.

Newbie

Posts

Joined
Thu Jun 21, 2012 2:31 pm

Post by Ampeter » Fri Jul 13, 2012 8:42 pm

Why isn't this the default? Is there a problem with longer option description in the cart or mail layout?

Product names can be longer than 20 characters and option names go under them in smaller font so why trim them in the model or controller?

User avatar
New member

Posts

Joined
Thu Jan 13, 2011 5:01 pm

Post by Sokonomi » Sun Sep 30, 2012 6:26 am

I just used this to get the option value to display fully in several pages, thanks for that bit!
Though Id like to take it one step further if possible.

The text area box on the product page allows customers to fill out multiple lines by hitting enter,
I was hoping I could make this reoccur on the order overview (both admin and customer side).
The linebreaks are stored in the database, I just hope you can somehow echo that back in.
Any ideas? ;)

Active Member

Posts

Joined
Sun Sep 30, 2012 4:52 am

Post by Thir13teen » Mon Aug 12, 2013 3:37 pm

Very irritating problem, would like the cut-off at 20 characters to be removed. Thank you very much for the solution!

Newbie

Posts

Joined
Wed Feb 08, 2012 11:33 pm
Who is online

Users browsing this forum: Majestic-12 [Bot] and 15 guests