I have made the following small changes in /includes/modules/payment/paypal.php
I have added two new variables to the function process_button() at around line 165:
$itemlist = '';
$itemamount = 0;
Itemlist is a string where a concatenated string for all the items will be formed. Itemamount is an integer where the number of total items will be calculated.
Next, added the following piece just before $optionsAggregate = ... around line 260:
for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
$itemlist = $itemlist . strval($order->products[$i]['qty']) . 'x ' . $order->products[$i]['name'];
if ($i<$n-1) $itemlist = $itemlist . ', ';
$itemamount = $itemamount + $order->products[$i]['qty'];
}
and finally change the 'item_name' and 'item_number' assignments as also gregsmith suggested:
'item_name' => MODULE_PAYMENT_PAYPAL_PURCHASE_DESCRIPTION_TITLE . $itemlist,
'item_number' => MODULE_PAYMENT_PAYPAL_PURCHASE_DESCRIPTION_ITEMNUM . strval($itemamount),
This way your Paypal item will show items' quantities and items' names listed (comma seperated) next to your store name.
The Paypal item # will show total amount of items in this payment.
I also suggest you to edit your /includes/languages/modules/payment/paypal.php define's as follows so that the line looks neat.
define('MODULE_PAYMENT_PAYPAL_PURCHASE_DESCRIPTION_TITLE', 'Purchases from ' . STORE_NAME . ': ');
define('MODULE_PAYMENT_PAYPAL_PURCHASE_DESCRIPTION_ITEMNUM', '');
Finally your payment in Paypal IPN will show like this:
Purchases from yourstore.com: 3x Adjustable Amount Gift Certificates, 1x Gift Certificate 10$
Item # 4
