Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

Hii All

 

Im using osCommerce 2.2-MS2 with osCommerce_PayPal_IPN_v2.3.3 and KGT Discount coupon code module dc_autoinstaller_2.14_2_1

 

And i did some changes found on forum.

But still my discount amount does not transfer to paypal.blink.png It shows total amount without applying Discount percentage.

When i try with bank transfer payment method it shows correct amount. If i used paypal payment method after first using

bank transfer payment method, then paypal also shows correct discounted total amount.

But if i try paypal as a payment method at the first place, it doesnt show discounted total.

 

I tried installing different paypal IPNs and discount module versions. But still my problem same.

If you guys have any idea how to fix this error please help me. i really appriciate any level of help.

Thank you so much in advance.

 

-----------------------------------------------------

i did following changes.

-----------------------------------------------------

 

 

1) I selected aggregate instead of individual On transaction type.

 

 

 

2)

 

FIND around line 195:

 

//+1.4

$sql_data_array = array('orders_id' => $insert_id,

'orders_status_id' => $order->info['order_status'],

'date_added' => 'now()',

'customer_notified' => '0',

'comments' => $order->info['comments']);

tep_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);

//-1.4

 

 

 

ADD this code after:

 

//kgt - discount coupons

if( tep_session_is_registered( 'coupon' ) && is_object( $order->coupon ) ) {

$sql_data_array = array( 'coupons_id' => $order->coupon->coupon['coupons_id'],

'orders_id' => $insert_id );

tep_db_perform( TABLE_DISCOUNT_COUPONS_TO_ORDERS, $sql_data_array );

}

//end kgt - discount coupons

 

 

 

FIND around line 493:

 

// unregister session variables used during checkout

tep_session_unregister('sendto');

tep_session_unregister('billto');

tep_session_unregister('shipping');

tep_session_unregister('payment');

tep_session_unregister('comments');

 

 

 

ADD this code after:

 

//kgt - discount coupons

tep_session_unregister('coupon');

//end kgt - discount coupons

 

 

3)

 

FOLLOWING CODE:

 

 

if(MOVE_TAX_TO_TOTAL_AMOUNT == 'True') {

$parameters['amount'] = number_format(($subtotal + $order->info['tax']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency));

} else {

// default

$parameters['amount'] = number_format($subtotal * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency));

$parameters['tax'] = number_format($order->info['tax'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency));

}

 

 

Updated to THIS :

 

 

if(MOVE_TAX_TO_TOTAL_AMOUNT == 'True') {

if (isset($order_total['ot_gv']) || isset($order_total['ot_coupon'])) {

//the discount will apply to the order total

$parameters['amount'] = number_format((($subtotal + $order->info['tax'] + $shipping) * $currencies->get_value($my_currency)) - $order_total['ot_gv'] - $order_total['ot_coupon'], $currencies->get_decimal_places($my_currency));

}else{

$parameters['amount'] = number_format(($subtotal + $order->info['tax'] + $shipping) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency));

}

 

} else {

// default

$parameters['amount'] = number_format(($subtotal + $shipping) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency));

$parameters['tax'] = number_format($order->info['tax'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency));

}

Posted

The KGT Discount coupon code is different to Credit Class & Gift Voucher module, this is a reason it doesn't work and the $order_total['ot_gv'] and $order_total['ot_coupon'] is irrelevant.

Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here!

8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself.

Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues.

Any issues with oscommerce, I am here to help you.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...