ovoce Posted May 12, 2013 Share Posted May 12, 2013 Hi all, I am trying to teach myself a little. I am developing custom import module, which loads categories for the eshop from an XML file. Creating, updating categories works fine, with Categor::insert() and Category::update() functions. I have one issue: - I need to disable (hide) all categories, which aren't in new XML, yes I can do it one by one using the Category::update and set the Category->active = 0. But is there an option, how I can do it to all categories at once? I have tried: $sql = "UPDATE " . _DB_PREFIX_ . "category SET active = 0 WHERE id_category IN (...)"; $this->db->execute($sql); It works fine, but in the front end of the e-shop, the categories still are showing. After clicking, they write an error message, ok. But How should i make the update to effectivly change even the showing at the front end? Any advice? Thanx in advance. Link to comment Share on other sites More sharing options...
NemoPS Posted May 13, 2013 Share Posted May 13, 2013 Hi, It might be that the module you use to display categories is grabbing all of them, even inactive ones. Could it be? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now