cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Impex remove deep (removing catalog)

Former Member
3,346

Hello,

we have multiple catalogs (besides staged and online) and now we want to remove one completely.

In the hmc there are sometimes two buttons for deleting e.g. in a catalog. One is just the normal delete button and the second one is a delete full button.

Is it possible to run the delete full task through an Impex? The normal remove button doesn't work, which is equal to REMOVE in Impex, because the catalog has other items which are not deletable.

Thank you / Paul

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member

Hi

Yes, you are correct, to remove a catalog version completely, we need to delete all the references from object which refer to this specific catalog version, and important part is that is has to be deleted in order of their hierarchy, i.e., you will not be allowed to remove a category if it has a sub-category.

It is not possible to remove this using a simple Impex, as deleting objects with properly ordered hierarchy would be a mess, but hybris does provide, an out-of-the-box cronjob to delete the configured catalog version completely. For this you have to create an instance of RemoveCatalogVersionCronjob and configure the catalog version to be deleted on the cronjob. And run the cronjob.

The cronjob, internally uses, RemoveCatalogVersionJobPerformable, which makes use of the following removal strategies, which you may override if required: -->removeCatalogVersionStrategy -->removeCatalogStrategy

It also gives you an option to configure if certain item are not to be deleted.

Hope this helps you !

Regards,