Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Suspend Low Order Fee/Tax on items purchased with CCGV Vouchers


Recommended Posts

Posted

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?

Posted
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.....

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...