Thanks! Missed that one :)
- Steven
Thanks! Missed that one :)
- Steven
No problem. I caught something else too. Is it fair to assume that FILENAME_STOCK_MANAGER and FILENAME_IMAGE_HANDLER are constants from installed modules? I am not running these modules and it appears to have messed something up in my store's admin. I changed the file:
admin/includes/modules/category_product_listing.php
I attached the file to this thread. The changes are from line 367-376. Minor, but could help someone else down the road.
cheers,
marc...
yeah, those were already covered above.
excellent. sorry about that, didn't read the full thread. my bad.
as a side note, the file I uploaded is no good. there was something else I added that I shouldn't have. please ignore it.
I'm trying to follow up on this idea of allowing a select group members to view these hidden categories as if they were normally visable. Follow my train of thought and let me know what you think.
1) The select group of members are placed into a "pricing group" with no discount.
2) The functions_hideCategories.php file is edited to "//show based on status" to allow viewing based on "customers_group_pricing"
Am I out to lunch, or does anyone else think this might work?
I'm not that experienced with MySQL or PHP but would it be possible to make an exception clause in this file to compare both customer_id and customer_group_pricing?
Any tips for where I should look, if a product in a completely Hidden category still shows up in the searches?
I figured out my issue, i hadn't properly uploaded includes/modules/YOUR_TEMPLATE/product_listing.php.
Another issue:
I like many others, are trying to get this to work where only certain people within a group_pricing group can see the products.
I'm testing with the includes/modules/YOUR_TEMPLATE/product_listing.php
First I tested things out by searching. With this code executed:
The item does NOT show up in the product search (as expected).Code:$listing_sql = str_replace('WHERE', 'LEFT JOIN ' . TABLE_HIDE_CATEGORIES . ' h ON (p.master_categories_id = h.categories_id) WHERE (h.visibility_status < 2 OR h.visibility_status IS NULL) AND', $listing_sql);
Without the above code, the item DOES show up in the product search (as expected).
So, I wrapped the above code in a conditional, like this:
What I thought my above code is saying is: IF this customer, is not a part of group 3 (my wholesale group), then execute this code. I'm still kind of a SQL newbie, but does my above code mean that if they ARE in group 3, they WON'T see the code?Code:$group_query = $db->Execute("select customers_group_pricing from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$_SESSION['customer_id'] . "'"); if ($group_query->fields['customers_group_pricing'] != '3') { $listing_sql = str_replace('WHERE', 'LEFT JOIN ' . TABLE_HIDE_CATEGORIES . ' h ON (p.master_categories_id = h.categories_id) WHERE (h.visibility_status < 2 OR h.visibility_status IS NULL) AND', $listing_sql); }
Anyway, my above code isn't working, because even when I'm logged in as a group 3 customer, when I search for the product, it isn't showing up in the search.
Any ideas of a mistake I'm making?
hi everyone..
Recently i use HideCategories contribution but now i need modify it. My goal is visible category only for certain customers. One category would be visible to one customer(s) another category visible to others certain customers and so on.
I think that I need 1 additional table in db, lets say called "hide_categories_users" wich would look something like this (with 2 columns):
hide_categories_id (int11) show_to_customers (text)
`show_to_customers` would be a list of customers to whom NOT to hide the category and for all other customers this category would be hidden.
Maybe s_mack or other people would help me by explaining how this could be done. I need to know wich files should be modified and maybe some guidelines how.
Thanx.
Last edited by powah; 26 Apr 2007 at 03:22 PM.
Anyone know how to resolve this? SQL query added via MySQL.
1146 Table '___.TABLE_HIDE_CATEGORIES' doesn't exist
in:
[select visibility_status FROM TABLE_HIDE_CATEGORIES WHERE categories_id = 65 LIMIT 1]
TIA!
Bookmarks