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

Commit

Permalink
Merge branch 'hotfix/2.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoffer Lindqvist committed Feb 24, 2015
2 parents 8706d48 + 991280e commit db036a6
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 17 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ The extension is released under Open Software License ("OSL") v3.0

## Changelog

### 2.0.1
* Fix product tagging to check for tags only if Mage_Tag is enabled
* Add Mage_Core, Mage_Catalog and Mage_Sales as extension dependencies

### 2.0.0
* Support current category tagging on product pages
* Update Nosto php-sdk
Expand Down
22 changes: 12 additions & 10 deletions app/code/community/Nosto/Tagging/Model/Meta/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,16 +304,18 @@ public function loadData(Mage_Catalog_Model_Product $product)
? self::PRODUCT_IN_STOCK
: self::PRODUCT_OUT_OF_STOCK;

$tagCollection = Mage::getModel('tag/tag')
->getCollection()
->addPopularity()
->addStatusFilter(Mage_Tag_Model_Tag::STATUS_APPROVED)
->addProductFilter($product->getId())
->setFlag('relation', true)
->addStoreFilter(Mage::app()->getStore()->getId())
->setActiveFilter();
foreach ($tagCollection as $tag) {
$this->_tags[] = $tag->getName();
if (Mage::helper('core')->isModuleEnabled('Mage_Tag')) {
$tagCollection = Mage::getModel('tag/tag')
->getCollection()
->addPopularity()
->addStatusFilter(Mage_Tag_Model_Tag::STATUS_APPROVED)
->addProductFilter($product->getId())
->setFlag('relation', true)
->addStoreFilter(Mage::app()->getStore()->getId())
->setActiveFilter();
foreach ($tagCollection as $tag) {
$this->_tags[] = $tag->getName();
}
}

if (!$product->canConfigure()) {
Expand Down
2 changes: 1 addition & 1 deletion app/code/community/Nosto/Tagging/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<config>
<modules>
<Nosto_Tagging>
<version>2.0.0</version>
<version>2.0.1</version>
</Nosto_Tagging>
</modules>
<global>
Expand Down
17 changes: 11 additions & 6 deletions app/etc/modules/Nosto_Tagging.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,15 @@
*/
-->
<config>
<modules>
<Nosto_Tagging>
<active>true</active>
<codePool>community</codePool>
</Nosto_Tagging>
</modules>
<modules>
<Nosto_Tagging>
<active>true</active>
<codePool>community</codePool>
<depends>
<Mage_Core/>
<Mage_Catalog/>
<Mage_Sales/>
</depends>
</Nosto_Tagging>
</modules>
</config>

0 comments on commit db036a6

Please sign in to comment.