Post by parkookk » Fri Jan 25, 2013 12:04 am

After placing an order with paypal standard using "Textarea" option in one of the products when I receive the order notification massage from my store and PayPal instead of showing what I have typed in the text area it shows only 20 words and the rest are missing :o

I would appreciate if anyone help me on this issue
Last edited by parkookk on Sun Jan 27, 2013 2:26 am, edited 1 time in total.

I am using English OpenCart 3.0.3.8, Default Template/Theme, php 7.4, Latest Brave Browser (No Ads-Blocker, etc.)


User avatar
Active Member

Posts

Joined
Thu Jan 17, 2013 11:56 pm
Location - london

Post by parkookk » Fri Jan 25, 2013 2:27 am

I just found the solution below and it works on version 1.5.4.1: ;)

in:
catalogue/controller/checkout/confirm.php
catalogue/controller/checkout/cart.php
catalogue/controller/module/cart.php
catalogue/model/checkout/order.php
catalogue/controller/account/order.php
catalogue/controller/payment/pp_standard.php (if you are using PayPal Standard)


find and replace:

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

with:

'value' => (wordwrap($option['option_value'],200, "<br />"))

I am using English OpenCart 3.0.3.8, Default Template/Theme, php 7.4, Latest Brave Browser (No Ads-Blocker, etc.)


User avatar
Active Member

Posts

Joined
Thu Jan 17, 2013 11:56 pm
Location - london

Post by parkookk » Sun Jan 27, 2013 1:25 am

I am really puzzled ??? just found that this solution is not working properly coz on the order confirmation email that my store sends to the customer it removes all customer's input in the textarea box!!!!
Can anyone help please? ???

I am using English OpenCart 3.0.3.8, Default Template/Theme, php 7.4, Latest Brave Browser (No Ads-Blocker, etc.)


User avatar
Active Member

Posts

Joined
Thu Jan 17, 2013 11:56 pm
Location - london

Post by Daniel » Sun Jan 27, 2013 9:56 pm

this is not a bug. its supposed to happen this way. only the admin will see all the characters in the admin under orders.

you don;t want to many characters otherwise the invoice will look bad.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by cartamodello » Tue Mar 12, 2013 2:47 pm

Edited to add: Finally came across a solution that seems to work (at least for me) in all places. I have now replaced all

Code: Select all

(utf8_strlen($value) > 20 ? utf8_substr($value, 0, 20) . '..' : $value)
in the list of files above with

Code: Select all

$value
(Instructions provided via: http://forum.opencart.com/viewtopic.php ... 55#p305096).

I just placed a dummy order and checked for my extended info and options in all areas (including confirmation email), and everything's there. Just thought I should update this post to say so in case anyone's still as frustrated as I am. Or was.

(Previous post left intact below)
-----
Daniel, I can kind of understand why you've set it up to behave like this; however, with all due respect, I personally don't care if my invoice looks "bad"... I want my customers to be able to review the custom text and details they sent through to me so they can pick up on any errors! It seems very rude (and a little counterproductive) to hide this information from customers for the sake of aesthetics. I'm a graphic designer so I most definitely care about aesthetics, but function is also super important (and possibly more so in this case!).

I've spent hours now trying to get workarounds working, and I'm just hit with "undefined index: option_value" errors on the customer order page, as well as blank fields for all options on this page (and in the confirmation email). Fortunately, mini cart, cart, and confirmation pages work perfectly though (if without line breaks, but I can deal with that if that's as bad as it gets), so thank you parkook (and others who I know have posted in other threads) for that information!

As for the others: I'm absolutely devastated to have come this far in the setting up of my shop only to discover this huge obstacle right at the finish line. I'm not great with php so this has been a tiring journey getting my head around the coding.

I'd really appreciate any assistance from you, Daniel, or anyone else who has had success updating those files listed by parkookk using the

Code: Select all

(wordwrap($option['option_value'],200, "<br />"))
line in place of

Code: Select all

(utf8_strlen($value) > 20 ? utf8_substr($value, 0, 20) . '..' : $value)
. I've done everything perfectly but I can't get it working correctly. What could I possibly be doing wrong?

I've adjusted the "200" value down to 20 (didn't think that would help--and it didn't!). I've edited all the required files using a careful search and replace to ensure I don't make any typos. I'm using v. 1.5.4.1. I am using the default theme that I've made a lot of adjustments to, but they've been predominantly css and aesthetic alterations, so I don't think that's going to have done anything. Help please?

Thanks in advance.

Laura

Newbie

Posts

Joined
Thu Nov 29, 2012 11:29 am

Post by Daniel » Tue Mar 12, 2013 8:21 pm

you the sotre owner sees all the characters when you login into the admin and click the order with the text in.

the customer does not need to see this because if the text is to long it will make the cart page and email look bad to the customer.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

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

It's very important that the full text is visible as some store owners don't know how and don't want to log in to the admin-area, they just want the e-mails with the orders. Also, if I was a customer I would want to see the whole text as it's sometimes very important text (in my case, text on cards for funeral-flowers). It doesn't look bad in the mail as the font is really small, there can be a ton of text without looking bad.

Thank you parkookk for pointing me in the right direction so I could solve this irritating problem.

Newbie

Posts

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

Users browsing this forum: No registered users and 6 guests