Jump to content

How To Change Item Number To Reference Number On Paypal Order Summary


gabmac

Recommended Posts

  • 3 months later...

Oh - it works after all (missed a liitle code) - PS1.5.4.1 and PayPal Module 3.5.1

By default Paypal module in prestashop add item number on the last page of the payment process.

Better idea would be to use reference no.

To change that, you have to go to modules/paypal/express_checkout/process.php and find:

1. 'token', 'id_product', 'id_p_attr', - change "id_product" to "reference"

2. $fields['L_PAYMENTREQUEST_0_NUMBER'.++$index] = (int)$product['id_product'];

change to:

$fields['L_PAYMENTREQUEST_0_NUMBER'.++$index] = $product['reference'];

3. $id_product = $product['id_product']; change to $id_product = $product['reference'];

and that's it

Link to comment
Share on other sites

  • 1 year later...

Oh - it works after all (missed a liitle code) - PS1.5.4.1 and PayPal Module 3.5.1

 

By default Paypal module in prestashop add item number on the last page of the payment process.

Better idea would be to use reference no.

To change that, you have to go to modules/paypal/express_checkout/process.php and find:

1. 'token', 'id_product', 'id_p_attr', - change "id_product" to "reference"

2. $fields['L_PAYMENTREQUEST_0_NUMBER'.++$index] = (int)$product['id_product'];

change to:

$fields['L_PAYMENTREQUEST_0_NUMBER'.++$index] = $product['reference'];

3. $id_product = $product['id_product']; change to $id_product = $product['reference'];

and that's it

How do I change that file modules/paypal/express_checkout/process.php?

thanks

Link to comment
Share on other sites

  • 10 months later...

Oh - it works after all (missed a liitle code) - PS1.5.4.1 and PayPal Module 3.5.1

 

By default Paypal module in prestashop add item number on the last page of the payment process.

Better idea would be to use reference no.

To change that, you have to go to modules/paypal/express_checkout/process.php and find:

1. 'token', 'id_product', 'id_p_attr', - change "id_product" to "reference"

2. $fields['L_PAYMENTREQUEST_0_NUMBER'.++$index] = (int)$product['id_product'];

change to:

$fields['L_PAYMENTREQUEST_0_NUMBER'.++$index] = $product['reference'];

3. $id_product = $product['id_product']; change to $id_product = $product['reference'];

and that's it

 

Hi Nick,

 

Thanks for your suggested solution.

I am wondering also if it works this on the modules/paypal/express_checkout/process.php    of prestashop 1.6

 

I can't find exactly the code you say. I've found this though in the line 280:

 

 

private function setProductsList(&$fields, &$index, &$total)

    {

        foreach ($this->product_list as $product)

        {

            $fields['L_PAYMENTREQUEST_0_NUMBER'.++$index] = (int)$product['id_product'];

 

            $fields['L_PAYMENTREQUEST_0_NAME'.$index] = $product['name'];

 

 

Question: Do I change the third line here above, changing 'id_product' for 'reference'??

 

That simple cannot be! Could you confirm if this is so? Doing that I will receive the paypal bills with the number of reference of product, instead of number of article?

 

 

THANK YOU!

Link to comment
Share on other sites

  • 1 year later...

using PayPalusa with 1.6.1.7 and need to replace the item # with reference # (SKU), The above method is for old version and can't figure out what file and what code to change to get this fixed?

 

Also Shipping appears as an item on paypal. Could it be changed to post into the shipping field in PayPal instead on item field?

 

Thanks 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...