Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    May 2005
    Location
    Australia
    Posts
    334
    Plugin Contributions
    2

    Default Store Pickup for Friends only

    Greetings:

    I was wondering if there was a line or code that we can add to the "Store Pickup" shipping model that will make it so that only people in my Group discount called "Friends" can use this option..


    Thanks

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

    Default Re: Store Pickup for Friends only

    While this is not built into Zen Cart ... you could customize the shipping module to only show for people in a given Group Discount group ...
    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. #3
    Join Date
    May 2005
    Location
    Australia
    Posts
    334
    Plugin Contributions
    2

    Default Re: Store Pickup for Friends only

    Quote Originally Posted by Ajeh View Post
    While this is not built into Zen Cart ... you could customize the shipping module to only show for people in a given Group Discount group ...
    That is what i want to do, i don't suppose you have any ideas on how to do that ?

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

    Default Re: Store Pickup for Friends only

    You need to look up the customers Group Discount to find out if they are allowed to see the Store Pickup shipping modules ...

    This is best done with a function in the catalog to look up the customer's group_id and a function in the admin to return true so that the modules can function in both the Catalog and Admin ...

    If you look at the current /includes/modules/shipping/storepickup.php there is the line:
    PHP Code:
        $this->enabled = ((MODULE_SHIPPING_STOREPICKUP_STATUS == 'True') ? true false); 
    If you added an IF statement around this where the function checks for the right group id and returns true if this is the Friends or false if it is not ... that can control whether this shows:
    PHP Code:
    if (your_function_here) {
        
    $this->enabled = ((MODULE_SHIPPING_STOREPICKUP_STATUS == 'True') ? true false);
    } else {
      
    $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!]
    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
    May 2005
    Location
    Australia
    Posts
    334
    Plugin Contributions
    2

    Default Re: Store Pickup for Friends only

    if (MODULE_ORDER_TOTAL_GROUP_PRICING_TITLE == 'Friends') {
    $this->enabled = ((MODULE_SHIPPING_STOREPICKUP_STATUS == 'True') ? true : false);
    } else {
    $this->enabled = false;
    }
    Do you know what is wrong with this code ? 'Friends' is the group that i want it to show too...

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

    Default Re: Store Pickup for Friends only

    You need to really build a lookup function for the Group ID as it is not available to you in that format when the shipping modules run ...

    The function would check either the group_pricing table for that customer based on group_name or could check the customers table for the customers_group_pricing which is the group_id ...

    If it is the one associated with your "Friends" return true and the shipping module would show ... if not, return false and the shipping module would hide or be disabled ...
    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. #7
    Join Date
    May 2005
    Location
    Australia
    Posts
    334
    Plugin Contributions
    2

    Default Re: Store Pickup for Friends only

    Yea, see i don't know how to do this ...

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

    Default Re: Store Pickup for Friends only

    In order to tell you all that you have to do, I would have to sit down and write the code to manage this for you ...

    As I say, it can be done ... it just takes customization to the code to manage the conditions where a given Group Discount group controls the shipping module(s) ...
    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. #9
    Join Date
    May 2005
    Location
    Australia
    Posts
    334
    Plugin Contributions
    2

    Default Re: Store Pickup for Friends only

    Quote Originally Posted by Ajeh View Post
    In order to tell you all that you have to do, I would have to sit down and write the code to manage this for you ...

    As I say, it can be done ... it just takes customization to the code to manage the conditions where a given Group Discount group controls the shipping module(s) ...
    Do you know of any other mod that has this ability so that i can use it as a base...

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

    Default Re: Store Pickup for Friends only

    Look at the shipping modules ...

    You will see that there is a function that controls them via the $this->enabled example on the file:
    /includes/modules/shipping/item.php
    PHP Code:
          // disable only when entire cart is free shipping
          
    if (zen_get_shipping_enabled($this->code)) {
            
    $this->enabled = ((MODULE_SHIPPING_ITEM_STATUS == 'True') ? true false);
          } 
    If you did a search in the Tools ... Developer's Tool Kit ... in the bottom input box for:
    function zen_get_shipping_enabled
    Select Catalog/Admin ... Click Search ...

    You would find two files with this function ...

    The one in the Admin just returns true so that the module loads properly in the Modules ... Shipping ...

    The one in the Catalog checks for various conditions and returns true or false when the shipping module should be displayed ...

    If you were to write a function to manage the $this->enabled for the storepickup.php to look up the customer's group_id then you could make a similar function to enable/disable the 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!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Multiple store pickup locations and only for certain items
    By divalyn in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 30 Mar 2009, 07:53 PM
  2. Store Pickup only?
    By HDG in forum General Questions
    Replies: 3
    Last Post: 19 Dec 2008, 06:14 AM
  3. In store pickup only?
    By linuxw00t in forum General Questions
    Replies: 1
    Last Post: 27 Feb 2007, 01:48 AM
  4. In-store pickup only for some item
    By pglatz in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 11 Jun 2006, 10:54 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