Skip to content
This repository has been archived by the owner on Mar 9, 2023. It is now read-only.

Commit

Permalink
Merge pull request #21 from pbrouwers/issue/13
Browse files Browse the repository at this point in the history
fix for FilterUrls for sub-sub categories and store code
  • Loading branch information
Björn Meyer authored Oct 19, 2018
2 parents 0b140f3 + 2ea6aac commit 01ff4d8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/app/code/community/Flagbit/FilterUrls/Model/Catalog/Layer/Filter/Item.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,16 @@ public function getSpeakingFilterUrl($addOwnValue, $withoutFilter = FALSE, $addi
}
$url = preg_replace('/\?.*/', '', $url);

if($addOwnValue && $this->getFilter()->getRequestVar() == "cat") {
$category_url = Mage::getModel('catalog/category')->load($this->getValue())->getUrl();
$return = $category_url;
unset($query[$this->getFilter()->getRequestVar()]);
$url = str_replace(Mage::getStoreConfig('web/unsecure/base_url'), '', $return);
}

$storeCode = Mage::app()->getStore()->getCode();
$url = preg_replace('!^' . $storeCode . '/!', '', $url);

if (!empty($filterUrlString)) {
$configUrlSuffix = Mage::helper('filterurls')->getUrlSuffix();

Expand Down

0 comments on commit 01ff4d8

Please sign in to comment.