Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 2016
    Location
    Suffolk VA
    Posts
    590
    Plugin Contributions
    0

    Default Zone shipping for a single product

    I'm not certain I really understand what the zone shipping does, but what I need to do is set up zones which would all have the same shipping rate regardless of the address within the zone. I see how to add states to each of the three zones, and have done that. But I don't see how to apply zone shipping to a single specific product. Is that even possible?

  2. #2
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Zone shipping for a single product

    Quote Originally Posted by HeleneWallis View Post
    I'm not certain I really understand what the zone shipping does, but what I need to do is set up zones which would all have the same shipping rate regardless of the address within the zone. I see how to add states to each of the three zones, and have done that. But I don't see how to apply zone shipping to a single specific product. Is that even possible?
    Yes, it is possible, but not via any settings (that I'm aware of).

    Unless you are trying to prevent/allow specific products to specific zones, I'm not really sure what you are trying to achieve with this.

    If you could do what you are seeking, what would you expect the outcome to be if a customer in Zone 'x' adds two products to their cart, one product with zone 'y' rates and another with zone 'z' rates? Or am I misinterpreting what you are trying to achieve?

    Cheers
    RodG

  3. #3
    Join Date
    Jun 2016
    Location
    Suffolk VA
    Posts
    590
    Plugin Contributions
    0

    Default Re: Zone shipping for a single product

    Quote Originally Posted by RodG View Post
    If you could do what you are seeking, what would you expect the outcome to be if a customer in Zone 'x' adds two products to their cart, one product with zone 'y' rates and another with zone 'z' rates? Or am I misinterpreting what you are trying to achieve?
    What I hoped zone shipping would accomplish would be to allow zones and their rates to be associated with a product. In my case, I'd define three zones that would include all the states and the US territories. It wouldn't matter which product a customer chose, if that product had zone shipping, because the customer's shipping address would determine which zone was applied. Looks like that's not how it works. Oh well. Thanks anyway.

  4. #4
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Zone shipping for a single product

    Quote Originally Posted by HeleneWallis View Post
    Looks like that's not how it works. Oh well. Thanks anyway.
    Try this for size --- Lets assume that your store has 1000 products. Let us also assume that you have 4 shipping zones.

    If I am reading your needs correctly, this means that you will need to enter 4000 different prices for shipping. (1 price per product, per zone) - That is a lot of data entry, and since shipping rates tend to change every 6-12months, that is also a lot of maintenance.

    On the other hand, the standard zone rates module has options so that you can base the zone rates by weight, price, or per item basis. If you have 4 zones, you basically need to only enter 4 different prices. These 4 prices, in conjuction with the 'Weight, Price or Item' settings provide a means to provide *similar* results to what you are seeking, with a lot less effort and maintenance.

    Your proposed method has another shortcoming - if your shipping costs are based on the product, it means that your customers would never benefit from combined shipping. The costs will be purely additive. Some merchants prefer this, many others prefer to offer combined shipping to help increase sales. Customers prefer combined shipping.

    Furthermore - most shipping companies charge by weight - so this being the case, by using the 'by Weight' method in the std zones module (and giving your products accurate weights) will provide good quotes to all customers in all zones, no matter how many (or how heavy) the individual products weigh. No need for you to enter the theortetical 4000 different costs that would negate any combined shipping.

    So, please ask yourself again - is what you say you want *really* what you want, or are you just going to be making a lot of work for yourself with no real benefit? I suspect the latter.

    Cheers
    RodG

  5. #5
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Zone shipping for a single product

    Quote Originally Posted by HeleneWallis View Post
    What I hoped zone shipping would accomplish would be to allow zones and their rates to be associated with a product. In my case, I'd define three zones that would include all the states and the US territories. It wouldn't matter which product a customer chose, if that product had zone shipping, because the customer's shipping address would determine which zone was applied. Looks like that's not how it works. Oh well. Thanks anyway.
    As built and like RodG was saying, the code doesn't offer a specific application of a shipping module to a product, or any variation of that. But, it is built to support adding such code. Personally I was hoping that one of the below related links might offer the routine questions that are asked (but then RodG asked them ). One thing not really answered though is what is to happen if a purchase includes one of the products to be applied to the special zone rate as well as a product not normally to be provided that zone rate? Should the zone based shipping option be available to be applied against the entire order or should it not exist?

    Generally speaking in the quote section of the code is where some additional code could be added to disable a method if it doesn't meet desired conditions. In this case, it would be likely somewhere in this region that such code could be added:
    Code:
          for ($i=1; $i<=$this->num_zones; $i++) {
            $countries_table = constant('MODULE_SHIPPING_ZONES_COUNTRIES_' . $i);
            $countries_table = strtoupper(str_replace(' ', '', $countries_table));
            $country_zones = preg_split("/[,]/", $countries_table);
            if (in_array($dest_country, $country_zones)) {
              $dest_zone = $i;
              break;
            }
            if (in_array('00', $country_zones)) {
              $dest_zone = $i;
              break;
            }
          }
    BTW, if there are # symbols, ignore them/treat them like spaces. I copied the above code from github and sometimes spaces get replaced with # symbols when I do so.

    So in that region, it seems (and untested) that during the loop if the product in the $order variable (should be looped through as well) is not going to the applicable zone then the $dest_zone should be set to 0. This will cause the applicable zone rate to be disabled.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #6
    Join Date
    Jun 2016
    Location
    Suffolk VA
    Posts
    590
    Plugin Contributions
    0

    Default Re: Zone shipping for a single product

    As I said in the original question, I want to do this for only one product. So no great amount of maintenance would be needed. It would ship by USPS first class, since it's under 15 ounces. I could just do free shipping, but I don't want to increase the product price to cover the cost of shipping. People tend to look at the price and decide they don't want the product, without considering the fact that they aren't paying any shipping. I'm also dealing with the fact that they can get this product cheaper anyway, but they would have to order it direct from Australia and wait for it to be delivered. The benefit I can offer is that I'll be stocking it in the US and can have it in the mail the same day they order it.

    But it's clear the zone shipping isn't going to do what I want, so I'll leave things as they are for the moment.

    Thanks for the information.

    Quote Originally Posted by RodG View Post
    Try this for size --- Lets assume that your store has 1000 products. Let us also assume that you have 4 shipping zones.

    If I am reading your needs correctly, this means that you will need to enter 4000 different prices for shipping. (1 price per product, per zone) - That is a lot of data entry, and since shipping rates tend to change every 6-12months, that is also a lot of maintenance.

    On the other hand, the standard zone rates module has options so that you can base the zone rates by weight, price, or per item basis. If you have 4 zones, you basically need to only enter 4 different prices. These 4 prices, in conjuction with the 'Weight, Price or Item' settings provide a means to provide *similar* results to what you are seeking, with a lot less effort and maintenance.

    Your proposed method has another shortcoming - if your shipping costs are based on the product, it means that your customers would never benefit from combined shipping. The costs will be purely additive. Some merchants prefer this, many others prefer to offer combined shipping to help increase sales. Customers prefer combined shipping.

    Furthermore - most shipping companies charge by weight - so this being the case, by using the 'by Weight' method in the std zones module (and giving your products accurate weights) will provide good quotes to all customers in all zones, no matter how many (or how heavy) the individual products weigh. No need for you to enter the theortetical 4000 different costs that would negate any combined shipping.

    So, please ask yourself again - is what you say you want *really* what you want, or are you just going to be making a lot of work for yourself with no real benefit? I suspect the latter.

    Cheers
    RodG

  7. #7
    Join Date
    Jun 2016
    Location
    Suffolk VA
    Posts
    590
    Plugin Contributions
    0

    Default Re: Zone shipping for a single product

    You're right, of course, that a combined order would be a problem. The program would have to subtract the weight of any product that had zone shipping before talking to USPS or UPS or whoever was supplying the shipping costs. More complicated than I have time to deal with at the moment, for sure.

    A company that I deal with regularly on the west coast of the US actually does this, though. It's where I got the idea from. But they're big enough that they probably have their own IT department and a custom written shopping cart. I'll drop the idea for now, but may keep it in mind for the future.

    Quote Originally Posted by mc12345678 View Post
    As built and like RodG was saying, the code doesn't offer a specific application of a shipping module to a product, or any variation of that. But, it is built to support adding such code. Personally I was hoping that one of the below related links might offer the routine questions that are asked (but then RodG asked them ). One thing not really answered though is what is to happen if a purchase includes one of the products to be applied to the special zone rate as well as a product not normally to be provided that zone rate? Should the zone based shipping option be available to be applied against the entire order or should it not exist?

  8. #8
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Zone shipping for a single product

    Quote Originally Posted by mc12345678 View Post
    As built and like RodG was saying, the code doesn't offer a specific application of a shipping module to a product, or any variation of that. But, it is built to support adding such code. Personally I was hoping that one of the below related links might offer the routine questions that are asked (but then RodG asked them ). One thing not really answered though is what is to happen if a purchase includes one of the products to be applied to the special zone rate as well as a product not normally to be provided that zone rate? Should the zone based shipping option be available to be applied against the entire order or should it not exist?

    Generally speaking in the quote section of the code is where some additional code could be added to disable a method if it doesn't meet desired conditions. In this case, it would be likely somewhere in this region that such code could be added:
    Code:
          for ($i=1; $i<=$this->num_zones; $i++) {
            $countries_table = constant('MODULE_SHIPPING_ZONES_COUNTRIES_' . $i);
            $countries_table = strtoupper(str_replace(' ', '', $countries_table));
            $country_zones = preg_split("/[,]/", $countries_table);
            if (in_array($dest_country, $country_zones)) {
              $dest_zone = $i;
              break;
            }
            if (in_array('00', $country_zones)) {
              $dest_zone = $i;
              break;
            }
          }
    BTW, if there are # symbols, ignore them/treat them like spaces. I copied the above code from github and sometimes spaces get replaced with # symbols when I do so.

    So in that region, it seems (and untested) that during the loop if the product in the $order variable (should be looped through as well) is not going to the applicable zone then the $dest_zone should be set to 0. This will cause the applicable zone rate to be disabled.
    In that case:
    Code:
          for ($i=1; $i<=$this->num_zones; $i++) {
            $countries_table = constant('MODULE_SHIPPING_ZONES_COUNTRIES_' . $i);
            $countries_table = strtoupper(str_replace(' ', '', $countries_table));
            $country_zones = preg_split("/[,]/", $countries_table);
            $prod_present = false;
            foreach ($order->products as $prod_data) {
             if ($prod_data['id'] == 75) {
               $prod_present = true;
               break;
             }
           }
           if (!$prod_present) {
             $dest_zone = 0;
             continue;
           }
            if (in_array($dest_country, $country_zones)) {
              $dest_zone = $i;
              break;
            }
            if (in_array('00', $country_zones)) {
              $dest_zone = $i;
              break;
            }
          }
    Although untested, I think this would at least address being offered if the product is present in the cart. With a little mod it could be made to be inactive if there is anything else in the cart. As to some sort of "subtraction" the standard ZC shipping modules don't tend to offer a single purchase to be split across multiple shipping options. There are ways to adjust for various considerations and outside software for this type thing, but at least ZC gets one started with some sort of shipping option(s).
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  9. #9
    Join Date
    Jun 2016
    Location
    Suffolk VA
    Posts
    590
    Plugin Contributions
    0

    Default Re: Zone shipping for a single product

    Thanks, I'll keep this in mind for the future, and also for when I'm more competent with php than I am so far, lol. Once I don't have to spend every waking hour making the transition to the new shopping cart, I'll have time to do more with the software itself.

 

 

Similar Threads

  1. Create shipping cost for a single product?
    By Platinum Place in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 12 Jan 2011, 02:59 AM
  2. Special shipping option for single product
    By eirinikos in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 20 Feb 2009, 09:21 PM
  3. Multiple Tables for a Single Zone
    By mjpowers in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 13 May 2008, 01:30 PM
  4. Multiple ship-by-weight methods/tables for a single zone?
    By segnosaur in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 12 Nov 2007, 10:41 PM
  5. Secondary Table Rate For Single Zone
    By twitchtoo in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 27 Oct 2007, 06:31 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