Esempio n. 1
0
 /**
  * Refresh category and childs rewrites
  * Called when reindexing all rewrites and as a reaction on category change that affects rewrites
  *
  * @param int      $categoryId
  * @param int|null $storeId
  * @param bool     $refreshProducts
  *
  * @return Mage_Catalog_Model_Url
  */
 public function refreshCategoryRewrite($categoryId, $storeId = null, $refreshProducts = true)
 {
     if (true === $this->_getHelper()->disableAllCategoriesInUrlRewrite()) {
         return $this;
     }
     return parent::refreshCategoryRewrite($categoryId, $storeId, $refreshProducts);
 }
Esempio n. 2
0
 /**
  * @magentoDataFixture Mage/Catalog/_files/url_rewrites_invalid.php
  */
 public function testRefreshCategoryRewrite()
 {
     $this->assertNotEmpty($this->_loadRewrite('product/1/4')->getId());
     $this->_model->refreshCategoryRewrite(4);
     $this->assertEmpty($this->_loadRewrite('product/1/4')->getId());
 }