Results 1 to 10 of 10

Hybrid View

  1. #1
    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.

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

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

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

  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
    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.

  6. #6
    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

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