Guest Posted March 5, 2009 Share Posted March 5, 2009 Hello, I use OScommerce 2.2 RC1 and I have installed this contribution: http://www.oscommerce.com/community/contri...search,discount to use discount in my store. The problem is that Paypal doesn't "understand" the discount and it receives the price without discount. I honestly don't know what to do and where to put my hands.. Thank you. Quote Link to comment Share on other sites More sharing options...
web-project Posted March 5, 2009 Share Posted March 5, 2009 The problem is that Paypal doesn't "understand" the discount and it receives the price without discount. it's not PayPal doesn't "understand", it's you have setup incorrect way.. simply set the Transaction Type as Aggregate and you will see the difference. Quote 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. Link to comment Share on other sites More sharing options...
webbsy Posted November 2, 2009 Share Posted November 2, 2009 i have the same problem but when i set it to per item it shows all the details of the order but no discount, if i set it to aggragate it shows the discount but no order details, is there anyway to get both? Quote Link to comment Share on other sites More sharing options...
amal2004 Posted September 1, 2011 Share Posted September 1, 2011 hii 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 following changes. But still my discount amount does not transfer to paypal. 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)); } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.