Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Daria

Archived
  • Posts

    46
  • Joined

  • Last visited

Everything posted by Daria

  1. Hi, all! we use Price Sensitive Discount module to calculate discount based on order total (spend $100, get 10% off, spend 200% get 25% off). Price Sensitive Discount Here is the issue we have encountered: The discount model worked inside the store, applying the discount, saving discounted info in the database, then confirming discounted order via email to the store owner and the customer. However, the store owner's payment gateway was receiving the full, pre-discount amount for the order, and customer's credit card was charged at full, pre-discounted amount. PROBLEM WE FOUND: It turned out that our (older) version of osCommerce had an incorrect order of events inside checkout_process.php file. We have moved $payment_modules->before_process(); line to be placed below $order_totals = $order_total_modules->process(); You can see more of the visual aid here: (actual code does not have an indent, but I placed an indent here for you to make original position and new new position stand out for you). // load selected payment module require(DIR_WS_CLASSES . 'payment.php'); $payment_modules = new payment($payment); // load the selected shipping module require(DIR_WS_CLASSES . 'shipping.php'); $shipping_modules = new shipping($shipping); require(DIR_WS_CLASSES . 'order.php'); $order = new order; // load the before_process function from the payment modules $payment_modules->before_process(); require(DIR_WS_CLASSES . 'order_total.php'); $order_total_modules = new order_total; $order_totals = $order_total_modules->process(); Here is what we did. In our catalog/checkout_process.php file, we found the following code (for us it was immediately after comment line // load selected payment module SOLUTION // load selected payment module require(DIR_WS_CLASSES . 'payment.php'); $payment_modules = new payment($payment); // load the selected shipping module require(DIR_WS_CLASSES . 'shipping.php'); $shipping_modules = new shipping($shipping); require(DIR_WS_CLASSES . 'order.php'); $order = new order; require(DIR_WS_CLASSES . 'order_total.php'); $order_total_modules = new order_total; $order_totals = $order_total_modules->process(); // load the before_process function from the payment modules $payment_modules->before_process(); So now it runs the payment process after applying the discount. If you have a similar issue, you may want to use similar approach (of course, always backing up your original file first). Good luck! D.
  2. I had many different errors on the way to having the store working... What in the end worked for me: A ) My original problem was not getting the order through - after submitting the confirmation page I would get kicked back to login page. What resolved it installing the new Authorize.Net AIM module, then, afer exausting all options in this thread: http://www.oscommerce.com/forums/index.php?showtopic=208800 and then this thread: http://www.oscommerce.com/forums/index.php?showtopic=199381 B ) order started getting through but I was getting the Credit Card error. I have couple of oscommerce stores on couple of domains; one of them uses Authorize.net. in the authorize.net built-in module, I have a USER LOGIN in the login field, and then Transaction Key, working successfully. However, this time around with a AIM mode from the topics above, I kept getting an error in credit card processing. I put the API Login ID instead of the User Login, and it worked. -------------------------
  3. I had many different errors on the way to having the store working... What in the end worked for me: A) My original problem was not getting the order through - after submitting the confirmation page I would get kicked back to login page. What resolved it installing the new Authorize.Net AIM module, then, afer exausting all options in this thread: http://www.oscommerce.com/forums/index.php?showtopic=208800 and then this thread: http://www.oscommerce.com/forums/index.php?showtopic=199381 B) order started getting through but I was getting the Credit Card error. I have couple of oscommerce stores on couple of domains; one of them uses Authorize.net. in the authorize.net built-in module, I have a USER LOGIN in the login field, and then Transaction Key, working successfully. However, this time around with a AIM mode from the topics above, I kept getting an error in credit card processing. I put the API Login ID instead of the User Login, and it worked. -------------------------
  4. THANK YOU THANK YOU!!! that worked for me!
  5. It's an old thread byt people still look for answers to this question, apparently, as I did. I am using OSMax2 version, and had the same problem, with of my services curl, etc. enabled. I was not able to get beyond confirmation stage, getting an error "There has been an error processing your credit card, please try again : Could not execute curl" However, overwriting the lpphp.php file with the one suggested by 50mb in reply of Sep 8 2004, 11:20 AM has worked for me, checkout process is now complete! Thanks! :thumbsup:
×
×
  • Create New...