Jump to content

Change category 'active' param


ovoce

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...