Page 4 of 4 FirstFirst ... 234
Results 31 to 38 of 38
  1. #31
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Is it possible to enable a shipping method for only a certain customer group?

    That was loads of fun ...

    Thanks for the update that this is woking 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!

  2. #32
    Join Date
    Jul 2008
    Location
    Ontario, Canada
    Posts
    83
    Plugin Contributions
    0

    Default Re: Is it possible to enable a shipping method for only a certain customer group?

    I truly appreciate your patience and brilliance, Linda!

    Do you mind if I sum this coupon part up and put this into a new thread to help others along?

    Cheers,

    J.

  3. #33
    Join Date
    Jul 2008
    Location
    Ontario, Canada
    Posts
    83
    Plugin Contributions
    0

    Default Re: Is it possible to enable a shipping method for only a certain customer group?

    Me again . Can I confirm with you that this code is okay to put into includes\modules\payment\cod.php to allow only certain customers the option to pay upon pickup? I've tested it and it seems fine, just looking for some expert eyes so as to avoid any potential problems...

    PHP Code:
    'zone_id']) {
                
    $check_flag true;
                break;
              }
              
    $check->MoveNext();
            }

            if (
    $check_flag == false) {
              
    $this->enabled false;
            }
          }

    [
    COLOR="Red"]      $chk_group $db->Execute("select customers_group_pricing from " TABLE_CUSTOMERS " where customers_id = '" . (int)$_SESSION['customer_id'] . "'");
        if (
    $chk_group->fields['customers_group_pricing'] == || $chk_group->fields['customers_group_pricing'] == 3) {
          
    $this->enabled true;
        } else {
          
    $this->enabled false;
        }[/
    COLOR]
          
    // disable the module if the order only contains virtual products
          
    if ($this->enabled == true) {
            if (
    $order->content_type != 'physical') {
              
    $this->enabled false;
            } 

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

    Default Re: Is it possible to enable a shipping method for only a certain customer group?

    It appears correct, as long as you have tested that this is working correctly and only showing for Group 2 and 3 and nobody else, then is should be fine ...
    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. #35
    Join Date
    Nov 2009
    Location
    Aurora, IN
    Posts
    37
    Plugin Contributions
    0

    Default Re: Is it possible to enable a shipping method for only a certain customer group?

    I am also interested in only showing a particular shipping module/option when a customer is from a certain pricing group. I am not very good at coding. I have three customer groups. I call them retail, wholesale, and distributor. I want the third group to see only one particular module (staticlist)--a shipping mod I've installed.

    Any help in getting this done would be greatly appreciated. Thanks!

    Gary

    PS. I'm using 1.3.8a (might upgrade soonish when I have time)

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

    Default Re: Is it possible to enable a shipping method for only a certain customer group?

    If that shipping module is like the others, you should have a setting for the $this->enabled ...

    For example, on the Flat Rate flat shipping module in:
    /includes/modules/shipping/flat.php

    you could customize it so that it only shows for those in Group ID 3 by adding the new code in red:

    Code:
          // disable only when entire cart is free shipping
          if (zen_get_shipping_enabled($this->code)) {
            $this->enabled = ((MODULE_SHIPPING_FLAT_STATUS == 'True') ? true : false);
          }
    
          // disable when Group ID is not 3
          $chk_group = $db->Execute("select customers_group_pricing from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$_SESSION['customer_id'] . "'");
          if ($chk_group->fields['customers_group_pricing'] != 3)  {
            $this->enabled = false;
          }
    
    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. #37
    Join Date
    Nov 2009
    Location
    Aurora, IN
    Posts
    37
    Plugin Contributions
    0

    Default Re: Is it possible to enable a shipping method for only a certain customer group?

    :-) Thank you! The coding works great! One more question: This mod allows me to have customizable multiple choices for shipping, with a different rate for each one. Right now I can only make it a fixed amount. Any way to make it a percentage of the order total? Or do I need to ask the mod creator?

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

    Default Re: Is it possible to enable a shipping method for only a certain customer group?

    I don't know anything about the shipping module you are using so probably addressing it to the developer of it would help you best ...
    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 4 of 4 FirstFirst ... 234

Similar Threads

  1. Replies: 6
    Last Post: 16 Jul 2015, 04:29 AM
  2. Is it possible to enable free shipping for only a certain customer group?
    By green couch designs in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 19 Apr 2011, 04:35 PM
  3. Store pick up for certain customer or group only
    By Kayz in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 16 Mar 2010, 10:38 AM
  4. How to enable only one shipping method to some products?
    By hankliu in forum Built-in Shipping and Payment Modules
    Replies: 10
    Last Post: 3 Sep 2009, 06:05 PM
  5. Possible to enable/disable shipping options for certain objects?
    By litepockets in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 19 Sep 2008, 12:03 AM

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