Jump to content

Problem getting the category after saving a product


Ana MBL

Recommended Posts

I need to add information to some custom log tables after a new product is created.

I've overwritten the Product class and added the necessary code right at the end of the add function, before 'return true'. Everything seems to work fine, the information about the product is saved to the logs, except the default category, which always seems to be the Home category for some reason.

When I look in the backoffice and the shop, the correct category is displayed, which makes me think the category is updated later, after the add() function, but I just can't find where that is. Any help would be appreciated.

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...