Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Jan 2006
    Posts
    420
    Plugin Contributions
    0

    Default Order Total Discount - possible Solution

    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
    Various Zen cart sites !

  2. #2
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,511
    Plugin Contributions
    126

    Default Re: Order Total Discount - possible Solution

    Why don't you just use Quantity Discounts? It's already done.

    http://www.zen-cart.com/index.php?ma...roducts_id=235
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  3. #3
    Join Date
    Jan 2006
    Posts
    420
    Plugin Contributions
    0

    Default Re: Order Total Discount - possible Solution

    OK but thought that module was based on a order quantity . i.e when you have ordered 10 of something , rather than when your order reaches $150 get a total discount of 10%

    Im just installing your mod to see what it does !

    Thanks for the reply
    Various Zen cart sites !

  4. #4
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,511
    Plugin Contributions
    126

    Default Re: Order Total Discount - possible Solution

    It's not hard to go from number of items to dollars spent. PM me if you need help.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  5. #5
    Join Date
    Jan 2006
    Posts
    420
    Plugin Contributions
    0

    Default Re: Order Total Discount - possible Solution

    ah ok I see , Take your module and adapt it ! .... ok , a PM may come your way when I have had a few hours playing !

    Thanks

    MARK
    Various Zen cart sites !

 

 

Similar Threads

  1. Order Total - Newsletter Discount
    By decor in forum General Questions
    Replies: 4
    Last Post: 4 Aug 2011, 06:45 PM
  2. Discount on total order value
    By Laques2000 in forum Managing Customers and Orders
    Replies: 12
    Last Post: 23 Dec 2010, 04:26 AM
  3. Discount order total module
    By verybyte in forum Managing Customers and Orders
    Replies: 4
    Last Post: 21 Dec 2010, 10:44 AM
  4. Order sub-total discount?
    By FigurArt in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 2
    Last Post: 7 May 2009, 12:34 AM
  5. Discount by order total
    By judgelog in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 15 Feb 2008, 08:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg