Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

amal2004

Pioneers
  • Posts

    22
  • Joined

  • Last visited

1 Follower

Profile Information

  • Real Name
    Amal Weerathunge

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

amal2004's Achievements

  1. There are so many paypal IPN and discount code module versions come under these 2 links. Which versions i should use along with osCommerce 2.2-MS2. Thank you
  2. Hi im trying to add discount coupon system to my website to allow 5000 customers to enter 5000 unique discount codes. Im using following oscommerce and module versions. Unforutetly still no luck. It doesnt work with paypal. May be im using incompatible paypal and discount coupon versions. I followd the links you have given. http://www.oscommerc...tributions,4269 and http://www.oscommerc...tributions,2679 But So many Paypal IPN version and Discount coupon code versions come under those links. Im confused which modules to use. Anyway currently 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 But still discounted total not passing to paypal. As i can understand this could be problem with paypal IPN. Could you please help me to fix my code or recomennde me correct discount/gift voucher module and paypal_ipn versions use with osCommerce 2.2-MS2. Thank you
  3. Hii KGT First i want to thank you for your grate contribution Discount coupon code module. I already installed that. But im having problem passing discounted total to paypal 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.Posted Image 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 doesn't show discounted total. I tried installing different paypal IPNs and discount module versions. But still my problem same. If you have any idea how to fix this error please help me. i really appreciate 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)); }
  4. 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 some 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)); }
  5. 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. 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)); }
  6. amal2004

    Paypal and discount

    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)); }
  7. Hi 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)); }
  8. HII ALL Im looking to add large number of discount codes such a 5000. Should be able to use only once per order. I managed to fill up discount_coupons table using CSV using LOAD DATA function. As i need to apply these codes only for 1 product i have to exclude all other products from list. Once you excluded product from list "discount_coupons_to_products" table automatically fills with excluded product IDs along with Discount Coupon Code. My problem is how its possible to do this for large number coupon codes such a 5000. I have around 530 Products on my website. I have to exclude 529 products for each discount code of 5000. If anyone has idea how to do this please help me to fix my problem. Thank you
×
×
  • Create New...