protected function checkCategoryIDField()
    {
        //Check "category_id" field
        if (!$this->isFieldChanged('category_id')) {
            return;
        }

        //Update product ID cache list for category
        ProductListStore::instance()->category->clear($this->obElement->category_id);
        ProductListStore::instance()->category->clear((int) $this->obElement->getOriginal('category_id'));

        BrandListStore::instance()->category->clear($this->obElement->category_id);
        BrandListStore::instance()->category->clear((int) $this->obElement->getOriginal('category_id'));

        $this->clearCategoryProductCount($this->obElement->category_id);
        $this->clearCategoryProductCount((int) $this->obElement->getOriginal('category_id'));
    }
protected function checkCategoryIDField()
    {
        //Check "category_id" field
        if (!$this->isFieldChanged('category_id')) {
            return;
        }

        //Update product ID cache list for category
        ProductListStore::instance()->category->clear($this->obElement->category_id);
        ProductListStore::instance()->category->clear((int) $this->obElement->getOriginal('category_id'));

        BrandListStore::instance()->category->clear($this->obElement->category_id);
        BrandListStore::instance()->category->clear((int) $this->obElement->getOriginal('category_id'));

        $this->clearCategoryProductCount($this->obElement->category_id);
        $this->clearCategoryProductCount((int) $this->obElement->getOriginal('category_id'));
    }
protected function checkCategoryIDField ( ) { //Check "category_id" field if ( ! $ this -> isFieldChanged ( 'category_id' ) ) { return ; } //Update product ID cache list for category ProductListStore :: instance ( ) -> category -> clear ( $ this -> obElement -> category_id ) ; ProductListStore :: instance ( ) -> category -> clear ( ( int ) $ this -> obElement -> getOriginal ( 'category_id' ) ) ; BrandListStore :: instance ( ) -> category -> clear ( $ this -> obElement -> category_id ) ; BrandListStore :: instance ( ) -> category -> clear ( ( int ) $ this -> obElement -> getOriginal ( 'category_id' ) ) ; $ this -> clearCategoryProductCount ( $ this -> obElement -> category_id ) ; $ this -> clearCategoryProductCount ( ( int ) $ this -> obElement -> getOriginal ( 'category_id' ) ) ; }
Check product "category_id" field, if it was changed, then clear cache
Check product category_id field if it was changed then clear cache