Page 4 of 5 FirstFirst ... 2345 LastLast
Results 31 to 40 of 43
  1. #31
    Join Date
    Sep 2011
    Posts
    86
    Plugin Contributions
    0

    Default Re: Different Shipping Options for Different Customer Types

    wow, Ok that was easy once you showed me the error.

    So now what I have is two types of wholesalers, and one type of online customers. I only want one of the types of wholesalers to see the free option. Is there a way for type (X) to only see the free option.

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

    Default Re: Different Shipping Options for Different Customer Types

    If the wholesalers are split into two groups then use that Group ID ... if they are not, how can you distinguish between the two groups?
    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. #33
    Join Date
    Sep 2011
    Posts
    86
    Plugin Contributions
    0

    Default Re: Different Shipping Options for Different Customer Types

    The wholesalers are split into two separate groups. Group (1) and group (2) I changed the code so group 2 would get free shipping, then my test customer in group (2) could see and get the free shipping. I then logged in as a different customer NOT in group 2 and I still saw the free shipping.
    Should do something like this so that only group (2) can get and see free shipping.

    if ($chk_discount_group->fields['customers_group_pricing'] == 1) or if ($chk_discount_group->fields['customers_group_pricing'] == 0) {
    $this->enabled = false;{

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

    Default Re: Different Shipping Options for Different Customer Types

    If you only want Group 2, where their ID is 2, to be able to see Free Shipping, what happens if you use:
    Code:
    if ($chk_discount_group->fields['customers_group_pricing'] != 2) {
      $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!

  5. #35
    Join Date
    Sep 2011
    Posts
    86
    Plugin Contributions
    0

    Default Re: Different Shipping Options for Different Customer Types

    if I set the code to that then everyone can see the free shipping whether they are in group 2 or not.

  6. #36
    Join Date
    Sep 2011
    Posts
    86
    Plugin Contributions
    0

    Default Re: Different Shipping Options for Different Customer Types

    Ok, I did a little more checking and it seams that my browser was keeping the last customers settings that was logged in. So when I cleared my cache it looks like it is working.

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

    Default Re: Different Shipping Options for Different Customer Types

    Above the IF can you add the line in RED:
    Code:
    echo 'CUSTOMER GROUP IS: ' . $chk_discount_group->fields['customers_group_pricing'] . '<br>';
    if ($chk_discount_group->fields['customers_group_pricing'] != 2) {
      $this->enabled = false;
    }
    and see what displays when you run shipping in either the shipping estimator or checkout_shipping ...

    NOTE: things might look a little goofy with this echo ...
    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!

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

    Default Re: Different Shipping Options for Different Customer Types

    Good deal then you do not need the test ... thanks for the update!
    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. #39
    Join Date
    Mar 2006
    Location
    The Netherlands
    Posts
    93
    Plugin Contributions
    0

    Default Re: Different Shipping Options for Different Customer Types

    Quote Originally Posted by Ajeh View Post
    For example, let's say the Discount Group ID is 2 ... you can customize the code for:
    /includes/modules/shipping/freeoptions.php

    with the code in RED:
    Code:
          // disable only when entire cart is free shipping
          if (zen_get_shipping_enabled($this->code)) {
              $this->enabled = ((MODULE_SHIPPING_FREEOPTIONS_STATUS == 'True') ? true : false);
          }
    
    // bof: Only for Discount Group 2
          if (!IS_ADMIN_FLAG) {
            $chk_discount_group_sql = "SELECT customers_group_pricing FROM " . TABLE_CUSTOMERS . " WHERE customers_id = '" . $_SESSION['customer_id'] . "'";
            $chk_discount_group = $db->Execute($chk_discount_group_sql);
            if ($chk_discount_group->fields['customers_group_pricing'] != 2) {
              $this->enabled = false;
            }
          }
    // eof: Only for Discount Group 2
    
          if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_FREEOPTIONS_ZONE > 0) ) {
    Now only those in Discount Group ID 2 can use this shipping module ...



    I tried to put your code into the zones module but then I get an blank screen:
    Is it in anyway possible to use thies code also in the table and zones module



    // disable only when entire cart is free shipping
    if (zen_get_shipping_enabled($this->code)) {
    $this->enabled = ((MODULE_SHIPPING_ZONES_STATUS == 'True') ? true : false);
    }

    // bof: Only for Discount Group 1
    if (!IS_ADMIN_FLAG) {
    $chk_discount_group_sql = "SELECT customers_group_pricing FROM " . TABLE_CUSTOMERS . " WHERE customers_id = '" . $_SESSION['customer_id'] . "'";
    $chk_discount_group = $db->Execute($chk_discount_group_sql);
    if ($chk_discount_group->fields['customers_group_pricing'] != 1) {
    $this->enabled = false;
    }
    }
    // eof: Only for Discount Group 1

    // CUSTOMIZE THIS SETTING FOR THE NUMBER OF ZONES NEEDED
    $this->num_zones = 3;

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

    Default Re: Different Shipping Options for Different Customer Types

    That code should be able to work in either one ...

    What debug logs do you see in either /cache or /logs depending on your version of Zen Cart?
    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 5 FirstFirst ... 2345 LastLast

Similar Threads

  1. Replies: 2
    Last Post: 27 Oct 2010, 01:45 PM
  2. How can I have different payment options for different shipping options?
    By Liamv in forum Built-in Shipping and Payment Modules
    Replies: 7
    Last Post: 18 Feb 2010, 04:32 AM
  3. Payment & Shipping Module - need different options for different parts of store
    By obkb in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 21 Jan 2009, 12:04 PM
  4. Different shipping methods for different product types?
    By talisman-studios in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 17 Sep 2008, 04:59 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