Results 1 to 10 of 31

Hybrid View

  1. #1
    Join Date
    May 2006
    Posts
    102
    Plugin Contributions
    0

    Default freeoptions shipping method problem

    Hello
    how can I disable all shipping options when I turn on my freeoptions shipping method in the admin.
    time to time we offer shipping value and we want to shut down all other shipping methods automatically as soon as i turn on the "freeoptions shipping method"
    I can add some php code within the shipping method?

    Tanks

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

    Default Re: freeoptions shipping method problem

    What is the criteria of the Free shipping and is it for everyone or just a Zone when that criteria is met?
    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
    May 2006
    Posts
    102
    Plugin Contributions
    0

    Default Re: freeoptions shipping method problem

    Hello
    thanks for answering. I have several zones in my shop but i want only to one zone. if i do a campaign and activate freeoptions shipping method in the admin, and if its value is €90, all purchases over €90 show only the option free shipping.

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

    Default Re: freeoptions shipping method problem

    I have to admit that showing the Free Shipping Options freeoptions when the order is >= 90.00 and the customer is in the right Zone at the same time as the other shipping modules is way easier than trying to turn off all of the other shipping modules and only show this shipping module ...

    Advantage: customer can choose other methods to expedite the shipping and you do not have have to do a heck of a lot of rewritting of the other shipping modules ...

    What other shipping module(s) are you using?
    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!

  5. #5
    Join Date
    May 2006
    Posts
    102
    Plugin Contributions
    0

    Default Re: freeoptions shipping method problem

    shipping modules:
    flat
    flatClone
    PayPal
    flattransf
    freeoptions
    item
    storepickup

    I do not mind making changes shipping modules, i have made ​​many changes in payment modules. if i have the code so i can disconnect the modules...

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

    Default Re: freeoptions shipping method problem

    You need to make a Zone Definition and set the DEFINE for who is allowed the Free Shipping Options freeoptions and set it on that shipping module with the Total >= 90 ...

    Next, look at what the Zone Definition value is in the URL where you will see:
    zID=XX

    Now, say you wanted to customize the Flat Rate flat to turn off for this Zone Definition when the order is >= 90 ...

    You can add the code in RED to do this:
    Code:
          if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_FLAT_ZONE > 0) ) {
            $check_flag = false;
            $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_FLAT_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
            while (!$check->EOF) {
              if ($check->fields['zone_id'] < 1) {
                $check_flag = true;
                break;
              } elseif ($check->fields['zone_id'] == $order->delivery['zone_id']) {
                $check_flag = true;
                break;
              }
              $check->MoveNext();
            }
    
            if ($check_flag == false) {
              $this->enabled = false;
            }
          }
    
    // bof: turn off for over 90 and zone 92
          if ( ($this->enabled == true) ) {
            $check_flag = false;
            $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . 92 . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
            while (!$check->EOF) {
              if ($check->fields['zone_id'] < 1) {
                $check_flag = true;
                break;
              } elseif ($check->fields['zone_id'] == $order->delivery['zone_id']) {
                $check_flag = true;
                break;
              }
              $check->MoveNext();
            }
            if ($check_flag == true && ($order->info['total'] - $order->info['shipping_cost']) >= 90) {
              $this->enabled = false;
            }
          }
    // eof: turn off for over 90 and zone 92
    
        }
    
    // class methods
    Change the 92 to match your zID ...

    Then adapt that to your other shipping modules ...
    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!

 

 

Similar Threads

  1. Freeoptions shipping module
    By Svanis in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 22 Dec 2008, 01:49 AM
  2. Problem with adding shipping method
    By kenix in forum Built-in Shipping and Payment Modules
    Replies: 16
    Last Post: 10 Sep 2008, 07:51 PM
  3. Default Shipping Method Problem
    By toeyt in forum Bug Reports
    Replies: 9
    Last Post: 19 Dec 2007, 03:49 AM
  4. Problem with shipping method page
    By ross357 in forum General Questions
    Replies: 4
    Last Post: 25 Apr 2007, 02:58 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