Page 2 of 5 FirstFirst 1234 ... LastLast
Results 11 to 20 of 43
  1. #11
    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?

  2. #12
    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!

  3. #13
    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.

  4. #14
    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!

  5. #15
    Join Date
    Jan 2012
    Location
    Northern Indiana
    Posts
    41
    Plugin Contributions
    0

    Default Re: Different Shipping Options for Different Customer Types

    Linda,

    I thought I would try a variation of this suggestion to allow only members of Discount Group 2 to use a particular Payment Option. Whenever I try to use your code in a payment module (freecharger for example) it just hoses the admin/modules/payment menu and clearly doesn't work.

    What is different or what could I be doing wrong?

    I did notice that the freecharger module does not include a $db global declaration, although adding it did not help...

    Any thoughts?

    Thanks in advance
    Michael (Zen Greenhorn)
    Remember: Every expert started out as a beginner!

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

    Default Re: Different Shipping Options for Different Customer Types

    You can customize the file:
    /includes/modules/payment/freecharger.php

    Code:
          $this->enabled = ((MODULE_PAYMENT_FREECHARGER_STATUS == 'True') ? true : false);
    // bof: Only for Discount Group 2
          if (!IS_ADMIN_FLAG) {
            global $db;
            $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
    However, the Zen Cart Free Charger freecharger is meant for when there is no charge on the order ... I am not sure why you want the block on it ... as there will not be a way to checkout with that on there ...
    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!

  7. #17
    Join Date
    Jan 2012
    Location
    Northern Indiana
    Posts
    41
    Plugin Contributions
    0

    Default Re: Different Shipping Options for Different Customer Types

    Thanks for the quick reply Linda! Without thinking it through I was using freecharger as an example.

    Our Customer Service Reps want to be able to sell to employees and phone in customers. As some do not have email addresses or Credit Cards (the only method our public site supports) we need a way for a CSR to purchase an item for the employee or in the name of the caller. I figured that freecharger, moneyorder, or purchaseorder (an add-on mod) might be configured to allow it if the CSR were in a discount (0%) group.

    If there is a better way I'll bet you know what it is!
    Michael (Zen Greenhorn)
    Remember: Every expert started out as a beginner!

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

    Default Re: Different Shipping Options for Different Customer Types

    You could do it with the Purchase Order or Check/Money Order moneyorder but the Zen Cart Free Charger freecharger is made for a different purpose so that would be a bad choice ...
    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!

  9. #19
    Join Date
    Jan 2012
    Location
    Northern Indiana
    Posts
    41
    Plugin Contributions
    0

    Default Re: Different Shipping Options for Different Customer Types

    Quote Originally Posted by Ajeh View Post
    You could do it with the Purchase Order or Check/Money Order moneyorder but the Zen Cart Free Charger freecharger is made for a different purpose so that would be a bad choice ...
    Terrific!

    So, freecharger essentially ~removes~ all charges, making the order free?

    If so, could one make it available only to group 2 (CSR) as in your second example above, thus providing a CSR the option of processing the order outside via cash or other then simply Commenting on the order that it was paid with another (unlisted) payment method?
    Michael (Zen Greenhorn)
    Remember: Every expert started out as a beginner!

  10. #20
    Join Date
    Jan 2012
    Location
    Northern Indiana
    Posts
    41
    Plugin Contributions
    0

    Default Re: Different Shipping Options for Different Customer Types

    Tried adding the code in both freecharger and purchaseorders and get the same hosed admin menu:

    Here is the menu before adding the code:
    Click image for larger version. 

Name:	image2.jpg 
Views:	51 
Size:	13.9 KB 
ID:	10223

    And after adding to purchaseorders:
    Click image for larger version. 

Name:	image1.jpg 
Views:	52 
Size:	10.9 KB 
ID:	10224

    As you can see it completely removes the module from the menu and removes all configuration options at the right.

    Here is where I placed the code:
    PHP Code:
          if (is_object($order)) $this->update_status();
        }

    // bof: Only for Discount Group 2
          
    if (!IS_ADMIN_FLAG) {
            global 
    $db;
            
    $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

    // class methods
        
    function update_status() { 
    Sorry for being such a pain...
    Michael (Zen Greenhorn)
    Remember: Every expert started out as a beginner!

 

 
Page 2 of 5 FirstFirst 1234 ... 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