Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

paypal emails multi products on one line


roiphil

Recommended Posts

Hi

I downloaded this addon paypal addon and have it working to a degree one problem i have is that when a customer pays through paypal and they have more than 1 item all items appear on one line and the quantity shows as 1 for example

 

paypal10.jpg

 

Instead of each item being on its own line has any one got any ideas of how to fix, i am using Paypal Website Payments Standard

 

Thanks in advance

Phil

Link to comment
Share on other sites

Phil,

 

The better description contribution is intended to give you more information about the products ordered that will allow you to match it to the order in your admin>orders section. It is not intended to serve as an invoice to the customer.

 

However, it is possible to edit the contribution to make each of the 3 items appear on separate lines if you want to change the code a little.

 

 

Chris

Link to comment
Share on other sites

Phil,

 

The better description contribution is intended to give you more information about the products ordered that will allow you to match it to the order in your admin>orders section. It is not intended to serve as an invoice to the customer.

 

However, it is possible to edit the contribution to make each of the 3 items appear on separate lines if you want to change the code a little.

 

 

Chris

 

Hi Chris

Yes this is exactly what i am after making each item appear on seperate lines, i have some one who knows about codes etc but he is having trouble changing the code so as all items appear on diffeent lines, what part of the code does he need to change etc, any help much apreciated, thanks Phil

Link to comment
Share on other sites

Unrelated point: I was struggling for a while with the default IPN module (I think the one you must be using), until I realised that really its better to install this one - http://addons.oscommerce.com/info/2679 as it seems to work a whole lot better as the other one imo has lots of flaws (anyone else with more experience want to give their opinion?).

 

As to your problem - I don't know the code exactly, but the transaction is initiated to paypal by calling a webaddress with 'GET' parameters which specify the item name, cost, shipping, total etc.

 

It looks like all your items are being transferred to paypal as 1 item. The cost of this item is the sum of all the items in the cart. When done like this, paypal has no idea (and/or doesnt care) that there are more than 1 item, and just processes it as one amount.

 

(I would like to add, this seems more reliable in some cases, and you could just edit the code to change the 'item_name' parameter to something like "<My Store> Products" and it would work fine. Is fixing this really a top priority?).

 

To put them on separate lines, you would need to pass them to paypal as separate items. Look for a 'parameter' array in the code (paypal_standard.php?? possibly), or similar. At a guess, you will need to change it from SOMETHING LIKE this:

 

$parameters['item_name'] = "Item1 " . "Item2 " . ....;

$parameters['amount'] = $item1_price + $item2_price + ....

 

to SOMETHING LIKE the following:

 

$parameters['item_name1'] = "Item 1";

$parameters['item_name2'] = "Item 2";

$parameters['amount1'] = $item1_price;

$parameters['amount2'] = $item1_price;

 

 

I'm not certain on the variables names, array name etc etc. But this is the basic principle. This will then send it to paypal as separate items and they will be displayed on different lines (the paypal IPN contribution I linked to above allows you to select this in the admin area).

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...