Mort-lemur Posted June 11, 2010 Posted June 11, 2010 Hi, I have installed the contribution by Spooks for hiding Categories This One and it works great. However I have the categories image box contribution installed as well. The hide categories works on the admin side, and hides the category from the Menu (in my case dynamenu) but it does not hide it in the categories image box. I cannot find a support thread for this. At the bottom of the install instructions, Sam says There may other instances I have missed, the genereral Rule is: If there is a general tep_db_query including TABLE_CATEGORIES add the filter: and categories_status = 1 but I am completely lost in adding this to the categories image box code. Any help would be great please. Thanks Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.
Mort-lemur Posted June 12, 2010 Author Posted June 12, 2010 I think I have found the block of code to modify in catalog/includes/modules/categories_images.php which reads as this: $categories_query = tep_db_query ("select c.categories_id, c.categories_image_front, cd.categories_description_front, cd.categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_CATEGORIES . " c where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id = '" . (int) $languages_id . "' order by c.sort_order "); I have tried modding this as : $categories_query = tep_db_query ("select c.categories_id, c.categories_image_front, cd.categories_description_front, cd.categories_name c.categories_status from " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_CATEGORIES . " c where c.parent_id = '0' and c.categories_status = '1' and c.categories_id = cd.categories_id and cd.language_id = '" . (int) $languages_id . "' order by c.sort_order "); But I get an SQL error on my index page as follows: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.categories_status from categories_descri' at line 5 select c.categories_id, c.categories_image_front, cd.categories_description_front, cd.categories_name c.categories_status from categories_description cd, categories c where c.parent_id = '0' and c.categories_status = '1' and c.categories_id = cd.categories_id and cd.language_id = '1' order by c.sort_order Any help would be really useful. Thanks Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.
♥kymation Posted June 12, 2010 Posted June 12, 2010 You're missing a comma. You don't actually need to get the value of categories_status anyway, so this should work: $categories_query = tep_db_query ("select c.categories_id, c.categories_image_front, cd.categories_description_front, cd.categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_CATEGORIES . " c where c.parent_id = '0' and c.categories_status = '1' and c.categories_id = cd.categories_id and cd.language_id = '" . (int) $languages_id . "' order by c.sort_order "); Regards Jim See my profile for a list of my addons and ways to get support.
Mort-lemur Posted June 13, 2010 Author Posted June 13, 2010 Thanks Jim, Worked a Treat. Thanks If you have no objection can I post this as an update in Sams Contribution so others can do this without struggling? Thanks Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.
♥kymation Posted June 13, 2010 Posted June 13, 2010 Of course you can. How could I object to spreading knowledge? Regards Jim See my profile for a list of my addons and ways to get support.
Mort-lemur Posted June 13, 2010 Author Posted June 13, 2010 Thanks Jim, I actually can not add the update - Spooks has locked the contribution - and I think he has vanished.... Thanks Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.
♥kymation Posted June 13, 2010 Posted June 13, 2010 Maybe you could post it in the support thread for that Contribution. At lease people have a chance of finding information there. Regards Jim See my profile for a list of my addons and ways to get support.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.