getOrCreateCategory

getOrCreateCategory ( int idCategory , string categoryName , string parentCategoryID ) : int

If your plateform have a function add_category (Prestashop, Magento, etc.), this function help you to fastly check if idCategory exists (it return it in this case) or it creates the non-existing category and return its ID.

Parameters

idCategory

categoryName

parentCategoryID