Thread: disable cod

Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17
  1. #11
    Join Date
    Oct 2006
    Location
    Italy
    Posts
    634
    Plugin Contributions
    0

    Default Re: Changing shipping methods based on item weight??

    with this
    PHP Code:
    global $order;
    $chk_abc $order->customer['email_address'];
    if ( (
    $this->enabled == true) && ( $chk_abc != '[email protected]) ) $this->enabled false
    don't work (I see always cod payment)
    Last edited by Ajeh; 20 Oct 2011 at 04:53 PM.

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

    Default Re: disable cod

    Did you add this to the products table?
    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!]
    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. #13
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Changing shipping methods based on item weight??

    On the Payment Module for COD, you would add the the code in RED for:
    Code:
          if ((int)MODULE_PAYMENT_COD_ORDER_STATUS_ID > 0) {
            $this->order_status = MODULE_PAYMENT_COD_ORDER_STATUS_ID;
          }
    
          if (!IS_ADMIN_FLAG) {
            global $order;
            $chk_abc = $order->customer['email_address'];
            if ( ($this->enabled == true) && ( $chk_abc != '[email protected]' ) ) $this->enabled = false;
          }
    
          if (is_object($order)) $this->update_status();
    And only the email address for:
    will see the COD module ...
    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!]
    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!

  4. #14
    Join Date
    Oct 2006
    Location
    Italy
    Posts
    634
    Plugin Contributions
    0

    Default Re: disable cod

    PHP Code:
    if (!IS_ADMIN_FLAG) {
            global 
    $order;
            
    $chk_abc $order->customer['email_address'];
            if ( (
    $this->enabled == true) && ( $chk_abc == '[email protected]) ) $this->enabled false;
          } 
    so only my customer with email [email protected] don't will pay on cod!

    Thank you very much, Ajeh!

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

    Default Re: disable cod

    Yes if you use the == then if the email address *matches*, the COD module is turned OFF ...

    Try it with your email address on your test Customer account ...
    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!]
    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. #16
    Join Date
    Oct 2006
    Location
    Italy
    Posts
    634
    Plugin Contributions
    0

    Default Re: disable cod

    I've just try it, works great. So [email protected] will pay only with credit card or bank transfer!

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

    Default Re: disable cod

    Thanks for the update that this is now working 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!]
    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!

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Disable COD Payment
    By mdo82 in forum Built-in Shipping and Payment Modules
    Replies: 12
    Last Post: 18 Jun 2014, 01:18 PM
  2. v139h Disable COD When Customer Opts for USPS?
    By bi11i in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 17 Dec 2012, 12:04 PM
  3. v150 Need some Help in COD. COD fee depending on order price
    By bratsangels in forum Built-in Shipping and Payment Modules
    Replies: 20
    Last Post: 16 Sep 2012, 12:53 PM
  4. Cod
    By godspeed27 in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 25 Jun 2006, 05:28 AM

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