When a product is assigned to a category, Its relation is save is
But on searching for
setPostedProducts() it seems like a magic method. So how the data is saved in
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
as you suspected
setPostedProducts is a magic method.
It just does
The values set are later retrieved using
getPostedProducts when the category is saved.
Here is the backtrace.
getPostedProductsand does something with the results.
See the method
_saveCategoryProducts, specially the part starting with
$products = $category->getPostedProducts();