Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Join Date
    Dec 2010
    Posts
    142
    Plugin Contributions
    0

    Default Hide Zone Shipping from Group

    Hi,

    I am trying to hide Zone Shipping from a certain group. I have done this for another shipping module by entering this code:

    Code:
    // do not show to customers_group_pricing 32
          $chk_group_query = $db->Execute("select customers_group_pricing from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$_SESSION['customer_id'] . "'");
          if ($chk_group_query->fields['customers_group_pricing'] == 32) {
            $this->enabled = false;
          }
    I am pretty sure that the code will remain the same for the zone module; however, I don't know where in the file I should put the code... everywhere I have tried just breaks the shipping page and prevents it from loading.

    Any help is appreciated.

    Thanks!

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

    Default Re: Hide Zone Shipping from Group

    Put the code under:
    Code:
          // disable only when entire cart is free shipping
          if (zen_get_shipping_enabled($this->code)) {
            $this->enabled = ((MODULE_SHIPPING_ZONES_STATUS == 'True') ? true : false);
          }
    But add to it, under the line:
    Code:
    // do not show to customers_group_pricing 32
    the line:
    Code:
    global $db;
    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!

  3. #3
    Join Date
    Dec 2010
    Posts
    142
    Plugin Contributions
    0

    Default Re: Hide Zone Shipping from Group

    excellent! worked like a charm. thanks so much!

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

    Default Re: Hide Zone Shipping from Group

    Thanks for the update that this was able to work for you ...
    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!

  5. #5
    Join Date
    Mar 2005
    Location
    UK
    Posts
    38
    Plugin Contributions
    0

    Default Re: Hide Zone Shipping from Group

    Sorry to add to this thread but I'm trying to do something similar but rather than hiding from a Group I need to hide from a destination country. Reason is I have two zones shipping modules and want one to manage UK shipping and the other International. (Usual sledgehammer to crack a nut approach but there is method in my madness). Problem is they both appear all the time.

    I need similar code to above but can't work out the expression to compare the country code. Simplified version is as follows:

    // do not show to destination country UK
    $value = expression to return 2 digit iso country code
    if ($value <> UK) {
    $this->enabled = false;
    }

    I have played around with $dest_country = $order->delivery['country']['iso_code_2']; but can't seem to get it working. If anyone can point me in the right direction it would be appreciated.

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

    Default Re: Hide Zone Shipping from Group

    What shipping modules are you trying to use for this?
    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. #7
    Join Date
    Mar 2005
    Location
    UK
    Posts
    38
    Plugin Contributions
    0

    Default Re: Hide Zone Shipping from Group

    Thanks for your reply.

    zones.php

    I have a second one, zones2.php and I only want one to appear at a time. I've edited the language files differently for both hence the reason for using 2 rather than just increasing the number of zones.

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

    Default Re: Hide Zone Shipping from Group

    What are your settings on the Zone Rates zones shipping module in the right hand panel?

    What are your settings on the Zone2 Rates zones2 shipping module in the right hand panel?
    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. #9
    Join Date
    Mar 2005
    Location
    UK
    Posts
    38
    Plugin Contributions
    0

    Default Re: Hide Zone Shipping from Group

    zones - I have UK as zone 1
    zones2 - I have ROW as zone 1 and EU as zone 2. I will add more zones later.

    if someone in the UK goes to checkout zones displays correctly but zones2 also displays stating option not available
    if someone from EU or ROW goes to checkout zones2 displays correctly but agan zones dispalys stating opion not available

    I thought if I checked if UK or not in both I could disable one so not to confuse customer. More worrying I now seem to have lost both from Admin although they still work fine in the cart so may have screwed something in experimenting.

    Thanks again for your interest.

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

    Default Re: Hide Zone Shipping from Group

    The 2 character ISO code for United Kingdom is: GB ...

    Set that on Zone 1 ... in Zone Rates zones ...

    There is no EU ISO code, you need to list the 2 character ISO code of each country you want ...

    The 2 character ISO Codes can be seen in the Locations / Taxes ... Countries ...

    But before worrying about Zone2 Rates zones2 ... why do you think you need a separate shipping module file? Zone Rates zones has multiple Zones that you can setup ... by default that is 3 Zones ... if you need more Zones, you can customize it to add more ...
    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!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. hide zone rates shipping altogether if not available for country
    By vandiermen in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 23 Oct 2012, 07:00 PM
  2. Hide certain products from a group of users
    By mohammedsk in forum Basic Configuration
    Replies: 4
    Last Post: 29 Dec 2009, 06:31 AM
  3. Zone shipping charging rate from zone 3 to zone 1
    By John Zwikstra in forum Built-in Shipping and Payment Modules
    Replies: 21
    Last Post: 28 Dec 2009, 01:10 PM
  4. Zone shipping charging rate from zone 3 to zone 1
    By John Zwikstra in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 1
    Last Post: 6 Aug 2009, 04:32 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