Author Topic: PayPal Initial Page in Wrong Language  (Read 51460 times)

Carpman

  • Beginner
  • *
  • Posts: 14
PayPal Initial Page in Wrong Language
« on: May 15, 2008, 20:09:28 PM »
I am having issues with the initial payment page using the PayPal payment module.

Firstly this is not a Virtuemart issue, but I still need assistance to what I think the problem is.

To put you in the picture we live in Spain, but we have a site for an English client hosted on Spanish servers. When a customer clicks to pay using PayPal they are getting the initial screen in Spanish and panicking, we are seeing the order but payments are not been processed. From those people we have contacted it is the Spanish language screen putting them off.

I have searched for an answer and it seems we can force the screen to be English but we have to add <input type="hidden" name="lc" value="en"> My problem is where do I put that?

PayPal customer service sucks and its taken all day to get this little piece of information, so hopefully somebody can tell me where it should go?
Regards to you all...

KEVIN

Carpman

  • Beginner
  • *
  • Posts: 14
Re: PayPal Initial Page in Wrong Language
« Reply #1 on: May 16, 2008, 09:31:54 AM »
I had a reply from PayPal which confirms that I can add a variable to force the first screen of PayPal to be in a specific language, however the above is wrong and for my site whicis mainly targeting a UK (English) site it should be:

<input type="hidden" name="lc" value="GB">

However can someone please help me and tell me where within the Virtuemart 1.1.0 files I should have this code?

Maybe this is already posted somewhere, but I've searched for hours, it would be a good item to be covered in Soeren's stickie at the top of this section.
Regards to you all...

KEVIN

Carpman

  • Beginner
  • *
  • Posts: 14
Re: PayPal Initial Page in Wrong Language
« Reply #2 on: May 24, 2008, 10:03:04 AM »
Hi Guys

I could really do with your help on this one, a week and no answer is very unusual?

This is causing me great problems and I need to force PayPal's initial screen to be in English, if there is already an answer to this forgive me and please point me in the right direction. We have orders not getting fulfilled because our target market, the UK is abandoning checkout when its in Spanish...

PayPal responded very quickly on this (unusual) now I just need to implement <input type="hidden" name="lc" value="GB"> somewhere...

HELP!  :-\

Regards to you all...

KEVIN

helpinghand

  • Beginner
  • *
  • Posts: 13
Re: PayPal Initial Page in Wrong Language
« Reply #3 on: June 09, 2008, 17:15:26 PM »
I have the same problem and am looking for a solution...

Carpman

  • Beginner
  • *
  • Posts: 14
Re: PayPal Initial Page in Wrong Language
« Reply #4 on: June 09, 2008, 17:42:09 PM »
It's a pity nobody can help us, I feel this is a very, very important issue and I am very surprised that after all this time we still do not have an answer.

Is this a bug, there there a fix, we have the resolution from PayPal (quickly which is strange) but need assistance with the Virtuemart code.

Can a moderator maybe highlight this to a developer, maybe the answer is simple, maybe it isn't. All I know is that we are getting orders aborted, not many, but I hoped someone would assist before we made the decision of stripping Virtuemart from this and future sites...

If you can help us or point in the right direction we would be grateful...
Regards to you all...

KEVIN

papermakeit

  • Beginner
  • *
  • Posts: 30
Re: PayPal Initial Page in Wrong Language
« Reply #5 on: June 10, 2008, 13:00:00 PM »
The problem is not only the language itself, but the origin site that manage the transaction. My PayPal is from Italy; if you see my Italian page in English the problem remains because you cannot pay in your original currency.

I solved this forcing User to choose the country when registering. In this way the PayPal page is directly the same as the User origin with his currency.

To force this, when a guest wants to register to your site, change the link "Register" so that it is the same than "create new account" from Virtuemart page.

So, the database is syncronized and the problem disappears.

I hope this helps.

Claudio

helpinghand

  • Beginner
  • *
  • Posts: 13
Re: PayPal Initial Page in Wrong Language
« Reply #6 on: June 10, 2008, 14:34:42 PM »
Hi,

Thanks for the tip Claudio.

I actually have found the solution to force the PayPal setup. This is done by sending this to PayPal:

<input type="hidden" name="lc" value="GB">

You need to edit the paypal payment method detaiils. Go to configuration and edit "Payment Extra Info". After this:

$post_variables = Array(

add:

"lc" => "US",

So this will give you:

<?php
$url = "https://www.paypal.com/cgi-bin/webscr";
$tax_total = $db->f("order_tax") + $db->f("order_shipping_tax");
$discount_total = $db->f("coupon_discount") + $db->f("order_discount");
$post_variables = Array(
"lc" => "US",
"cmd" => "_xclick",
"business" => PAYPAL_EMAIL,
"receiver_email" => PAYPAL_EMAIL,
"item_name" => $VM_LANG->_PHPSHOP_ORDER_PRINT_PO_NUMBER.": ". $db->f("order_id"),
"order_id" => $db->f("order_id"),
"invoice" => $db->f("order_number"),
"amount" => round( $db->f("order_subtotal")+$tax_total-$discount_total, 2),
"shipping" => sprintf("%.2f", $db->f("order_shipping")),
"currency_code" => $_SESSION['vendor_currency'],"first_name" => $dbbt->f('first_name'),
"last_name" => $dbbt->f('last_name'),
"address_street" => $dbbt->f('address_1'),
"address_zip" => $dbbt->f('zip'),
"address_city" => $dbbt->f('city'),
"address_state" => $dbbt->f('state'),
"address_country" => $dbbt->f('country'),
"image_url" => $vendor_image_url,
"return" => SECUREURL ."index.php?option=com_virtuemart&page=checkout.result&order_id=".$db->f("order_id"),
"notify_url" => SECUREURL ."administrator/components/com_virtuemart/notify.php",
"cancel_return" => SECUREURL ."index.php",
"undefined_quantity" => "0",
"test_ipn" => PAYPAL_DEBUG,
"pal" => "NRUBJXESJTY24",
"no_shipping" => "1",
"no_note" => "1"
);
if( $page == "checkout.thankyou" ) {
$query_string = "?";
foreach( $post_variables as $name => $value ) {
$query_string .= $name. "=" . urlencode($value) ."&";
}
mosRedirect( $url . $query_string );
} else {

echo '<form action="'.$url.'" method="post" target="_blank">';
echo '<input type="image" name="submit" src="http://images.paypal.com/images/x-click-but6.gif" border="0" alt="Make payments with PayPal, it is fast, free, and secure!" />';

foreach( $post_variables as $name => $value ) {
echo '<input type="hidden" name="'.$name.'" value="'.$value.'" />';
}

echo '</form>';

}
?>

helpinghand

  • Beginner
  • *
  • Posts: 13
Re: PayPal Initial Page in Wrong Language
« Reply #7 on: June 10, 2008, 14:43:30 PM »
Claudio I can see the value in what youre saying actually. That would be a really useful feature. How can I change the link "Register" so that it is the same than "create new account" within Virtuemart?

Carpman

  • Beginner
  • *
  • Posts: 14
Re: PayPal Initial Page in Wrong Language
« Reply #8 on: June 10, 2008, 16:25:39 PM »
Hi Claudio and thank you for your reply.

The problem I have and I think David had as well, is that our sites are based in Spain or on Spanish servers but are in English. My clients in the UK complete checkout then when are redirected to PayPal get the first page in Spanish, they have already registered on my site at this stage with a UK address.

Even those with a UK PayPal account still get the page in Spanish until they login. I know it should be easy for them to login no matter what the first page language is, but having spoken to some of them they have aborted payment as they are not happy with a foreign language even though when they have logged in their English preferences are restored.

I don't know if that made sense, or maybe you are suggesting some other way but I cannot see how?

I will try what David has done with the PayPal suggestion and hopefully report success, thanks to you both for helping!
Regards to you all...

KEVIN

Carpman

  • Beginner
  • *
  • Posts: 14
Re: PayPal Initial Page in Wrong Language
« Reply #9 on: June 10, 2008, 16:38:10 PM »
David

Nice one, worked for me, just getting someone in UK to check and see what happens on their“s.

I like how using "lc" => "US" has forced a English screen but they now have language options at the top which they didn't have before by default, fab!
Regards to you all...

KEVIN

papermakeit

  • Beginner
  • *
  • Posts: 30
Re: PayPal Initial Page in Wrong Language
« Reply #10 on: June 10, 2008, 17:24:32 PM »
Claudio I can see the value in what youre saying actually. That would be a really useful feature. How can I change the link "Register" so that it is the same than "create new account" within Virtuemart?

You need to find the mod_login components. I changed everything beginning with login... but it was useless...
Then I realized that you have to seek inside your specific template that probably has an override mod_login.

In my case:
templates/xxx/html/mod_login/default.php

You have to change the code so to have:

Code: [Select]
<?php echo JText::_('No account yet?'); ?>
<a href="http://www.yoursite.com/index.php?option=com_virtuemart&amp;page=shop.registration&amp;Itemid=73">
<br /><?php echo JText::_('Register'); ?></a>

Maybe the Itemid is not 73 for you, but you can find the right one in Administration panel.


Moreover change every other links to that Form.

Kevin,

your Users have registered with UK address but VirtueMart is not syncronized with the database of Users and it doesn't read the correct Address. My solution is working for me (at the moment ;) ) and my customers don't see Italian Page anymore.

Claudio

rossi256

  • Beginner
  • *
  • Posts: 49
Re: PayPal Initial Page in Wrong Language
« Reply #11 on: July 12, 2008, 21:32:12 PM »
Hi,

I am trying to get my paypal-pages work in the correct language.
My website is in 5 languages (English, German, French, Spanish, Russian).

I changed the paypal-script, so that it delivers the 2 digit country code from the order to paypal through the lc variable.

Problem:
Paypal does only know something like 5 or 6 languages as far as i know. And i think those languages are not all linked to the according lc variables. - i tested that with for example Chile - 2 digit code CL - when posting it through the script, an english Paypal-checkout-page comes up.
So i think it would be necessary to post the language variables such as ES for spanish, US or UK for English, DE for German,...

I want to post the current Site-language (Joomfish) - but i don't know enough about joomla to know how to get the current language into a variable to post it to paypal in the lc variable....

if anybody knows how, please let me know!
thanks!
Rossi

estrosgr

  • Beginner
  • *
  • Posts: 1
Re: PayPal Initial Page in Wrong Language
« Reply #12 on: May 10, 2009, 00:18:11 AM »
just change Payment Extra Info

FROM
$post_variables = Array(
"cmd" => "_cart",

======================
TO
$post_variables = Array(
"charset"=>"UTF-8",
"cmd" => "_cart",



i found this solution in internet,
Working for Me!

(VirtueMart 1.1.3)
 

enspyre

  • Beginner
  • *
  • Posts: 8
Re: PayPal Initial Page in Wrong Language
« Reply #13 on: October 28, 2009, 03:36:40 AM »
Seems like this thread never had a solution to the problem of how to get PayPal to show up in the language chosen in Joomfish. Hard coding it for a specific language doesn't solve that problem.

Does anyone know how to make something like:
"lc" => [LANGUAGE CHOSEN IN JOOMFISH],

I have searched and searched and not found a solution.

Thanks!

CourtneyMacfarlane

  • Beginner
  • *
  • Posts: 2
Re: PayPal Initial Page in Wrong Language
« Reply #14 on: November 11, 2009, 08:52:02 AM »
Hello, Just thought id register to make a quick comment to see if anyone could tell me how i get to the CONFIGURATION part haha im completely stuck sitting here trying to figure it.. Basically have the same problem. The company i work for in spain, When our customers in UK go to pay, goes straight to paypal in spanish.. ino its just a click away to change that but what can we do! Im not to smart with computers to be fairly honest but if anyone can talk me through it or give me a few hints id really appreciate it, thank-you! Courtney.