Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Passing item names to paypal, rather than store name?


mrw

Recommended Posts

Posted

I'm using the default PayPal modual. Everything is working fine, however I would like for the item(s) names and quanity to be passed to PayPal for the field 'item_name', rather than the default store_name. Thus I need to build a string something like this, (for example).

 

mystr = item1name (2), item2name(5), item3name(1).

 

I know I need to replace STORE_NAME in the code below with this string, but I have no idea how to build the string, and what the veriable names are for the items in the shopping cart. Can anyone help me with this?

 

 

 $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('first_name', $order->billing['firstname']) .
				tep_draw_hidden_field('last_name', $order->billing['lastname']) .
				tep_draw_hidden_field('address1', $order->billing['street_address']) .
				tep_draw_hidden_field('address2', $order->billing['suburb']) .
				tep_draw_hidden_field('city', $order->billing['city']) .
				tep_draw_hidden_field('state', $order->billing['state']) .
				tep_draw_hidden_field('zip', $order->billing['postcode']) . 
						   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;
}

 

Thanks!!

Posted

go to the contributions section and run a search.. there is a contribution that explains what and where to type to get that info

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...