Page 1 of 3 123 LastLast
Results 1 to 10 of 30
  1. #1
    Join Date
    Feb 2010
    Location
    Italy/Poland
    Posts
    39
    Plugin Contributions
    0

    Default cod + shipping modules

    this is a similar request to
    "http://www.zen-cart.com/forum/showthread.php?t=148410&highlight=cash+delivery"

    We offer 4 shipping methods of which 2 are cods however when non cod shipping is chosen cod payment still shows, originating confusion and some little losses on every order.
    It seems quite easy to correct such behaviour in zencart but I do not even dream of making a change myself.
    (super unzenned)
    can you possibly help?
    thanks
    [FONT="Georgia"]"fatti non foste per viver come bruti, ma per seguir virtute e conoscenza" Dante Alighieri[/FONT]

  2. #2
    Join Date
    Feb 2010
    Location
    Italy/Poland
    Posts
    39
    Plugin Contributions
    0

    Default Re: cod + shipping modules

    Quote Originally Posted by Maria Claudia View Post
    this is a similar request to
    "http://www.zen-cart.com/forum/showthread.php?t=148410&highlight=cash+delivery"

    We offer 4 shipping methods of which 2 are cods however when non cod shipping is chosen cod payment still shows, originating confusion and some little losses on every order.
    It seems quite easy to correct such behaviour in zencart but I do not even dream of making a change myself.
    (super unzenned)
    can you possibly help?
    thanks
    Sorry, I forgot basic info Zen-cart 1.3.8a shipping modules are clones of table.php, multilanguage addon.
    No oher payment modules apart cod one since this site is a new one
    Thanks again for any help.
    [FONT="Georgia"]"fatti non foste per viver come bruti, ma per seguir virtute e conoscenza" Dante Alighieri[/FONT]

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

    Default Re: cod + shipping modules

    You could have the COD payment module check which shipping module is selected and disable it based on the results ...

    You can test the value with:
    $_SESSION['shipping']['id']

    Example, Flat Rate flat shipping module would be:
    flat_flat

    Item Rate item shipping module would be:
    item_item

    USPS Express Mail would be:
    usps_EXPRESS

    Customize the COD Payment Module:
    /includes/modules/payment/cod.php

    An example of disabling COD if Flat Rate flat shipping module is selected would be:
    Code:
          $this->enabled = ((MODULE_PAYMENT_COD_STATUS == 'True') ? true : false);
    
          // do not show COD when shipping is Flat Rate
          if ($_SESSION['shipping']['id'] == 'flat_flat') {
            $this->enabled = false;
          }
    
          if ((int)MODULE_PAYMENT_COD_ORDER_STATUS_ID > 0) {
            $this->order_status = MODULE_PAYMENT_COD_ORDER_STATUS_ID;
          }
    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
    Feb 2010
    Location
    Italy/Poland
    Posts
    39
    Plugin Contributions
    0

    Default Re: cod + shipping modules

    Thank for your answer.

    Actually my cod module says something different
    line 43
    HTML Code:
    // class methods
        function update_status() {
          global $order, $db;
    
          if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_COD_ZONE > 0) ) {
            $check_flag = false;
            $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_COD_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
            while (!$check->EOF) {
    supposing these are the lines you refer to.
    [FONT="Georgia"]"fatti non foste per viver come bruti, ma per seguir virtute e conoscenza" Dante Alighieri[/FONT]

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

    Default Re: cod + shipping modules

    Look in the top of the COD Payment at the
    function cod() {
    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
    Feb 2010
    Location
    Italy/Poland
    Posts
    39
    Plugin Contributions
    0

    Default Re: cod + shipping modules

    line 26
    HTML Code:
    // class constructor
        function cod() {
          global $order;
    
          $this->code = 'cod';
          $this->title = MODULE_PAYMENT_COD_TEXT_TITLE;
          $this->description = MODULE_PAYMENT_COD_TEXT_DESCRIPTION;
          $this->sort_order = MODULE_PAYMENT_COD_SORT_ORDER;
          $this->enabled = ((MODULE_PAYMENT_COD_STATUS == 'True') ? true : false);
    [FONT="Georgia"]"fatti non foste per viver come bruti, ma per seguir virtute e conoscenza" Dante Alighieri[/FONT]

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

    Default Re: cod + shipping modules

    And if you put the code that I posted in RED below the BLACK line that reads:
    Code:
          $this->enabled = ((MODULE_PAYMENT_COD_STATUS == 'True') ? true : false);
    and before the BLACK line that reads:
    Code:
          if ((int)MODULE_PAYMENT_COD_ORDER_STATUS_ID > 0) {
    Does it work?
    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!

  8. #8
    Join Date
    Feb 2010
    Location
    Italy/Poland
    Posts
    39
    Plugin Contributions
    0

    Default Re: cod + shipping modules

    i am gonna do it and let you. thank you.
    [FONT="Georgia"]"fatti non foste per viver come bruti, ma per seguir virtute e conoscenza" Dante Alighieri[/FONT]

  9. #9
    Join Date
    Feb 2010
    Location
    Italy/Poland
    Posts
    39
    Plugin Contributions
    0

    Default Re: cod + shipping modules

    I have modified as follows:
    HTML Code:
        // do not show COD when shipping is PP
          if ($_SESSION['shipping']['id'] == 'table1') {
            $this->enabled = false;
          }
    table1 is one of the two shipping methods non cod
    in checking out I had following:

    Sorry, we are not accepting payments from your region at this time.
    Please contact us for alternate arrangements.

    may be it is not working or I made a mistake here or somewhere else in admin setting ?
    [FONT="Georgia"]"fatti non foste per viver come bruti, ma per seguir virtute e conoscenza" Dante Alighieri[/FONT]

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

    Default Re: cod + shipping modules

    For a Table1 try using:
    table1_table1

    just like the examples ...
    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 1 of 3 123 LastLast

Similar Threads

  1. v151 Disbale COD with shipping
    By mpforum in forum Built-in Shipping and Payment Modules
    Replies: 6
    Last Post: 8 Jan 2014, 05:53 PM
  2. 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
  3. Free shipping to include COD fees?
    By dude_s in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 8
    Last Post: 27 Sep 2010, 07:21 PM
  4. COD With Free Shipping
    By ozonlinesales in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 25 Jul 2008, 08:49 PM
  5. COD but no Shipping
    By ALFO in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 22 Dec 2007, 05:43 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