web.geek Posted January 21, 2011 Share Posted January 21, 2011 Got the PayPal interface working...really easy...works like a charm, except: The customer's name appears in PayPal as first = last, last = first. In other words, when John Smith completes an order, he appears in PayPal as Mr. Smith John.Has anybody seen that before? I'm going to dig through the PayPal module, but I thought I'd give the forums a shot as well. When we find a solution, it would be important to share anyway. Link to comment Share on other sites More sharing options...
shokinro Posted January 21, 2011 Share Posted January 21, 2011 I haven't had a chance to look into latest version of Paypal module, but I guess this issue is only display format because of different country culture, not first/last name data switched. If you go to see detail in Paypal data, I guess the first name and last name should be correct. Link to comment Share on other sites More sharing options...
web.geek Posted January 21, 2011 Author Share Posted January 21, 2011 I think I found the code in the PayPal module, and it appends the name as lastname + firstname and sends it to PayPal. The order details in PayPal are all showing the data as LastName FirstName. So, I end up with Mr. John Smith in my store and Mr. Smith John in PayPal. I understand it could be a country/culture issue, but it would be nice if it was consistent.I am going to test changing the code in the module. If it works like I think it will, I'll stick with customization. Not sure if it warrants a bug report, but maybe a feature request for some formatting flexibility would be in order. Link to comment Share on other sites More sharing options...
shokinro Posted January 21, 2011 Share Posted January 21, 2011 I think Paypal have separate first_name and last_name parameter, why would pass full name to Paypal?I think pass last/first name as a separate parameter is proper way to do. Link to comment Share on other sites More sharing options...
web.geek Posted January 21, 2011 Author Share Posted January 21, 2011 This is what I have uncovered. There are 3 php files within the PayPal modules that concatenate the name as "lastname" + "firstname" as it prepares to send it to PayPal. I made the following changes to the files, and the name in PayPal is now listed as "firstname" + "lastname"/modules/paypal/paypal.phpBefore: ln 388 $requestAddress = '&SHIPTONAME;='.urlencode($address->company.' '.$address->lastname.' '.$address->firstname)... After: ln 388 $requestAddress = '&SHIPTONAME;='.urlencode($address->company.' '.$address->firstname.' '.$address->lastname)... /modules/paypal/express/paypalexpress.phpBefore: ln 68 $request .= '&SHIPTONAME;='.urlencode($address->lastname.' '.$address->firstname); After: ln 68 $request .= '&SHIPTONAME;='.urlencode($address->firstname.' '.$address->lastname); /modules/paypal/payment/paypalpayment.phpBefore: ln 66 $request .= '&SHIPTONAME;='.urlencode($address->lastname.' '.$address->firstname); After: ln 66 $request .= '&SHIPTONAME;='.urlencode($address->firstname.' '.$address->lastname); The difference can be seen in the highlighted portions of the attached screenshots. My [spam-filter] thinks I'm picking nits on this one, since she doesn't think the customers will see it. But, I see it, so it matters ;-) Link to comment Share on other sites More sharing options...
web.geek Posted January 21, 2011 Author Share Posted January 21, 2011 In my testing, I also noticed the transposition on the shopping-cart.tpl page during the 5-page checkout. It occurs on the summary step in the Delivery and Invoice Addresses. It appears correct (first name first) later in the process on the Address step under the delivery and billing addresses./themes/prestashop<or your theme>/shopping-cart.tplBefore: ln 292 {$delivery->lastname|escape:'htmlall':'UTF-8'} {$delivery->firstname|escape:'htmlall':'UTF-8'} ln 303 {$invoice->firstname|escape:'htmlall':'UTF-8'} {$invoice->lastname|escape:'htmlall':'UTF-8'} After: ln 292 {$delivery->lastname|escape:'htmlall':'UTF-8'} {$delivery->firstname|escape:'htmlall':'UTF-8'} ln 303 {$invoice->firstname|escape:'htmlall':'UTF-8'} {$invoice->lastname|escape:'htmlall':'UTF-8'} Again, I use the terms "right" and "wrong" in the context of consistency. If last name first suits you, you may want to find the code where it displays first name first and change it. Link to comment Share on other sites More sharing options...
shokinro Posted January 21, 2011 Share Posted January 21, 2011 thanks for sharing your information here. I will also check that out. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now