eCommerce
Social and Community Suite
Content Management
RSS Extensions
VirtueMart Extensions
(0)
|
Login
|
Register
|
Lost Password?
Username:
Password:
Home
Our Products
Joomla 1.7.x
(23)
& J!1.6.x
Joomla 1.5.x
(28)
Joomla 1.0.x
(17)
Factory Club Extensions
(7)
Drupal, Elxis, MODx
(6)
Windows Gadgets for J!
(11)
Free Templates
(4)
All Products
(92)
Documentation
Tweets
Forum
Contact Us
Terms & Conditions
How to Buy Guide
Customers FAQ's
Updates & Upgrades
About Us
Latest Tweets
Join us at the Joomladay UK!
The Factory Extensions Joomla Compatibility Chart
Love Factory 2.4 for Joomla 1.7
Love Factory - Memberships [VIDEO]
Love Factory - Custom Fields Integration [VIDEO]
Love Factory - Google Maps Integration [VIDEO]
Love Factory - Administrator Guide [VIDEO]
Love Factory - Memberships
Collection Factory for Joomla 1.6 with CB support
Reverse Auction Factory 1.5.9
Home
Help
Search
Login
Register
The Factory
>
Forum
>
VirtueMart Extensions & Payment Facilities
>
VM Tree Factory
>
Hide empty categories
Pages: [
1
]
« previous
next »
Print
Author
Topic: Hide empty categories (Read 4529 times)
ltempest
Newbie
Posts: 9
Hide empty categories
«
on:
October 28, 2008, 12:53:26 pm »
How do I add code to the module to stop it displaying empty categories?
Thanks
Lee
Logged
Erik
Administrator
Hero Member
Posts: 3120
Re: Hide empty categories
«
Reply #1 on:
October 28, 2008, 03:06:24 pm »
This function is not available in the module.
But as a hint... try perhaps in VM to unpublish the respective category.
Logged
ltempest
Newbie
Posts: 9
Re: Hide empty categories
«
Reply #2 on:
October 28, 2008, 03:10:37 pm »
Erik,
Thanks for the reply, I have unpublished the categories and they still appear. I belive this is because there is no check during the sql query to test wether the category is published. I need to add something along the lines of:
"AND #__{vm}_product.product_publish='Y' \n";
within, I think:
$database->setQuery("select count(*) from #__vm_product_category_xref where category_id = ".$row->category_child_id);
Thanks
Lee
Logged
ltempest
Newbie
Posts: 9
Re: Hide empty categories
«
Reply #3 on:
October 29, 2008, 01:09:52 pm »
OK solved it replace this code:
$queryNames = "select * from #__vm_category where category_id = ".$row->category_child_id;
$database->setQuery($queryNames);
$categorie = $database->loadObject();
With this:
$queryNames = "SELECT * from #__vm_category WHERE category_id = ".$row->category_child_id . " AND #__vm_category.category_publish='Y'";
$database->setQuery($queryNames);
$categorie = $database->loadObject();
if (!$categorie) continue;
This will then not display unpublished categories in the menu.
Hope it helps
Lee
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Forum
-----------------------------
=> News & Announcements
===> Community News
===> General Discussion
===> Unlisted Products
=> eCommerce Factory Suite
for Joomla CMS.
===> Auction Factory
===> Reverse Auction Factory
===> Raffle Factory
===> Collection Factory
===> Ads Factory
===> Media Mall Factory
=> Social & Community Factory Suite
for Joomla CMS.
===> jAnswers Factory
===> Love Factory
===> Chat Factory
===> Deluxe Blog Factory
===> HOT or NOT Deluxe Factory
===> Photo Battle Factory
===> HOT or NOT Factory
=> Content Management Suite
for Joomla CMS.
===> Advertisement Factory
===> Briefcase Factory
===> eBook Factory
===> Article Factory Manager
===> Content Image Factory
=> RSS Factory Suite
for Joomla CMS.
===> rss Factory PRO
===> rss Factory
===> rss to Image Factory
===> rss Context Factory
=> VirtueMart Extensions & Payment Facilities
===> VM Factory Reports
===> VM Factory Orders & Reviews
===> VM Tree Factory
===> VM ePayment Factory
=> Miscellaneous Extensions & Modules
for Joomla.
===> eBay Factory Module
===> Top Movies Factory
===> Exchange Rates Factory
===> Factory Calculators
===> Lava Factory Menu
===> Feedback Factory
===> Awards Factory
=> Other CMS Extensions
===> DRUPAL Extensions & Modules
===> ELXIS Extensions & Modules
===> MODx Extensions & Modules
=> Windows Gadgets
=> Template Factory
===> Joomla Business Template #01
===> Joomla Business Template #02
Loading...