chfields, on Oct 22 2003, 02:36 PM, said:
If you are getting this problem with Paypal you can use this to remedy it
Just in case someone doesn't click continue to get back to your site
here is a mod to include into your PayPal module to you can see what the customer ordered on your PayPal payment notification (just in case they don't return to your site to complete the process and generate an invoice) -
BACK UP BACK UP BACK UP
change the following code:
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';
}
$xx = '';
for ($i=0; $i<sizeof($order->products); $i++) {
$xx .= $order->products[$i]['qty'] . '-' . ($order->products[$i]['name']) . '**';
}
$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 . ' ' . $xx) .
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;
}
the above code snippet replaces the code snippet in the catalog/includes/modules/payment/paypal.php file
look for
function process_button() {
and then copy and paste and replace that section of code with the code above
hi
remember me from yesterday, well i managed to get the user permissions sorted but when i done the code you have posted it comes up with the error:
Warning: Cannot modify header information - headers
already sent by (output started at
/home/mvtqkof/public_html/shop/includes/modules/payment/paypal.php:140)
in
/home/mvtqkof/public_html/shop/includes/functions/general.php
on line 28
do you know what this is.
let me know
thanks
chris