Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2005
    Posts
    151
    Plugin Contributions
    0

    Default Restrict shipping certain categories by zone?

    I have a client who sells miniature garden supplies: live plants, tiny gravels, miniature Adirondack chairs, etc. But they will not ship the live plants outside of the USA. Everything else they sell on the site they will ship worldwide. Is there a way to restrict shipping for specific categories by zone? Or is there some other way to prevent customers outside the allowed zone from buying certain items?

  2. #2
    Join Date
    Jul 2012
    Posts
    16,718
    Plugin Contributions
    17

    Default Re: Restrict shipping certain categories by zone?

    There are multiple ways to accomplish this. There are also many threads in here about it.

    First the question is how to handle orders that contain both items shippable and not shippable to an outside zone, the next to be develop something, use something that may already exist, or go commercial.

    The process to evaluate the situation is that within the applicable shipping method(s), generally during the process of the __construct function to identify if the cart contains a product in the selected criteria (category) and then in this case if the destination (zone) is outside the desired area to then set the enabled flag to false, otherwise set it to true for those methods that will support shipping. For other "methods" to reverse the true/false state. Ie. Ship item X with method 1, but all other items with method 2, then method 1 is enabled only when item X is only in the cart and method 2 is disabled if item X is in the cart. Result though is that if item X and any other item are present then no method is made available...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Jul 2012
    Posts
    16,718
    Plugin Contributions
    17

    Default Re: Restrict shipping certain categories by zone?

    Further in this case, could use the shopping cart class function get_products to return all of the items in the cart, then cycle through each of the items, if the function zen_product_in_category discovers the product is present in the associated category to then take the next action (unless desired to know how many/which product in the cart fail). This function will consider product that are in linked categories. Alternatively could evaluate the specific product against its master_category and see if the master_category_id matches the target category.

    Ie. Difference between the two. Let's assume the category accessed when adding the product was an outdoor category. Living plants are listed there, but so are garden hoses... Living plants are also found in a category called living plants and garden hoses are also found in say garden utensils... preventing the shipment of items in the outdoor category would prevent the garden hose from being shipped. Preventing living plants from being shipped would be the condition to be met to prevent sending living items.

    Using the master_category option, all living plants would have to be first assigned to the specific category and then if desired to be elsewhere linked to them. Whether the store displays the living plants category to customers is a separate issue. It's just that it is used to support filtering and operations.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. v139h Zone shipping - Can I disable purchase of certain items based on a shipping zone?
    By gsh68 in forum Built-in Shipping and Payment Modules
    Replies: 11
    Last Post: 7 Aug 2017, 07:05 PM
  2. v151 Can I restrict certain shipping modules for certain products?
    By gumboot in forum Built-in Shipping and Payment Modules
    Replies: 10
    Last Post: 13 Feb 2013, 05:26 AM
  3. Restrict the use of paypal for certain categories
    By mentose457 in forum PayPal Express Checkout support
    Replies: 6
    Last Post: 21 Mar 2011, 02:13 PM
  4. restrict shipping certain products to certain states?
    By airtime in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 18 Jan 2011, 05:11 AM
  5. Can I restrict checkout to certain categories?
    By jaxbakers in forum General Questions
    Replies: 1
    Last Post: 31 Dec 2008, 05:12 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