Results 1 to 8 of 8
  1. #1
    Join Date
    Feb 2010
    Posts
    159
    Plugin Contributions
    0

    Default Restrict some items to usa only

    I sell cigar humidors and ship to US and Canada. I would like to add cigars to my site, but due to restrictions would only be able to ship to US. I use UPS for all shipping. So can I set up to sell humidors to both US and Canada and cigars only to US?
    Thank you for helping.

  2. #2
    Join Date
    Feb 2010
    Posts
    159
    Plugin Contributions
    0

    Default Re: Restrict some items to usa only

    Sorry maybe I should ask this differently. Can I ship products from categories 1-6 to USA and Canada, but ship from category 7 only to USA?

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

    Default Re: Restrict some items to usa only

    You would need some customization to test what is in the cart and the shipping address and then decide how you want it handled when someone goes to checkout and changes their shipping address to Canada and has Products from categories_id 7 in the cart ....

    This can be done ... but it does take some customization to the code to manage this for the customer so that they do not get confused ...
    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. #4
    Join Date
    Feb 2010
    Posts
    159
    Plugin Contributions
    0

    Default Re: Restrict some items to usa only

    Thank you for your help. I would state clearly on the cigar (category 7) page that cigars ship to us only!! But I'm sure some will add to cart anyway. Any idea as where to start looking?
    add somewhere something like-- if category 7 ship to us only--???
    been searching and trying to learn at same time.
    Thanks again

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

    Default Re: Restrict some items to usa only

    The adding to cart will not matter ...

    The testing of the cart on the checkout_shipping would prevent the checkout ...

    This is where the customized coding comes in ...

    This can be tested against the master_categories_id being the test using this function from the shopping_cart class:
    Code:
      /**
       * Method to calculate the number of items in a cart based on an abitrary property
       *
       * $check_what is the fieldname example: 'products_is_free'
       * $check_value is the value being tested for - default is 1
       * Syntax: $_SESSION['cart']->in_cart_check('product_is_free','1');
       *
       * @param string product field to check
       * @param mixed value to check for
       * @return integer number of items matching restraint
       */
      function in_cart_check($check_what, $check_value='1') {
    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. #6
    Join Date
    Feb 2010
    Posts
    159
    Plugin Contributions
    0

    Default Re: Restrict some items to usa only

    Thanks again, trying to understand. Cigar category is 37. would test check category_id 37 and country_id CA return 0???
    Sorry to be such a novice

  7. #7
    Join Date
    Feb 2010
    Posts
    159
    Plugin Contributions
    0

    Default Re: Restrict some items to usa only

    If it makes any difference I use paypal and googlecheckout as only payment options.

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

    Default Re: Restrict some items to usa only

    No ... you need to test for what is in the cart and what the shipping address is ...

    This takes some custom code to manage this for you ...

    $chk_cat_37 = $_SESSION['cart']->in_cart_check('master_categories_id','37');

    will give you the number of products that are from Category with categories_id 37 ...

    Then you have to test the shipping address on the order to see if the address is US or somewhere else ...

    Then, you have to decide what to do if the shopping cart has products from categories_id 37 and the shipping address is not the US ...
    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!

 

 

Similar Threads

  1. v151 Allow Public Purchase of Some Items. Restrict All Others to Account holders
    By clausont in forum Managing Customers and Orders
    Replies: 1
    Last Post: 27 Dec 2012, 10:43 PM
  2. Restrict non-USA sales (Shipping)
    By jcbays in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 10 Mar 2011, 07:00 AM
  3. I want to offer some products with free shipping but only for customers in USA
    By rmlawdad1 in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 24 Jan 2010, 05:24 AM
  4. Free Shipping on Some items only in some states
    By aarosso in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 11 Nov 2009, 05:00 AM
  5. Making some products free shipping for USA only
    By Crunch in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 9 Mar 2009, 03:44 PM

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