Results 1 to 7 of 7
  1. #1
    Join Date
    Apr 2009
    Location
    London
    Posts
    124
    Plugin Contributions
    0

    Default disable/enable nochex payment mod based on amount?

    Dear All,

    I used the Paypal and nochex payment mod for my cart. I only have a seller account in Nochex therefore, I can only take a maximum of 100 per transaction. The mod itself do not have function such as enable/disable this mod when amount more/less than X.

    I am wondering if I can add a line of code somewhere to make this happen.

    Many many thanks for help in advance

    Gen

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: disable/enable nochex payment mod based on amount?

    I do not use this Payment Module, but you can try to disable it for orders > 100 by changing:
    Code:
        $this->enabled = ((MODULE_PAYMENT_NOCHEX_STATUS == 'True') ? true : false);
    to read:
    Code:
        $this->enabled = ((MODULE_PAYMENT_NOCHEX_STATUS == 'True') ? true : false);
        
        // bof: disable over 100
        if ($order->info['total'] > 100.00) {    
          $this->enabled = false;
        }
        // eof: disable over 100
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Apr 2009
    Location
    London
    Posts
    124
    Plugin Contributions
    0

    Default Re: disable/enable nochex payment mod based on amount?

    Many Many Thanks Ajeh,

    I will try this out now and come back shortly to share the outcome.

  4. #4
    Join Date
    Apr 2009
    Location
    London
    Posts
    124
    Plugin Contributions
    0

    Default Re: disable/enable nochex payment mod based on amount?

    My apologise. Can I just ask, would it be right to copy this code to nochex_apc.php which found under this directory - includes/modules/payment/nochex_apc.php ?

    Thanks again

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: disable/enable nochex payment mod based on amount?

    Yes, the Payment Modules are located in the:
    /includes/modules/payment

    I would save a copy of the original file on your computer, do not load a duplicate renamed copy on the server as it will produce errors ...

    Then add the change and see if that works properly for you ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  6. #6
    Join Date
    Apr 2009
    Location
    London
    Posts
    124
    Plugin Contributions
    0

    Default Re: disable/enable nochex payment mod based on amount?

    Wonderful!

    Here it is.

    edit includes/modules/payment/nochex_apc.php

    On Line 66, you will see the following code.

    PHP Code:
        $this->enabled = ((MODULE_PAYMENT_NOCHEX_STATUS == 'True') ? true false); 
    Insert the following code immediately after

    PHP Code:
        // bof: disable over 100
        
    if ($order->info['total'] > 100.00) {    
          
    $this->enabled false;
        }
        
    // eof: disable over 100 
    Work Perfect! All credit goes to Ajeh. Thank you

  7. #7
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: disable/enable nochex payment mod based on amount?

    Thanks for the update that this code customization was able to work for you ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 

Similar Threads

  1. Payment mod enable by language
    By doubletiger in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 7 Sep 2010, 03:20 AM
  2. Enable Flat Rate/Disable Zone over certain amount
    By mommyslilmonkey in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 21 May 2010, 08:50 AM
  3. how do I enable/disable a payment module based on order total?
    By amy351111 in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 23 Jul 2008, 10:28 AM
  4. Nochex payment mod
    By g3steve in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 11 Jan 2008, 06:54 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR