Page 1 of 2 12 LastLast
Results 1 to 10 of 43

Hybrid View

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

    Default Re: Different Shipping Options for Different Customer Types

    How are you identifying the Invoice Customers?
    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!

  2. #2
    Join Date
    Mar 2009
    Location
    Trowbridge, Wiltshire
    Posts
    121
    Plugin Contributions
    0

    Default Re: Different Shipping Options for Different Customer Types

    Hi Ajeh,
    I use the Customers area in admin and then select the relevant option (Invoice Only) from the Discount Pricing Group drop down.

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

    Default Re: Different Shipping Options for Different Customer Types

    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 ...
    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
    Mar 2009
    Location
    Trowbridge, Wiltshire
    Posts
    121
    Plugin Contributions
    0

    Default Re: Different Shipping Options for Different Customer Types

    Cool!

    Sorry to be a pain - but I have had a look at the SQL table and it appears that every customer that is not in a "discount group" is set to "0".

    Is it possible to reflect in the code that if customer is in group "0" then they do not get free shipping?

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

    Default Re: Different Shipping Options for Different Customer Types

    Then you would change the code:
    Code:
            if ($chk_discount_group->fields['customers_group_pricing'] != 2) {
    to read:
    Code:
            if ($chk_discount_group->fields['customers_group_pricing'] == 0) {
    and anyone not in a group will not see it ...
    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
    Mar 2009
    Location
    Trowbridge, Wiltshire
    Posts
    121
    Plugin Contributions
    0

    Default Re: Different Shipping Options for Different Customer Types

    Ajeh - this is awesome! It works perfectly - thank you so much for this.

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

    Default Re: Different Shipping Options for Different Customer Types

    You are most welcome ... thanks for the update that this is working for you now ...
    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!

  8. #8
    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;

  9. #9
    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!]
    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!

  10. #10
    Join Date
    Mar 2006
    Location
    The Netherlands
    Posts
    93
    Plugin Contributions
    0

    Default Re: Different Shipping Options for Different Customer Types

    Thank you for your reply:

    This is what i got when i tried different places to put in the code:

    [27-Mar-2013 10:58:47 Europe/Berlin] PHP Fatal error: Call to a member function Execute() on a non-object in /public_html/clean/includes/modules/shipping/zones.php on line 116

    [27-Mar-2013 11:07:33 Europe/Berlin] PHP Fatal error: Call to a member function Execute() on a non-object in /public_html/clean/includes/modules/shipping/zones.php on line 116

    [27-Mar-2013 11:08:07 Europe/Berlin] PHP Parse error: syntax error, unexpected ';', expecting T_FUNCTION in /public_html/clean/includes/modules/shipping/zones.php on line 348

    [27-Mar-2013 11:08:16 Europe/Berlin] PHP Parse error: syntax error, unexpected ';', expecting T_FUNCTION in /public_html/clean/includes/modules/shipping/zones.php on line 348

    [27-Mar-2013 11:25:46 Europe/Berlin] PHP Fatal error: Call to a member function Execute() on a non-object in /public_html/clean/includes/modules/shipping/zones.php on line 138


    [27-Mar-2013 11:34:57 Europe/Berlin] PHP Fatal error: Call to a member function Execute() on a non-object in /public_html/clean/includes/modules/shipping/zones.php on line 142

 

 
Page 1 of 2 12 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

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