Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 31
  1. #11
    Join Date
    May 2006
    Posts
    102
    Plugin Contributions
    0

    Default Re: freeoptions shipping method problem

    sorry but this is too much for me. I think I can not do this. Now is 5pm in Portugal (Europe) im going to try later but it will be difficult.
    Tanks You are OK

  2. #12
    Join Date
    May 2006
    Posts
    102
    Plugin Contributions
    0

    Default Re: freeoptions shipping method problem

    Quote Originally Posted by Ajeh View Post
    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 ...
    Hello. I try your code and works fine for one porpose. Tell me someting itīs not possible to install a code in the shipping modules to torn on and off the modules when freeoptions is on (only for one zone).

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

    Default Re: freeoptions shipping method problem

    Can you give a little more detailed example of what you are trying to do?
    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
    May 2006
    Posts
    102
    Plugin Contributions
    0

    Default Re: freeoptions shipping method problem

    Quote Originally Posted by Ajeh View Post
    Can you give a little more detailed example of what you are trying to do?
    ok
    for zone 1 i have shipping models:
    flat
    store pickup
    flattransf
    flatclone
    flatpaypal

    i turn on the module freeoptions ( with >=90 ) everything is on (flat, store pickup, flattransf, flatclone and flatpaypal) if the order is <90 if the order is >=90 only the module freeoptions is on, the others shipping modules disappear. This is only for one zone.

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

    Default Re: freeoptions shipping method problem

    That is how it is designed to work ... what is it you want to change?
    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
    May 2006
    Posts
    102
    Plugin Contributions
    0

    Default Re: freeoptions shipping method problem

    Quote Originally Posted by Ajeh View Post
    That is how it is designed to work ... what is it you want to change?
    if i install the code that you give me in all the shipping modules they go off if order >=90 (if i have module freeoptions).
    I want :
    wall modules work normal if module freeoptions is off even the order is <90 or >=90
    wall modules work normal if module freeoptions is on, but they go off if order >=90, only module freeoptions is on

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

    Default Re: freeoptions shipping method problem

    Currently, if the order is >= 90 and the Zone is correct, then all the shipping modules except Free Shipping Options freeoptions turn off ...

    But, if the Zone does not match, and the order is >= 90 all of the other shipping modules work, correct?

    Is the problem that you are trying to turn off this feature sometimes?
    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. #18
    Join Date
    May 2006
    Posts
    102
    Plugin Contributions
    0

    Default Re: freeoptions shipping method problem

    Quote Originally Posted by Ajeh View Post
    Currently, if the order is >= 90 and the Zone is correct, then all the shipping modules except Free Shipping Options freeoptions turn off ...

    But, if the Zone does not match, and the order is >= 90 all of the other shipping modules work, correct?

    Is the problem that you are trying to turn off this feature sometimes?
    Can the modules go on or off depending the shipping cost of freeoptions module?
    if i do >=500 the others modules go off, if i do >=40 the others modules go off, automatically they only go off depending of shipping cost of freeoptions module. the freeoptions module is always on

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

    Default Re: freeoptions shipping method problem

    You could do this ...

    Create a file called:
    /includes/languages/english/extra_definitions/extra_free_shipping_options.php

    and enter the code:
    Code:
    <?php
    $_SESSION['free_shipping_options_amount'] = 90;
    Change in the shipping modules the 90 to be:
    $_SESSION['free_shipping_options_amount']

    Now, when you want to use the Free Shipping Options with the 1 Zone, have the file:
    /includes/languages/english/extra_definitions/extra_free_shipping_options.php

    set to 90 ...

    When you do not want to use this, set it to 10000 ...

    Does this do what you are trying to do?
    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. #20
    Join Date
    May 2006
    Posts
    102
    Plugin Contributions
    0

    Default Re: freeoptions shipping method problem

    Quote Originally Posted by Ajeh View Post
    You could do this ...

    Create a file called:
    /includes/languages/english/extra_definitions/extra_free_shipping_options.php

    and enter the code:
    Code:
    <?php
    $_SESSION['free_shipping_options_amount'] = 90;
    Change in the shipping modules the 90 to be:
    $_SESSION['free_shipping_options_amount']

    Now, when you want to use the Free Shipping Options with the 1 Zone, have the file:
    /includes/languages/english/extra_definitions/extra_free_shipping_options.php

    set to 90 ...

    When you do not want to use this, set it to 10000 ...

    Does this do what you are trying to do?
    i have this
    if ( ($this->enabled == true) ) {
    $check_flag = false;
    $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . 6 . "' 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']) >= 700) {
    $this->enabled = false;
    }
    }
    change to this???
    if ( ($this->enabled == true) ) {
    $check_flag = false;
    $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . $_SESSION['free_shipping_options_amount'] . "' 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']) >= 700) {
    $this->enabled = false;
    }
    }

 

 
Page 2 of 4 FirstFirst 1234 LastLast

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