Page 4 of 6 FirstFirst ... 23456 LastLast
Results 31 to 40 of 60
  1. #31
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Shipping Module Programming Question

    This is a Free Shipping US Product
    /index.php?main_page=product_info&products_id=700

    If I add 1 of the 2oz to the cart I have First Class ...

    If I add 10 of the 2oz to the cart I DO NOT have First Class ...


    This is a Non-Free Shipping Product
    /index.php?main_page=product_info&products_id=555

    If I add 1 to the cart I have First Class ...

    If I add 10 to the cart I DO NOT have First Class ...


    If I add 1 of each to the Cart I have First Class ...

    If I add 1 Holiday and 2 White Quick Dry 2oz I have First Class ...

    If I add 1 Holiday and 4 White Quick Dry 2oz I DO NOT have First Class ...


    What do you think 0.08lbs is? If you want 8ounces, that is 0.5lbs ... weight is entered in pounds ...

    NOTE: 1 ounce = 0.0625 pounds

    Keep in mind All of the Products have weight ... it is hard to see the weight based on how you have things setup since the Weight showing in the Shopping Cart is not adjusted to show the true weight with the free_shipping_weight added in ...
    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!

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

    Default Re: Shipping Module Programming Question

    Everything works great except for whenever a non-Free Shipping item is added to the cart that has Free Shipping items already added, the shipping charge is then reflective of the entire cart weight. Is there a way to make the cart only charge shipping for the non Free Shipping items while not charging shipping for the Free Shipping items when combined in the cart. I was using the stencils as a test since they only weigh about an ounce and should have little impact on the cost to ship.
    Last edited by voltar; 28 Jul 2011 at 10:30 PM.

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

    Default Re: Shipping Module Programming Question

    I thought your goal was to have Free Shipping Options and the Normal shipping rates using the total weights on UPS and USPS ...

    Perhaps we are not speaking the same here ...

    Do you want the UPS and USPS to be the "normal shipping" rates for the all of the Products?

    EXAMPLE:
    When the Cart ONLY holds Always Free Shipping US Products ... should the US see UPS and USPS?

    If yes, then what are the weights based on?

    Right now, it is showing Free Shipping Options ONLY when the Cart is the US and all Products are Always Free Shipping and showing the Total charge for UPS and USPS based on the Weight of those 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. #34
    Join Date
    Apr 2011
    Posts
    80
    Plugin Contributions
    0

    Default Re: Shipping Module Programming Question

    My apologies for any confusion. I believe you have finally opened my eyes. If I don't add the cost of shipping back in when the customer selects a non Free Shipping item, that would potentially give the customer the opportunity to select overnight shipping for a cart full of Free Shipping products. Now I am totally confused as how to deal with Free Shipping and non Free Shipping. Again my apologies for my confused state.

  5. #35
    Join Date
    Apr 2011
    Posts
    80
    Plugin Contributions
    0

    Default Re: Shipping Module Programming Question

    Here is an option that probably won't work, but when a cart contains Free Ship and non Free Ship items would it be possible to calculate Priority Mail at the Free Ship item weight and the other options at the full cart weight? It would even work to drop all USPS options other than Priority Mail calculated at the Free Ship weight and let UPS calculate at the full cart weight.

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

    Default Re: Shipping Module Programming Question

    The quote for UPS and USPS for the US is either quote them all as the total weight or quote them all as the total weight less the Free Shipping weight ...

    Right now, they are being quoted for the US with the Free Shipping weight added back in ...

    If the US quotes were quoted where the shipping quotes for the UPS and USPS only included the weight for the non-Free shipping products would that work?

    Meaning a 1.5lb Free Shipping item and a 2lb non-Free Shipping Product would be quoted for a 2lb shipping rate quote with UPS and USPS ...

    NOTE: that would mean an totally Free Shipping cart would only quote the Free Shipping Option with no UPS or USPS options ...
    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. #37
    Join Date
    Apr 2011
    Posts
    80
    Plugin Contributions
    0

    Default Re: Shipping Module Programming Question

    The deeper I have gotten into this the muckier it seems to get. The overall goal here was to be able to offer certain products with free US shipping and not international. The problem that I can't seem to get my arms around is if a customer places a large number of Free Shipping items in the cart and than adds a small non-Free Shipping item, they could then select express shipping based on the single non-Free Shipping weight. The concept of Free Shipping is generally the vendor select the most cost effective mean.

    Meaning 25lbs of Free Shipping items and a 1lb non-Free Shipping item in the cart would display all shipping options thereby giving the customer the option to select overnight shipping on the order based on 1lb and that is a recipe for losing money quick or make the customer angry.

    I suppose it may be hopeless without major revisions to analyze the status of the cart items, Free vs Non-Free, and offer a single low shipping option, say Priority Mail, and list all other options to include the entire cart weight. It seems so easy for Amazon.

    Keeping shipping cost low these days is so important to internet sales but trying to help the customer while not killing your small business is also like walking a tightrope.

    Any ideas would be much appreciated.

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

    Default Re: Shipping Module Programming Question

    Let me think about it for awhile ... I have done something like that before ... I think ...
    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. #39
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Shipping Module Programming Question

    Okay let's try this one ...

    REMOVE the Free Shipping Options freeoptions ...

    INSTALL the FREE SHIPPING freeshipper and set the Zone to the US Only ...

    Change the shipping class file:
    /includes/classes/shipping.php

    to read:
    Code:
      function calculate_boxes_weight_and_tare() {
        global $total_weight, $shipping_weight, $shipping_quoted, $shipping_num_boxes;
    
    // Add in Free Weight for anyone not in 1 zone
    // bof: allow 1 zone only for Always Free Shipping
        global $db, $order, $cart;
            $valid_zone_id = 21;
            $check_flag = false;
            $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . $valid_zone_id . "' 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) {
              $total_weight += $_SESSION['cart']->free_shipping_weight;
            }
    // bof: allow 1 zone only for Always Free Shipping
    
        if (is_array($this->modules)) {
    Change the UPS file:
    /includes/modules/shipping/ups.php
    Code:
        // disable only when entire cart is free shipping
    //    if (zen_get_shipping_enabled($this->code)) {
          $this->enabled = ((MODULE_SHIPPING_UPS_STATUS == 'True') ? true : false);
    //    }
    
        if ($this->enabled) {
          // check MODULE_SHIPPING_UPS_HANDLING_METHOD is in
          $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_UPS_HANDLING_METHOD'");
          if ($check_query->EOF) {
            $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Handling Per Order or Per Box', 'MODULE_SHIPPING_UPS_HANDLING_METHOD', 'Box', 'Do you want to charge Handling Fee Per Order or Per Box?', '6', '0', 'zen_cfg_select_option(array(\'Order\', \'Box\'), ', now())");
          }
        }
    
    // bof: turn off if zone 1 and weight is 0
    if (!IS_ADMIN_FLAG) {
        global $db, $order, $cart;
    
            $chk_weight = round($_SESSION['cart']->show_weight(),9);
            $chk_free_weight = round($_SESSION['cart']->free_shipping_weight, 9);
    
            $valid_zone_id = 21;
            $check_flag = false;
            $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . $valid_zone_id . "' 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 && $chk_weight == 0) {
              $this->enabled = false;
            } else {
              $this->enabled = true;
            }
    //    echo '<BR>USPS shipping class delivery: ' . 'chk_weight: ' . $chk_weight . ' chk_free_weight: ' . $chk_free_weight . '<br>checkflag: ' . $check_flag .  '<br> shipping: ' . $order->delivery['country']['id'] . ' state: ' . $order->delivery['state'] . ' zone: ' . $order->delivery['zone']['id'] . '<br><br>';
    }
    // eof: turn off if zone 1 and weight is 0
    
        if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_UPS_ZONE > 0) ) {
    Change the USPS shipping module:
    /includes/modules/shipping/usps.php
    Code:
        // disable only when entire cart is free shipping
    //    if (zen_get_shipping_enabled($this->code)) {
          $this->enabled = ((MODULE_SHIPPING_USPS_STATUS == 'True') ? true : false);
    //    }
    
        if ($this->enabled) {
          // check MODULE_SHIPPING_USPS_HANDLING_METHOD is in
          $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_USPS_HANDLING_METHOD'");
          if ($check_query->EOF) {
            $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Handling Per Order or Per Box', 'MODULE_SHIPPING_USPS_HANDLING_METHOD', 'Box', 'Do you want to charge Handling Fee Per Order or Per Box?', '6', '0', 'zen_cfg_select_option(array(\'Order\', \'Box\'), ', now())");
          }
        }
    
    // bof: turn off if zone 1 and weight is 0
    if (!IS_ADMIN_FLAG) {
        global $db, $order, $cart;
    
            $chk_weight = round($_SESSION['cart']->show_weight(),9);
            $chk_free_weight = round($_SESSION['cart']->free_shipping_weight, 9);
    
            $valid_zone_id = 21;
            $check_flag = false;
            $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . $valid_zone_id . "' 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 && $chk_weight == 0) {
              $this->enabled = false;
            } else {
              $this->enabled = true;
            }
    //    echo '<BR>USPS shipping class delivery: ' . 'chk_weight: ' . $chk_weight . ' chk_free_weight: ' . $chk_free_weight . '<br>checkflag: ' . $check_flag .  '<br> shipping: ' . $order->delivery['country']['id'] . ' state: ' . $order->delivery['state'] . ' zone: ' . $order->delivery['zone']['id'] . '<br><br>';
    }
    // eof: turn off if zone 1 and weight is 0
    
        if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_USPS_ZONE > 0) ) {
    Now see if a Cart of just Free US Products Only shows the FREE SHIPPING free shipper for the US and shows the UPS and USPS for the International ...

    A Cart of Non-Free Shipping Products the US sees UPS and USPS and shows the UPS and USPS for the International ...

    And a mixed cart for the US shows the UPS and USPS for only the weight that is not part of the Free Shipping Products and the International UPS and USPS shows the full weight of the Free Shipping Products plus the Non-Free 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!

  10. #40
    Join Date
    Apr 2011
    Posts
    80
    Plugin Contributions
    0

    Default Re: Shipping Module Programming Question

    Thank you so much for your assistance and guidance. Here's my dilemma, if I only give the customer the Free Shipping option with cart full of Free Shipping items, that prevents them from selecting a faster shipping option if they were to be in desperate need.

    Next, with a mixed cart of Free Shipping and non Free Shipping items only displaying the shipping cost based on the weight of the non Free Shipping items creates a situation where the customer could theoretically have a cart full of Free Shipping items and then add a single non-Free Shipping items and the full array of shipping options would be displayed using only the weight of the single non-Free Shipping item. As long as the customer chose a reasonable option that would be fine but considering they would be able to select overnight shipping based only on the weight of the single item, who could blame them.

    The modifications you have created are perfectly implemented except for this one situation. Thank you again for your unbelievable patience and expertise.

 

 
Page 4 of 6 FirstFirst ... 23456 LastLast

Similar Threads

  1. upgrade question about Payment and shipping module: notice
    By icikite in forum Upgrading to 1.5.x
    Replies: 1
    Last Post: 20 Jan 2013, 11:08 PM
  2. Replies: 14
    Last Post: 11 Jun 2012, 05:39 AM
  3. Replies: 2
    Last Post: 8 Jul 2010, 09:46 PM
  4. Free shipping item weight calculated wrongly for non valid free shipping zone
    By firehorse in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 28 Oct 2006, 05:39 PM
  5. Question about COD Fee and DHL Shipping module
    By rkeppert in forum Addon Shipping Modules
    Replies: 7
    Last Post: 2 Sep 2006, 01:36 AM

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