Guest Posted March 13, 2006 Posted March 13, 2006 Hi, I operate a store selling very cheap products which uses Paypal as a backend. When someone buys just one product, the Paypal fee cuts into the margin, so I'd like to have customers buy CCGV vouchers for 5 products instead of just buying 1 product at a time. I'm thinking the best way to do this is to charge a Low Order Fee or a Tax on all products, but suspend this on products purchased with a voucher. Has anyone set up a shop where the Low Order Fee or Tax is suspended when the customer purchases with a voucher? Quote
Guest Posted March 13, 2006 Posted March 13, 2006 Hi, I operate a store selling very cheap products which uses Paypal as a backend. When someone buys just one product, the Paypal fee cuts into the margin, so I'd like to have customers buy CCGV vouchers for 5 products instead of just buying 1 product at a time. I'm thinking the best way to do this is to charge a Low Order Fee or a Tax on all products, but suspend this on products purchased with a voucher. Has anyone set up a shop where the Low Order Fee or Tax is suspended when the customer purchases with a voucher? This is fairly tricky. I've been having a go at modifying the ot_loworderfee.php code, but there are so many ramifications. Anyway, an alternative and easier solution might be to only allow Paypal when purchasing a Voucher i.e. if a customer trys to buy a product other than a Voucher they don't have a payment option. Then, when they have purchased a Voucher using Paypal, they will have the Voucher option of payment when they try to buy a product other than a Voucher. (note: The Paypal module should be globaly enabled first) You can do this by editing includes/module/payment/paypal.php add this inside 'function paypal()' ________________________________________________________________________________ ________ if ($PHP_SELF == DIR_FS_CATALOG . 'checkout_payment.php' || $PHP_SELF == DIR_FS_CATALOG . 'checkout_confirmation.php' || $PHP_SELF == DIR_FS_CATALOG . 'checkout_process.php') { $products = $cart->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { if ($products[$i]['id'] != 36 && $n == 1) { $this->enabled = false; break; } else { $this->enabled = true; break; } } } ________________________________________________________________________________ ________ You also need to add $cart to global $order; so you have 'global $order, $cart;' '36' is the id of my Voucher product; change this to suit your needs. Obviously, you should also edit your TAGS to explain to customers what's going on..... 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.