jkpen Posted March 28, 2008 Posted March 28, 2008 The payment received email send from paypal shoul include products name in the content. In the email which the customer get stays the store name. Payment Details ----------------------------------- Transaction ID: 01978160YE164782U Item Price: 125.00 EUR Total Shipping: €18.00 EUR Total: €143.00 EUR Order Description: JK Pens - vintage Pens and Pencils Invoice ID: 13 Buyer: Test User ---------- JK Pens - vintage Pens and Pencils is store name !!! Why the product name doesn't appear? Could somebody help me? Regard Jurek
Guest Posted March 29, 2008 Posted March 29, 2008 Good Morning, Good question, my comic book store sells about 1 comic book every two years and in January I had sold another one. This year, the shopping cart failed and left me with no record of the transaction. (Other years I had the paper trail to let me know the items ordered.) I started looking at the code behind what information PayPal receives from osCommerce. The problems would lie in this section around line 85 of catalog/includes/modules/payment/paypal.php: $process_button_string = tep_draw_hidden_field('cmd', '_xclick') . tep_draw_hidden_field('business', MODULE_PAYMENT_PAYPAL_ID) . tep_draw_hidden_field('item_name', STORE_NAME) . tep_draw_hidden_field('amount', number_format(($order->info['total'] - $order->info['shipping_cost']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) . tep_draw_hidden_field('shipping', number_format($order->info['shipping_cost'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) . tep_draw_hidden_field('currency_code', $my_currency) . tep_draw_hidden_field('return', tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL')) . tep_draw_hidden_field('cancel_return', tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL')); I have not "fixed" this problem before so my suggestions are just that suggestions. Above this selection add: $product_list = ''; for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { $product_list .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . "\n"; } Where it says STORE_NAME you might want to try and replacing it with: $product_list This works nicely ONLY when there is one item in the cart. I get a communication error with paypal when I try two items in the cart. The one item displayed as "1 x Marvel Tales #161 starring Spider-Man". On Paypay's developer section I see they developed two each (US & UK) osCommerce modules** with and with/or/without accounts. They also mention that the standard stuff provided with osCommerce work. **They seem to be coded to pull more items of the cart to paypal. This is a start on working out your problem. (I had tried some other stuff to replace STORE_NAME but they didn't work at all) Have a good day,
Guest Posted March 29, 2008 Posted March 29, 2008 The second time I tried clicking on confirm, I got through to paypal without communication errors. For two comic books, Paypal's site shows "1 x Marvel Tales #161 starring Spider-Man 1 x Marvel Tales #163 starring Spider-Man" for the item title. From the Notification of Payment Received email: Quantity: 1 Item/Product Name: 1 x Marvel Tales #161 starring Spider-Man 1 x Marvel Tales #163 starring Spider-Man From Receipt for Your Payment email: Total: $0.02 USD Order Description: 1 x Marvel Tales #161 starring Spider-Man 1 x Marvel Tales #163 starring Spider-Man So I think that this might just actually work.
jkpen Posted March 30, 2008 Author Posted March 30, 2008 Hi Doug, thanks a lot for your Help. It really works! I made changes in my paypal_standard.php. Many Thanks. Anyway, if the customer bought 2 items there should be Quantity: 2 not Quantity: 1 isn't it? If not just please correct me. Kind regards Jurek The second time I tried clicking on confirm, I got through to paypal without communication errors. For two comic books, Paypal's site shows "1 x Marvel Tales #161 starring Spider-Man 1 x Marvel Tales #163 starring Spider-Man" for the item title. From the Notification of Payment Received email: Quantity: 1 Item/Product Name: 1 x Marvel Tales #161 starring Spider-Man 1 x Marvel Tales #163 starring Spider-Man From Receipt for Your Payment email: Total: $0.02 USD Order Description: 1 x Marvel Tales #161 starring Spider-Man 1 x Marvel Tales #163 starring Spider-Man So I think that this might just actually work.
Guest Posted April 1, 2008 Posted April 1, 2008 Hi Doug, thanks a lot for your Help. It really works! I made changes in my paypal_standard.php. Many Thanks. Anyway, if the customer bought 2 items there should be Quantity: 2 not Quantity: 1 isn't it? If not just please correct me. Kind regards Jurek Yes, the script pulls the quantity from the order tables so if they purchased 10 of the same item then it would show "10 x such-and-such-item". Cool, I am glad it helps.
jkpen Posted April 1, 2008 Author Posted April 1, 2008 Yes, the script pulls the quantity from the order tables so if they purchased 10 of the same item then it would show "10 x such-and-such-item". Cool, I am glad it helps. Thanks a lot
Recommended Posts
Archived
This topic is now archived and is closed to further replies.