Auto Assign Additional Category Based On Price

If we add a product in Category e.g. [Shirts] and we also have a Separate Category as [Shirts upto 999 ]

What we want is whenever a products is created / added in category [Shirts] , then it should be added to the Secondary Category - [Shirts upto 999] also if the price is 999 or less than 999.

Is this possible.

You should use the update_product_pre hook in the fn_update_product function (app/functions/fn.catalog.php) to create such a feature. It is required to alter the $product_data['category_ids'] array

Thanks Ecom for the right direction.

You should use the update_product_pre hook in the fn_update_product function (app/functions/fn.catalog.php) to create such a feature. It is required to alter the $product_data['category_ids'] array

Will this work for product import as well ?

Will this work for product import as well ?

Unfortunately, no. You should change the fn_exim_set_product_categories function (app/schemas/exim/products.functions.php)