Results 1 to 10 of 10
  1. #1
    Join Date
    Sep 2010
    Posts
    24
    Plugin Contributions
    0

    Default Display Specific Categories for a logged in Customer Only

    I hope this is the right section for this question.

    I've installed the Display Specific Categories for a logged in Customer Only add-on and it worked as advertised....at least I THOUGHT it did.

    I'm working on a website that has specific categories. What I've done is setup categories by company.

    For example -

    Company A
    Company B
    Company C
    Company D

    When a new customer registers and lists their company as one of the above it should display only the category for their company. This works with only the FIRST customer. If any new customers register and use the same company name they will not see their category because their category is not merged with the original. It actually creates a second category with the same exact spelling,etc. in the drop menu from the admin panel.

    So my problem is if I have 30 employees from "COMPANY A", I will end up with 30 COMPANY A entries in category assignment dropdown box in the admin panel and only the first person to register with "COMPANY A" will be able to view the category. The rest will see nothing in the category menu.

    I hope that makes sense and I hope someone can shed some light on this. Thanks in advance!


  2. #2
    Join Date
    Sep 2010
    Posts
    24
    Plugin Contributions
    0

    Default Re: Display Specific Categories for a logged in Customer Only

    No solutions? I've emailed the developer of the module but no luck

  3. #3
    Join Date
    Nov 2010
    Posts
    12
    Plugin Contributions
    0

    Default Re: Display Specific Categories for a logged in Customer Only

    Yes I came across the same problem, also was hoping that the devolper had also figured out to hide from search and all other menu structures.

    If i come across and solutions I will ost here

  4. #4
    Join Date
    Sep 2005
    Posts
    460
    Plugin Contributions
    0

    Default Re: Display Specific Categories for a logged in Customer Only

    Any new light on this matter?

    I also tested the "Category Specific Restriction of Product Price Display" but it won't make this hiding a category for a specific customer and showing for others different categories.
    I may be blond but at least I found Zen.

  5. #5
    Join Date
    Sep 2005
    Posts
    460
    Plugin Contributions
    0

    Default Re: Display Specific Categories for a logged in Customer Only

    Quote Originally Posted by ellivir View Post
    Any new light on this matter?

    I also tested the "Category Specific Restriction of Product Price Display" but it won't make this hiding a category for a specific customer and showing for others different categories.
    Trying to change all the customer_id occurrences for entry_company and also changed the database table accordingly. But still didn't get it working.
    Currently the module uses the customer_id, not the company name as reference, thus many accounts from the same company won't be accepted for it. If we would change it for the field "entry_company" it should work. Only that still the saving of the option seems not functioning really in my tests here.
    I may be blond but at least I found Zen.

  6. #6
    Join Date
    Sep 2005
    Posts
    460
    Plugin Contributions
    0

    Default Re: Display Specific Categories for a logged in Customer Only

    Actually now was thinking that the way could be to use the Group pricing functionality of "grouping" for this:
    - making groups and then selecting those for the categories as restriction

    ... so, going ahead, trying to check how to change it to use that group...
    I may be blond but at least I found Zen.

  7. #7
    Join Date
    Sep 2005
    Posts
    460
    Plugin Contributions
    0

    Default Re: Display Specific Categories for a logged in Customer Only

    What is wrong with this "sentence"?

    $sql = "select group_id, group_name from " . TABLE_CUSTOMERS, . TABLE_GROUP_PRICING;

    it is causing an error for my file for this project of changing this module...
    I'm assuming that I need to choose the first field from the customers table and the second from the group pricing in order to get what we need.

    Lines 702-708 in categories.php based on this module:

    $type_cust_array[] = array('id' => '0', 'text' => 'Everyone');
    $sql = "select customers_group_pricing, group_name from " . TABLE_CUSTOMERS, . TABLE_GROUP_PRICING;
    $customer_name = $db->Execute($sql);
    while (!$customer_name->EOF) {
    $type_cust_array[] = array('id' => $customer_name->fields['customers_group_pricing'], 'text' => $customer_name->fields['group_name']);
    $customer_name->MoveNext();
    }

    Somebody handy may see what is the structural mistake in my code above...
    I may be blond but at least I found Zen.

  8. #8
    Join Date
    Sep 2005
    Posts
    460
    Plugin Contributions
    0

    Default Re: Display Specific Categories for a logged in Customer Only

    Still puzzled with many things, above as well but can I do like this with the sessions to check the user:

    if ($cust_var == $_SESSION['customers_group_pricing'])
    line 47 from this module's tpl_categories.php as I have modified.
    I would need to check the group pricing id, so not the customer id but now I need to know if I can make such "check", command at all. Is it correct language?
    I may be blond but at least I found Zen.

  9. #9
    Join Date
    Sep 2005
    Posts
    460
    Plugin Contributions
    0

    Default Re: Display Specific Categories for a logged in Customer Only

    Quote Originally Posted by ellivir View Post
    Still puzzled with many things, above as well but can I do like this with the sessions to check the user:

    if ($cust_var == $_SESSION['customers_group_pricing'])
    line 47 from this module's tpl_categories.php as I have modified.
    I would need to check the group pricing id, so not the customer id but now I need to know if I can make such "check", command at all. Is it correct language?
    ok, got this part like this:

    $chk_group = $db->Execute("select customers_group_pricing from " . TABLE_CUSTOMERS . " where customers_id = '" . $_SESSION['customer_id'] . "'");
    if ($cust_var == $chk_group->fields['customers_group_pricing'])
    I may be blond but at least I found Zen.

  10. #10
    Join Date
    Sep 2010
    Posts
    24
    Plugin Contributions
    0

    Default Re: Display Specific Categories for a logged in Customer Only

    Haven't had a chance to try the code above. Have you successfully gotten it to work?

 

 

Similar Threads

  1. Replies: 5
    Last Post: 26 Jun 2014, 01:54 PM
  2. v151 Display specific categories for a logged in customer
    By Kayz in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 29 Apr 2014, 10:45 AM
  3. v139h Display Specific Categories for a logged in Customer Only
    By swilliams88 in forum All Other Contributions/Addons
    Replies: 14
    Last Post: 20 Feb 2014, 02:40 PM
  4. v139h Hold Item For Specific Customer Only
    By Rick5150 in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 13 Nov 2012, 06:01 PM
  5. Display prices only in specific categories
    By Cookiepus in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 23 May 2011, 11:25 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