mematrix Posted March 31, 2008 Posted March 31, 2008 Well, I'm not sure if this is the right forum or not but here's to hoping :D Anywho, I'm trying to code this referral system, where if a valid referer is selected, then the customer receives a 5% discount off the subtotal. Basically I figured setting in the checkout_confirmation.php page an isset along the lines of this: if (isset($order->info['rep']) && $order->info['rep'] > 0) { $order->info['subtotal'] = $order->info['subtotal'] * 0.95; } On the actual confirmation page, it displays the new value just fine. I also have it run in the checkout_process.php page, but for some reason, between processing it, and inserting the order into the DB, the lowered value is lost and the original subtotal is set. Any ideas as to what I'm doing wrong or how I would go about getting the effect I"m looking for? Thanks all :) Quote
Jack_mcs Posted March 31, 2008 Posted March 31, 2008 Changing the order like that isn't a simple process. Try installing the Easy Discount contribution. It will do what you want. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
mematrix Posted March 31, 2008 Author Posted March 31, 2008 Changing the order like that isn't a simple process. Try installing the Easy Discount contribution. It will do what you want. Jack Thanks, that worked pleasantly! :) Quote
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.
Note: Your post will require moderator approval before it will be visible.