Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Using products_id to pass through Paypal as item_number


TechieTW

Recommended Posts

Use:

 

$order->products[$i]['id']

 

Sonia

 

 

Thank you! I have some programing knowledge but not that much with PHP (yet) :blush: .

Where would I insert this statement? Shouldn't there be some sort of 'item_number =' included used?

Don't give up. I see light ahead...!

Link to comment
Share on other sites

Thank you! I have some programing knowledge but not that much with PHP (yet) :blush: .

Where would I insert this statement? Shouldn't there be some sort of 'item_number =' included used?

 

Yes, it would be something like:

 

 

item_number = $order->products[$i]['id'];

 

 

 

I dont see your code or know exactlty which module you are using, however just copy how another variable is done :)

 

 

Sonia

Link to comment
Share on other sites

:thumbsup: Thanks Sonia! With your help I added the following line in /osCommerce/catalog/includes/modules/payment/paypal_ipn.php (under line 545) with successful results.

 

$parameters['item_number_' . $item] = $order->products[$i]['model'];

 

The Paypal variable 'item_number_' will be defined = to the ocCommerce item's model value. (products_model)

 

This is exactly what I needed to do. You could also define the item_number_ = products_id

 

Personally, I like the idea of using the 'model' value so it can be easily edited in the administrator module.

 

Now I'm stylin'! B)

Don't give up. I see light ahead...!

Link to comment
Share on other sites

I'm sorry. The correct line number is 295 in paypal_ipn.php :blush:

This is where you can define your pass through variables. Keep in mind Paypal processes only 2. (If you are not using options for your items, you can define two here.

 

I apologize for any confusion caused by the wrong line#.

:)

Don't give up. I see light ahead...!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...