PAYPAL - address line missing

  • Posts: 35
  • Thank you received: 0
12 years 6 months ago #26270

The shop has been working well but have received a number of customer comments regards the address displayed in PayPal.

The client wanted a extra address line so on the registration process we now have 'address line one' and 'address line two' this all works fine and I have added the new field to all the relavant views.

BUT when PayPal pulls through the address the address line one is missing which confuses/worries the customer as the address looks complete. How can I get PayPal to display this custom field?

Many thanks in advance

Please Log in or Create an account to join the conversation.

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
12 years 6 months ago #26278

You should have kept the address_street field for the line 1 and just changed it's label and add a new field with the column name "address_street2" for the second line. That way, they would have been given by HikaShop to paypal automatically without changing anything.


You need to edit the paypal plugin file plugins/hikashoppayment/paypal.php and change the code below to adapt it to your custom fields:
$vars["address1"]=$address1;
$vars["address2"]=$address2;

Please Log in or Create an account to join the conversation.

  • Posts: 35
  • Thank you received: 0
12 years 6 months ago #26296

OK I will do that in future.

So what exactly do I change in this code? - screen shot shows the custom fields I made

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
12 years 6 months ago #26298

You should use that:

$vars["address1"]= $order->cart->$address_type->address;
$vars["address2"]= $order->cart->$address_type->address_street;

Please Log in or Create an account to join the conversation.

  • Posts: 35
  • Thank you received: 0
12 years 6 months ago #26303

many thanks Nicolas

Please Log in or Create an account to join the conversation.

Time to create page: 0.063 seconds
Powered by Kunena Forum