agiftcodotcom Posted April 17, 2004 Posted April 17, 2004 I would like to pass my product ID numbers through to PayPal, but I'm not real good with php yet. I think it would be in the following script under includes/modules/payment/paypal.php , but I'm not sure what exactly to adjust. function process_button() { global $order, $currencies, $currency; if (MODULE_PAYMENT_PAYPAL_CURRENCY == 'Selected Currency') { $my_currency = $currency; } else { $my_currency = substr(MODULE_PAYMENT_PAYPAL_CURRENCY, 5); } if (!in_array($my_currency, array('CAD', 'EUR', 'GBP', 'JPY', 'USD'))) { $my_currency = 'USD'; } $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')); return $process_button_string; } Here is a sample of the coding in a paypal button if it helps at all... <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="[email protected]"> <input type="hidden" name="item_name" value="itemnameorservice"> <input type="hidden" name="item_number" value="123456789"> <input type="hidden" name="amount" value="999.99"> <input type="hidden" name="no_note" value="1"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="lc" value="US"> <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but23.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"> </form> I'm particularly looking at the following thread from the PayPal button, but I don't know how to make it work with the php coding of OSC... <input type="hidden" name="item_number" value="123456789"> Any help is appreciated. Contributions I used : Updated 06-13-04 23:42 ---------------- Vote on My Graphis Poll
TechieTW Posted November 6, 2006 Posted November 6, 2006 I would like to pass my product ID numbers through to PayPal, but I'm not real good with php yet. I think it would be in the following script under includes/modules/payment/paypal.php , but I'm not sure what exactly to adjust. I am trying to do the same thing. My item number in PayPal is not populating and I need to use my product ID number to define the PayPal Item ID variable during the order. I didn't notice any other posts to your original request. Were you able to figure it out? If so, can you let me know how you did it? Thanks! Don't give up. I see light ahead...!
sweetyjenny Posted March 5, 2007 Posted March 5, 2007 Hi. I'm a newbie. Pls try the following Find the following in catalog/includes/modules/payment/paypal.php if (!in_array($my_currency, array('AUD', 'CAD', 'CHF', 'CZK', 'DKK', 'EUR', 'GBP', 'HKD', 'HUF', 'JPY', 'NDK', 'NZD', 'PLN', 'SEK', 'SGD', 'USD'))) { $my_currency = 'USD'; } Add these lines below: $xx = ''; for ($i=0; $i<sizeof($order->products); $i++) { $xx .= ($order->products[$i]['id']) .''; } These will shows the product ID on the payment page instead of store name.
sheltonjb Posted March 19, 2007 Posted March 19, 2007 Hi. I'm a newbie. Pls try the following Find the following in catalog/includes/modules/payment/paypal.php if (!in_array($my_currency, array('AUD', 'CAD', 'CHF', 'CZK', 'DKK', 'EUR', 'GBP', 'HKD', 'HUF', 'JPY', 'NDK', 'NZD', 'PLN', 'SEK', 'SGD', 'USD'))) { $my_currency = 'USD'; } Add these lines below: $xx = ''; for ($i=0; $i<sizeof($order->products); $i++) { $xx .= ($order->products[$i]['id']) .''; } These will shows the product ID on the payment page instead of store name. did anyone try jenny's suggestion? just wondering how u got on? Shelton Brown Web/Graphic Designer
GardenGirl Posted April 1, 2007 Posted April 1, 2007 did anyone try jenny's suggestion? just wondering how u got on? I tried it, but it did not seem to do anything. Anyone else?
7Design Posted June 19, 2007 Posted June 19, 2007 I tried it, but it did not seem to do anything. Anyone else? I tried it as well. Nothing changed for me either.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.