after installing hideCategories
open includes -> templates -> your template -> sideboxes -> tpl_categories.php
find
replace withPHP Code:
// Begin hideCategories code
list($nada, $mycpath)= split('=', $box_categories_array[$i]['path']);
$mycid = split('_', $mycpath);
$categories_id = array_pop($mycid);
$hide_status = $db->Execute("select visibility_status
FROM " . TABLE_HIDE_CATEGORIES . "
WHERE categories_id = " . $categories_id . "
LIMIT 1");
if ($hide_status->fields['visibility_status'] < 1) {
// End hideCategories code
KezzaPHP Code:
// Begin hideCategories code
if ($_SESSION['customer_whole'] && $_SESSION['customer_whole'] != '0') {
} else {
list($nada, $mycpath)= split('=', $box_categories_array[$i]['path']);
$mycid = split('_', $mycpath);
$categories_id = array_pop($mycid);
$hide_status = $db->Execute("select visibility_status
FROM " . TABLE_HIDE_CATEGORIES . "
WHERE categories_id = " . $categories_id . "
LIMIT 1");
}
if ($hide_status->fields['visibility_status'] < 1) {
// End hideCategories code
Nope, sorry... My php skills are very limited and I couldn't figure how to call for a category by its ID number (e.g. call for category #10).
The easy way out, at least for what I am looking to achieve, is using the Multi Site add-on.
Both sites would be identical, except for their catalog.
If anyone feels like shedding some lights on hiding an entire category and not just its products, that would be awesome.
@Kezza:
And right when I post this, you got us a solution!
I'm gonna give it a try right away.
Thank you!!!
@Kezza:
Again, thank you for your help. I tried your code and it works but something bugs me:
It works in the way that it hides the category from the average customer and the wholesale customers can see the category in the Category Side Box.
BUT
as a wholesale customer, once you click on that category link, the all content of the Category Sidebox goes blank. (it's actually "categoriesContent" that goes blank. "categoriesHeading" still shows)
That means as long as you are within this category, it is difficult to navigate to another part of the website.
That's a great start though. Gotta figure that detail and we are golden!
for now the easy cheats fix is to make sure the hidden cat has a sub cat with the products in it
scratch that last post
open includes -> modules -> your template -> product_listing.php
find
and replace withPHP Code:
// Begin hideCategories 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);
// End hideCategories code
KezzaPHP Code:
// Begin hideCategories code
if ($_SESSION['customer_whole'] && $_SESSION['customer_whole'] != '0') {
} else {
$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);
}
// End hideCategories code
I am using both the dual pricing and the hidden wholesale modules (the later as modified by kuroi). GREAT mods and thank you.
But....when I enter the retail price as 0, as suggested in the readme, no price shows at all when the wholesale customer selects the product. What do I need to do to change this?
Thank you...
Well, my "problem" was my own. I thought I was logged in as the test wholesale customer, but I was not. Logging in as a wholesale customer enables the price to show, just as it should.
Does anyone know of a way to make the words "Retail Price" NOT appear on wholesale products? Even though they are followed by no price, it would be good that those words not appear.
This can probably be fixed in a language definitions file.
Go to Tools > Developer Toolkit
and search for the term Retail Price. It will tell you what file it's located in, then you can change the text to a blank space.
Bookmarks