Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Join Date
    Jan 2005
    Posts
    186
    Plugin Contributions
    0

    Default COD for only one shipper?

    I have had a lot of problems with USPS accepting bad checks on my COD packages so I only want to offer COD with UPS because I can specify "money order only". For now I have the USPS COD rate at $1000.00 just so people will not use it but that doesn't look very professional so I would like to eliminate the COD option for USPS completely. I am currently using version 1.2.6 live but I am also building a fresh site with 1.3.7 so a solution that would work for both would be great.

    Sincere thanks,
    Marc
    www.needlejig.com

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

    Default Re: COD for only one shipper?

    This can be done by editing the COD module:
    /includes/modules/payment/cod.php

    Find this code:
    PHP Code:
    // disable the module if the order only contains virtual products
          
    if ($this->enabled == true) {
            if (
    $order->content_type != 'physical') {
              
    $this->enabled false;
            }
          } 
    Change to this code:
    PHP Code:
    // turn off COD for USPS Shipping
            
    if (substr_count($_SESSION['shipping']['id'], 'ups') == 1) {
              
    $this->enabled false;
            }

    // disable the module if the order only contains virtual products
          
    if ($this->enabled == true) {
            if (
    $order->content_type != 'physical') {
              
    $this->enabled false;
            }
          } 
    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. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: COD for only one shipper?

    er ... might change ups to usps ...

    I was testing other things ...
    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. #4
    Join Date
    Jan 2005
    Posts
    186
    Plugin Contributions
    0

    Default Re: COD for only one shipper?

    Thanks Ajeh, It works perfect if I modify

    /includes/modules/payment/cod.php

    but if I try and use an override folder like

    /includes/modules/payment/custom/cod.php

    it does not work?

    Can you explain why? I would rather not have to modify the cod.php at every upgrade if I do not have to.

    Thanks again,
    Marc

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

    Default Re: COD for only one shipper?

    There are no overrides directories for the Shipping, Payment and Order Totals at this time ...

    We would have to start drinking if there were ... very very early in the day ...
    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. #6
    Join Date
    Jan 2005
    Posts
    186
    Plugin Contributions
    0

    Default Re: COD for only one shipper?

    Ok, I will just have to note those changes so that I can make them on any future upgrades. Thanks once again for all of your help.

    Marc

  7. #7
    Join Date
    Jan 2006
    Posts
    224
    Plugin Contributions
    0

    Default Re: COD for only one shipper?

    Hi, I am trying to do the same for table rate.

    But it does not seem to work.

    The code:


    // turn off COD for USPS Shipping
    if (substr_count($_SESSION['shipping']['id'], 'table') == 1) {
    $this->enabled = false;
    }


    is the 'shipping' and 'id' be as it is shown above or changed to something else? What is this 'id'?

  8. #8
    Join Date
    Jan 2006
    Posts
    224
    Plugin Contributions
    0

    Default Re: COD for only one shipper?

    any help on this? basically I want it such that if customer choose 'table' shipping, COD will not appear, so they have to pay by bank transfer etc.

    my exact codes are:
    ----------------------------------------------
    // turn off COD for table
    if (substr_count($_SESSION['shipping']['id'], 'table') == 1) {
    $this->enabled = false;
    }

    // disable the module if the order only contains virtual products
    if ($this->enabled == true) {
    if ($order->content_type != 'physical') {
    $this->enabled = false;
    }
    }
    }
    -----------------------------------------------

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

    Default Re: COD for only one shipper?

    The Table Rate has the $_SESSION['shipping']['id'] of table_table ... vs the USPS or UPS setting of usps_something and ups_something ...

    So you need to use:
    PHP Code:
    // turn off COD for Table Rate Shipping
            
    if (substr_count($_SESSION['shipping']['id'], 'table') == 2) {
              
    $this->enabled false;
            } 
    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!

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

    Default Re: COD for only one shipper?

    I'm sorry, I don't understand... I want enable cod only for "zone"
    where I see the number of shipping ?
    'shipping']['id'], 'table') == 2)

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Enable COD only for customers with Company
    By RaySpike in forum General Questions
    Replies: 1
    Last Post: 9 May 2009, 09:35 PM
  2. setting up Zen Cart for COD only
    By slamb in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 2 May 2009, 07:24 PM
  3. COD only for UPS not USPS?
    By reden in forum General Questions
    Replies: 1
    Last Post: 25 Jun 2008, 10:32 PM
  4. COD possible only for domestic orders?
    By Rotkale in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 8 Jan 2007, 11:07 AM
  5. COD only for domestic orders?
    By Rotkale in forum Addon Payment Modules
    Replies: 1
    Last Post: 3 Jan 2007, 05:19 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