Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Payment option based on order value and shipping method


Guest

Recommended Posts

I have an usual problem in that we have may customers who select payment on delivery as their chosen payment method.

The problem I have is that if this method is selected I MUST use a certain carrier which is expensive.

This is not usually an issue if it is a high value item however we have a scenario cropping up that I want to avoid - someone buying a low value item, selecting payment on delivery, then selecting the cheapest delivery method that I cannot use. The result is that it must be sent via a courier at high cost to me.

 

Is there a way of removing a payment method based upon 1) the value and 2) the chosen shipping method?

Link to comment
Share on other sites

I think I may have almost solved my own problem but have hit upon a glitch along the way.

 

I have the COD (Cash on delivery) module installed and this works fine - it is therefore this module that I would like to amend to produce the results I want however it doesn't seem to work.

 

Within the code there is the option to disable the method if the order is for a virtual product:

 

if ($this->enabled == true) {

if ($order->content_type == 'virtual') {

$this->enabled = false;

}

}

 

My thought then was to add the following:

 

 

if ($this->enabled == true) {

if ($order->total <25) {

$this->enabled = false;

}

}

 

Where the value 25 is the order value at which the option becomes available.

 

the problem is that this merely has the effect of disabling the module all together regardless of the order total.

 

 

Any ideas anyone??

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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