Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help hacking contribution


Recommended Posts

Hi,

 

I'd like to change the workings of the Order Total v1.2 contribution, but I have no idea how to do this. The contribution is set up to deduct a percentage of the total order amount. I'd like it to deduct a fixed amount, say $1.00, no matter what the total order amount is. How would I go about doing that?

 

I think this is the part of that contribution's code that needs to be altered, but I don't know how to do it.

 

 

function calculate_credit($amount) {

global $order, $customer_id, $payment;

$od_amount=0;

$od_pc = $this->percentage;

$do = false;

if ($amount > $this->minimum) {

$table = split("[,]" , MODULE_PAYMENT_DISC_TYPE);

for ($i = 0; $i < count($table); $i++) {

if ($payment == $table[$i]) $do = true;

}

 

Can anyone help. I have tried changing "percentage" to "amount", but it didn't work.

 

Thanks for your help in advance.

 

-zp

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