HI , after reading the forums for a solution to my clients request that any order over 150 GBP should have an automatic 10% discount , and not finding one , I attemted to write my own.

With only basic knowledge I got this to half work :- By changing the ot_total.php in the modules/order_toal directory with this bit of simple code :-

Code:
    function process() {
      global $order, $currencies;
      if ($order->info['total'] > 150) { 
      
      
       $this->title = 'Order Total less 10% Discount';
      
      
      $this->output[] = array('title' => $this->title . ':',
                              'text' => $currencies->format($order->info['total']-($order->info['total']*0.1), true, $order->info['currency'], $order->info['currency_value']),
                              'value' => ($order->info['total']-(($order->info['total'])*0.1)));
                              } else {
                              
      $this->output[] = array('title' => $this->title . ':',
                              'text' => $currencies->format($order->info['total'], true, $order->info['currency'], $order->info['currency_value']),
                              'value' => ($order->info['total']));
                              }
    }

This seemed to work when going through the checkout process until you pass the payment to worldpay , then it reverts to the original total before the discount.

Can anyone help with this ? as I have reached the limits of my programming knowledge !

Thanks all