Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 26
  1. #11
    Join Date
    Apr 2011
    Posts
    80
    Plugin Contributions
    0

    Default Re: Shipping options question...

    Will do. Sometimes the simple way is the best way. Thanks a lot for your help.

  2. #12
    Join Date
    Apr 2011
    Posts
    80
    Plugin Contributions
    0

    Default Re: Shipping options question...

    After further review... It appears that when an item is added to the cart that does not qualify for Free Shipping, the entire weight of the cart is being used to calculate the shipping charge instead of just the items that are not free shipping. The weight shown on the cart shows only the non free shipping items but the cost is for the entire cart weight.

    I added a free shipping item to the cart and the free shipping option displayed. I then added a light weight item that should have invoked a First Class Mail option but it only came back with a Priority option signifying the total weight was passed for the calculation. I verified this by removing the Free Shipping item and the First Class option was then made available. Does this make sense? Thanks.

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

    Default Re: Shipping options question...

    You said you wanted the Free Shipping to show and the additional shipping modules to show for other methods of shipping ...

    Currently, this includes the full weight ...

    Are you saying on the Additional shipping methods that you want the weight removed for the US customers for the Free Shipping products?
    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: v1.5.5]
    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
    Apr 2011
    Posts
    80
    Plugin Contributions
    0

    Default Re: Shipping options question...

    many apologies. That is correct. I want to deliver the free shipping products as such regardless of the rest of the order. I should have stated that initially. Thank you.

  5. #15
    Join Date
    Dec 2010
    Posts
    44
    Plugin Contributions
    0

    Default Re: Shipping options question...

    hello all

    i have followed all steps and i could show the all shipping options in the shopping cart now, even if the cart only contain AWALYS FREE SHIPPING PRODUCT.

    but i could not make the shopping cart to calculate the actual weight. the shopping cart still shows weight = 0 for AWALYS FREE SHIPPING PRODUCT.

    i am using zen cart 1.5 now, is it something being modified for the new 1.5 version? thank you.

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

    Default Re: Shipping options question...

    What shipping modules do you have installed?

    Who is suppose to get Free Shipping when the products are marked as Always Free Shipping?

    Do you have weight set on all of your Products, both those marked Always Free Shipping and regular Products?
    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: v1.5.5]
    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!

  7. #17
    Join Date
    Dec 2010
    Posts
    44
    Plugin Contributions
    0

    Default Re: Shipping options question...

    hi ajeh,

    thank you for your reply.

    shipping modules used : perunitweight and zone
    all buyers are supposed to get free shipping for products with ALWAYS FREE SHIPPING, we provide free international shipping.

    yes we have set the weight for all products, including the ALWAYS FREE SHIPPING products.
    i have followed your #6 post and made the changes, i then tested with one of the ALWAYS FREE SHIPPING product, with weight set to 2lbs, when added to cart, the weight is still 0

    thank you.

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

    Default Re: Shipping options question...

    Make sure that you edit your shipping modules and have commented out the part that turns them off on Always Free Shipping ...

    Example: for Per Unit perweightunit you would have:
    Code:
        // disable only when entire cart is free shipping
    //    if (zen_get_shipping_enabled($this->code)) {
          $this->enabled = ((MODULE_SHIPPING_PERWEIGHTUNIT_STATUS == 'True') ? true : 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: v1.5.5]
    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!

  9. #19
    Join Date
    Dec 2010
    Posts
    44
    Plugin Contributions
    0

    Default Re: Shipping options question...

    yes this step has been done.
    and the shipping option is available for ALWAYS FREE SHIPPING product.

    the only problem is the weight problem, the weight is still 0 when the ALWAYS FREE SHIPPING product added to the cart, i confirmed that the weight is set to 2 for that product. but the cart shown 0 weight.

  10. #20
    Join Date
    Dec 2010
    Posts
    44
    Plugin Contributions
    0

    Default Re: Shipping options question...

    i am using zen cart 1.5 and as you said in #6 post,
    Next, you need to customize the code in:
    /includes/classes/shipping.php

    and around line 65 change the code:
    Code:
    // bof: add back in the Free Shipping Weight
        global $order, $cart;
          $total_weight += $_SESSION['cart']->free_shipping_weight();
    // eof: add back in the Free Shipping Weight
    but for my shipping.php, it's at line 133

    i will post the full code below
    /includes/classes/shipping.php

    PHP Code:
    <?php

    /**

     * shipping class

     *

     * @package classes

     * @copyright Copyright 2003-2010 Zen Cart Development Team

     * @copyright Portions Copyright 2003 osCommerce

     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0

     * @version $Id: shipping.php 15880 2010-04-11 16:24:30Z wilt $

     */

    if (!defined('IS_ADMIN_FLAG')) {

      die(
    'Illegal Access');

    }

    /**

     * shipping class

     * Class used for interfacing with shipping modules

     *

     * @package classes

     */

    class shipping extends base {

      var 
    $modules;



      
    // class constructor

      
    function shipping($module '') {

        global 
    $PHP_SELF$messageStack;



        if (
    defined('MODULE_SHIPPING_INSTALLED') && zen_not_null(MODULE_SHIPPING_INSTALLED)) {

          
    $this->modules explode(';'MODULE_SHIPPING_INSTALLED);



          
    $include_modules = array();



          if ( (
    zen_not_null($module)) && (in_array(substr($module['id'], 0strpos($module['id'], '_')) . '.' substr($PHP_SELF, (strrpos($PHP_SELF'.')+1)), $this->modules)) ) {

            
    $include_modules[] = array('class' => substr($module['id'], 0strpos($module['id'], '_')), 'file' => substr($module['id'], 0strpos($module['id'], '_')) . '.' substr($PHP_SELF, (strrpos($PHP_SELF'.')+1)));

          } else {

            
    reset($this->modules);

            while (list(, 
    $value) = each($this->modules)) {

              
    $class substr($value0strrpos($value'.'));

              
    $include_modules[] = array('class' => $class'file' => $value);

            }

          }



          for (
    $i=0$n=sizeof($include_modules); $i<$n$i++) {

            
    //          include(DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/shipping/' . $include_modules[$i]['file']);

            
    $lang_file zen_get_file_directory(DIR_WS_LANGUAGES $_SESSION['language'] . '/modules/shipping/'$include_modules[$i]['file'], 'false');

            if (@
    file_exists($lang_file)) {

              include_once(
    $lang_file);

            } else {

              if (
    IS_ADMIN_FLAG === false && is_object($messageStack)) {

                
    $messageStack->add('checkout_shipping'WARNING_COULD_NOT_LOCATE_LANG_FILE $lang_file'caution');

              } else {

                
    $messageStack->add_session(WARNING_COULD_NOT_LOCATE_LANG_FILE $lang_file'caution');

              }

            }

            
    $this->enabled TRUE;

            
    $this->notify('NOTIFY_SHIPPING_MODULE_ENABLE'$include_modules[$i]['class']);

            if (
    $this->enabled)

            {

              include_once(
    DIR_WS_MODULES 'shipping/' $include_modules[$i]['file']);

              
    $GLOBALS[$include_modules[$i]['class']] = new $include_modules[$i]['class'];

            }

          }

        }

      }



      function 
    calculate_boxes_weight_and_tare() {

        global 
    $total_weight$shipping_weight$shipping_quoted$shipping_num_boxes;

    // bof: add back in the Free Shipping Weight
        
    global $order$cart;
          
    $total_weight += $_SESSION['cart']->free_shipping_weight();
    // eof: add back in the Free Shipping Weight

        
    if (is_array($this->modules)) {

          
    $shipping_quoted '';

          
    $shipping_num_boxes 1;

          
    $shipping_weight $total_weight;



          
    $za_tare_array preg_split("/[:,]/" SHIPPING_BOX_WEIGHT);

          
    $zc_tare_percent$za_tare_array[0];

          
    $zc_tare_weight$za_tare_array[1];



          
    $za_large_array preg_split("/[:,]/" SHIPPING_BOX_PADDING);

          
    $zc_large_percent$za_large_array[0];

          
    $zc_large_weight$za_large_array[1];



          
    // SHIPPING_BOX_WEIGHT = tare

          // SHIPPING_BOX_PADDING = Large Box % increase

          // SHIPPING_MAX_WEIGHT = Largest package



          /*

          if (SHIPPING_BOX_WEIGHT >= $shipping_weight*SHIPPING_BOX_PADDING/100) {

            $shipping_weight = $shipping_weight+SHIPPING_BOX_WEIGHT;

          } else {

            $shipping_weight = $shipping_weight + ($shipping_weight*SHIPPING_BOX_PADDING/100);

          }

          */



          
    switch (true) {

            
    // large box add padding

            
    case(SHIPPING_MAX_WEIGHT <= $shipping_weight):

              
    $shipping_weight $shipping_weight + ($shipping_weight*($zc_large_percent/100)) + $zc_large_weight;

              break;

            default:

            
    // add tare weight < large

              
    $shipping_weight $shipping_weight + ($shipping_weight*($zc_tare_percent/100)) + $zc_tare_weight;

              break;

          }



          if (
    $shipping_weight SHIPPING_MAX_WEIGHT) { // Split into many boxes

    //        $shipping_num_boxes = ceil($shipping_weight/SHIPPING_MAX_WEIGHT);

            
    $zc_boxes zen_round(($shipping_weight/SHIPPING_MAX_WEIGHT), 2);

            
    $shipping_num_boxes ceil($zc_boxes);

            
    $shipping_weight $shipping_weight/$shipping_num_boxes;

          }

        }

        
    $this->notify('NOTIFY_SHIPPING_MODULE_CALCULATE_BOXES_AND_TARE');

      }



      function 
    quote($method ''$module ''$calc_boxes_weight_tare true) {

        
    $quotes_array = array();



        if (
    $calc_boxes_weight_tare$this->calculate_boxes_weight_and_tare();



        if (
    is_array($this->modules)) {

          
    $include_quotes = array();



          
    reset($this->modules);

          while (list(, 
    $value) = each($this->modules)) {

            
    $class substr($value0strrpos($value'.'));

            if (
    zen_not_null($module)) {

              if ( (
    $module == $class) && ($GLOBALS[$class]->enabled) ) {

                
    $include_quotes[] = $class;

              }

            } elseif (
    $GLOBALS[$class]->enabled) {

              
    $include_quotes[] = $class;

            }

          }



          
    $size sizeof($include_quotes);

          for (
    $i=0$i<$size$i++) {

            
    $quotes $GLOBALS[$include_quotes[$i]]->quote($method);

            if (
    is_array($quotes)) $quotes_array[] = $quotes;

          }

        }

        
    $this->notify('NOTIFY_SHIPPING_MODULE_GET_ALL_QUOTES'$quotes_array);

        return 
    $quotes_array;

      }



      function 
    cheapest() {

        if (
    is_array($this->modules)) {

          
    $rates = array();



          
    reset($this->modules);

          while (list(, 
    $value) = each($this->modules)) {

            
    $class substr($value0strrpos($value'.'));

            if (
    $GLOBALS[$class]->enabled) {

              
    $quotes $GLOBALS[$class]->quotes;

              
    $size sizeof($quotes['methods']);

              for (
    $i=0$i<$size$i++) {

                
    //              if ($quotes['methods'][$i]['cost']) {

                
    if (isset($quotes['methods'][$i]['cost'])){

                  
    $rates[] = array('id' => $quotes['id'] . '_' $quotes['methods'][$i]['id'],

                                   
    'title' => $quotes['module'] . ' (' $quotes['methods'][$i]['title'] . ')',

                                   
    'cost' => $quotes['methods'][$i]['cost'],

                                   
    'module' => $quotes['id']

                  );

                }

              }

            }

          }



          
    $cheapest false;

          
    $size sizeof($rates);

          for (
    $i=0$i<$size$i++) {

            if (
    is_array($cheapest)) {

              
    // never quote storepickup as lowest - needs to be configured in shipping module

              
    if ($rates[$i]['cost'] < $cheapest['cost'] and $rates[$i]['module'] != 'storepickup') {

                
    $cheapest $rates[$i];

              }

            } else {

              if (
    $rates[$i]['module'] != 'storepickup') {

                
    $cheapest $rates[$i];

              }

            }

          }

          
    $this->notify('NOTIFY_SHIPPING_MODULE_CALCULATE_CHEAPEST'$cheapest);

          return 
    $cheapest;

        }

      }

    }

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Free Shipping Options Question
    By linnx in forum General Questions
    Replies: 8
    Last Post: 21 Apr 2011, 01:53 PM
  2. Another question about Shipping options
    By ttmb33 in forum Customization from the Admin
    Replies: 2
    Last Post: 27 Jan 2010, 06:24 PM
  3. Shipping options question
    By namanimal in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 26 Oct 2008, 07:49 AM
  4. Shipping Options Question
    By twistedsteel4x4 in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 23 Oct 2006, 06:13 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR