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

Hybrid View

  1. #1

    Default Re: Twitch Restrict Categories by Customer or Group

    Hi,
    Do you have this available for 1.39h? I know I should upgrade, but haven't got round to it yet. If not, would it need much modification?
    Thanks

  2. #2
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Default Re: Twitch Restrict Categories by Customer or Group

    Yes, it could be modified to work with 1.39h, however I currently don't have a site running 1.39h... I'll need login details for your site admin and FTP to get started. Also, do you have any other mods installed related to customer/category restrictions?
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base8 - Obsidian - This, is what's new.

  3. #3
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Default Re: Twitch Restrict Categories by Customer or Group

    The Problem:
    Twitch Restrict Categories by Customer or Group

    Products currently have no filter to restrict them from the rest of the world.


    The Fix:
    If customers_cat_group doesn't match the category you're attempting to access, deny the product exists.
    includes/modules/pages/product_info/header_php.php

    Add at line 32-33:

    // bof Twitch Restrict Categories by Customer or Group
    $sql = "select categories_id, customers_cat_group from " . TABLE_CATEGORIES_CUSTOMERS . " WHERE categories_id = '" . (int)$current_category_id . "'";
    $customer_group = $db->Execute($sql);
    $cust_var = $customer_group->fields['customers_cat_group'];

    if ($cust_var != $_SESSION['customers_cat_group']) {
    // Not Authorized to see this product/not logged into account
    unset($_GET['products_id']);
    unset($breadcrumb->_trail[sizeof($breadcrumb->_trail)-1]['title']);
    $robotsNoIndex = true;
    header('HTTP/1.1 404 Not Found');
    }
    // eof Twitch Restrict Categories by Customer or Group


    Applies to:
    Guest/Everyone - Not Logged In
    Retail & Wholesale - Logged in

    Additional Information:
    This fix works with linked products. Meaning there is one product in multiple categories.
    If the product exists in a restricted category, it inherits the containing category restriction.


    Note: This is NOT the add on that allows you to make individual product restrictions. I'm working on that separately.
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base8 - Obsidian - This, is what's new.

  4. #4
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Default Re: Twitch Restrict Categories by Customer or Group

    UPDATE: The last fix in post #8 did not respect the customer_cat_group '0' for 'Everyone'

    Please use this code moving forward:

    // bof Twitch Restrict Categories by Customer or Group
    $sql = "select categories_id, customers_cat_group from " . TABLE_CATEGORIES_CUSTOMERS . " WHERE categories_id = '" . (int)$current_category_id . "'";
    $customer_group = $db->Execute($sql);
    $cust_var = $customer_group->fields['customers_cat_group'];

    if ($cust_var == '0') {
    // do nothing - the category is set for 'Everyone'
    } elseif ($cust_var != $_SESSION['customers_cat_group']) {
    // Not Authorized to see this product/not logged into account
    unset($_GET['products_id']);
    unset($breadcrumb->_trail[sizeof($breadcrumb->_trail)-1]['title']);
    $robotsNoIndex = true;
    header('HTTP/1.1 404 Not Found');
    }
    // eof Twitch Restrict Categories by Customer or Group

    This patch will be included in version 14b when it is released.
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base8 - Obsidian - This, is what's new.

  5. #5
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Default Re: Twitch Restrict Categories by Customer or Group

    Twitch Restrict Categories by Customer or Group 14b is complete.

    This version includes both fixes published in this forum:
    Post #5 - Advanced Search Plus 2.0 + Hide Restricted Search Categories w/Twitch Restrict Categories Installed
    Post #8 & #9 - Twitch Restrict Categories by Customer or Group + Inherited Product Restriction


    It also includes a new Master 'customers_cat_group' ID
    The purpose of this update is to allow one master login to access everything regardless of customers_cat_group status on the live site.

    When category is set to customers_cat_group = 1
    - Live Site - Master sees all categories and products in sidebox/category tabs/advanced search

    - Admin - set category to Master 1 and you can restrict category to master only on live site
    - Category status remains unchanged
    - Product status remains unchanged
    - Restriction remains inherited from nearest category
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base8 - Obsidian - This, is what's new.

  6. #6
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Default Re: Twitch Restrict Categories by Customer or Group

    With careful file merging Encrypted Master Password v1.80 now works with Twitch Restrict Categories by Customer or Group 14b and all current Twitch Modules including Twitch Wholesale + Attributes.

    Meaning you can now restrict customers by guest, retail, wholesale AND admin when you log in as one of the customer types with/from admin.

    With a handful of custom filters you can customize what each login sees AND what the logged in admin will see on the live site relative to the customer you're logged in with.

    You can now develop admin only add ons to the live site as order processing tools, restrictions or just for display.

    One Simple Example: Customer logs in and the code sees who they are, displays their company logo on screen based on a restricted category - with their logo as the category image and - unique products in the left nav restricted to the customer or customer group they belong to.

    Another Complex Example: Admin logs in to Customer on live site, sales/upsell/margin calculators display on screen during the order and checkout process. Important notes, conditions and disclaimers become available to the admin or 'salesperson'. Each customer type could have unique tools available when they log in.


    This is the control you've always wanted.


    Encrypted Master Password v1.80
    http://www.zen-cart.com/downloads.php?do=file&id=94
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base8 - Obsidian - This, is what's new.

  7. #7
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Default Re: Twitch Restrict Categories by Customer or Group

    Twitch Restrict Categories by Customer or Group 14c will be released ASAP...

    Fixes for 3 known security bugs will be included.

    Update notes will also be included for anyone with previous versions.
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base8 - Obsidian - This, is what's new.

  8. #8
    Join Date
    Feb 2008
    Location
    Philadelphia
    Posts
    290
    Plugin Contributions
    3

    Default Re: Twitch Restrict Categories by Customer or Group

    I know you pointed me to this plugin. I have only just gotten around to it. The code looks great but I have a bit different need.

    I have some hundreds of clients all of which are assigned a group pricing level.

    Is it a fairly simple thing to modify this to key off group pricing v customers_cat_group? Because doing a redundant setup of customers_cat_group with basically a second identical setting to maintain sounds like a nightmare.

    Otherwise the entire concept I obviously love. Have for ages glad someone has tackled it.

  9. #9
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Default Re: Twitch Restrict Categories by Customer or Group

    This should be used to restrict customer groups from seeing categories. You could restrict one customer per group or many customers per group. It's not related to product prices instead it filters the categories they can/can not see.
    All categories start out as available to everyone.

    If you could provide an example of the exact way you would like your cart to function again, I can clarify the necessities to do it :)
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base8 - Obsidian - This, is what's new.

  10. #10
    Join Date
    Feb 2008
    Location
    Philadelphia
    Posts
    290
    Plugin Contributions
    3

    Default Re: Twitch Restrict Categories by Customer or Group

    I installed this module on a test site finally today.

    I can see the category based restrict field and also on the customer file. Setting those is simple.

    Can you clarify the following

    1) If I restrict a category it stops showing to those not with access in general and on menus
    2) If I restrict category then those with access should see it (but dont) in their side category menu and in general
    3) If I restrict everything the new and special etc products still show up like normal regardless of access level.

    Am I missing something and being totally stupid?

    Because... If I restrict everything I still see products in new etc...

    If I restrict a category it is not shown in the menu even though client should be able to see it since they are a non-restricted code.

    Very confused on why this is not working.

    Also the instructions are very very difficult to understand.

    I do not understand why sql patches are written in there v being provided as an sql file to install. And I do not understand why dozens of pages of code are in here (I assume to explain what is in your actual files) when they are likely handled by me and others using a winmerge.

    And patch c is all written at end v in the files so not sure if that is already in this package or we have to manually do all the changes in area c of instructions.

    Sorry concept great but I don't want to learn what you have accomplished here unless I test it and like it.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Group Pricing - how can I restrict against certain categories?
    By DodgeGirl in forum Setting Up Categories, Products, Attributes
    Replies: 26
    Last Post: 2 Jun 2011, 09:20 PM
  2. How to restrict access for specific categories to registered customer?
    By tutebarra in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 28 Apr 2011, 03:20 PM
  3. Restrict Customer access to certain products or product categories.
    By henryk in forum Managing Customers and Orders
    Replies: 1
    Last Post: 27 Nov 2008, 08:45 AM
  4. Restrict Ordering Process for One Customer / Group
    By blackpig in forum Managing Customers and Orders
    Replies: 3
    Last Post: 17 Jun 2008, 05:15 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