Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2007
    Posts
    53
    Plugin Contributions
    0

    Default Can I disable some products depending on country?

    I am setting up a shop to sell in several countries. However, not all products will be available in all countries - is there a way to limit the display of products or even whole categories depending on the country selected?

    thanks

  2. #2
    Join Date
    May 2005
    Location
    Bath, Somerset
    Posts
    1,053
    Plugin Contributions
    3

    Default Re: Can I disable some products depending on country?

    This isn't something which is included with Zen as a standard, however, you could certainly add the code to your store. Would you be looking to disable the products depending on which address? You could use either the shipping address, the billing address or a geo-location function on the IP of your customer. Obviously, if you use the delivery or billing addresses, all products would need to be active when the customer is browsing, and only limit the products on checkout.

    There is a function within includes/functions/general.php, which is zen_get_products_status(), which you may be able to adjust to suit your needs.

    The final thing to consider is that the product listing pages just list products with a products status of 1, so there may be a few SQL statements to adjust.

    One solution may be to add a new table, with Zone to Product relationships, where you can then set these up in the admin, and adjust the store side SQL statements. Depending on the way in which you want to restrict the products will affect which method of restriction is right for you in the end.

    Good luck,

    Absolute

  3. #3
    Join Date
    Mar 2007
    Posts
    53
    Plugin Contributions
    0

    Default Re: Can I disable some products depending on country?

    Thanks for that - I shall check out the modules you suggest.

    What I was wondering was whether to key it off the language selected rather than the actual customer details. Presumably zencart 'knows' which language it is using at the moment; then if I set an extra flag on the product/category with the key of the appropriate language (or 0 for all, say)?

    I can see it's not going to be an easy one though....

  4. #4
    Join Date
    May 2005
    Location
    Bath, Somerset
    Posts
    1,053
    Plugin Contributions
    3

    Default Re: Can I disable some products depending on country?

    The problem with language is it won't trully limit the products to countries. For example, in you want to stop customers buying a product in Canada, you would need to disable English and French. This would then disable the product for most of the world.

    You can perform Geo-Positioning checks on user's IP addresses, which will then tell you roughly where a customer is. The only time this causes a slight problem is with some Proxy servers.

    Absolute

  5. #5
    Join Date
    May 2008
    Posts
    13
    Plugin Contributions
    0

    Default Re: Can I disable some products depending on country?

    Quote Originally Posted by jmouse View Post
    I am setting up a shop to sell in several countries. However, not all products will be available in all countries - is there a way to limit the display of products or even whole categories depending on the country selected?

    thanks

    jmouse,

    may i know if you already found the solution to the given scenario? i'm facing the same problem now..

  6. #6
    Join Date
    Jan 2010
    Location
    Switzerland
    Posts
    19
    Plugin Contributions
    0

    Default Re: Can I disable some products depending on country?

    I personally don't like automatic country detection at all.
    Why not use language selection to select countries?

    Canada: en_can or fr_can
    USA: en_us
    Germany: de_ger, en_ger
    Switzerland: de_ch, fr_ch, it_ch, en_ch
    Rest of the world: en_row

    Without a special hack, there would then be English language files for each country. And flags would not work well. Should be a dropdown selection.

    It would be more convenient to be able to choose the country independently from the language, of course. There's always the alternative to have several shops. If products are managed in an external database, products can be managed in one place for all shops.

    Just a few ideas.

    Cheers, Ralf.

 

 

Similar Threads

  1. Restricting supply of some products to one country
    By frank18 in forum Managing Customers and Orders
    Replies: 10
    Last Post: 27 Jan 2010, 01:00 AM
  2. How can I disable the "Larger Image" link on SOME products?
    By btolly in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 19 Aug 2009, 02:39 PM
  3. Can I disable left column on some product pages?
    By KiwiBrian in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 7 Aug 2008, 03:42 PM
  4. Do can limit only some country can buy the products?
    By explorer1979 in forum General Questions
    Replies: 0
    Last Post: 8 Oct 2007, 08:27 AM
  5. Selling some products to just one country
    By HandcraftedUK in forum General Questions
    Replies: 3
    Last Post: 3 Nov 2006, 04:13 AM

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