Skip to content
This repository has been archived by the owner on Feb 3, 2022. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/1.0.0r4'
Browse files Browse the repository at this point in the history
  • Loading branch information
tgerulaitis committed Feb 27, 2014
2 parents ef10cf6 + 46d9f3a commit a23037e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/app/code/community/Meanbee/NewCategory/Model/Observer.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
class Meanbee_NewCategory_Model_Observer {

/**
* Consider a product for the "New" category when it is created.
* Consider a product for the "New" category when it is saved.
*
* Observes: catalog_product_save_commit_after
*
* @param Varien_Event_Observer $observer
*/
public function maintainNewProduct(Varien_Event_Observer $observer) {
public function maintainProduct(Varien_Event_Observer $observer) {
/** @var Mage_Catalog_Model_Product $product */
$product = $observer->getEvent()->getProduct();

if ($product && $product->isObjectNew()) {
if ($product) {
Mage::getModel('meanbee_newcategory/auto_category_new')->maintain(array($product->getId()));
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/code/community/Meanbee/NewCategory/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<meanbee_newcategory>
<type>singleton</type>
<class>meanbee_newcategory/observer</class>
<method>maintainNewProduct</method>
<method>maintainProduct</method>
</meanbee_newcategory>
</observers>
</catalog_product_save_commit_after>
Expand Down

0 comments on commit a23037e

Please sign in to comment.