Version Notes
Release
Download this release
Release Info
Developer | FACTFinder |
Extension | Flagbit_Factfinder |
Version | 4.1.9 |
Comparing to | |
See all releases |
Code changes from version 4.1.0 to 4.1.9
- app/code/community/FACTFinder/Asn/Block/Catalog/Layer/Factfinder.php +4 -4
- app/code/community/FACTFinder/Asn/Block/Catalog/Layer/State.php +4 -4
- app/code/community/FACTFinder/Asn/Block/Catalog/Product/List/Toolbar.php +4 -4
- app/code/community/FACTFinder/Asn/Block/Catalog/Product/Pager.php +4 -4
- app/code/community/FACTFinder/Asn/Helper/Data.php +4 -4
- app/code/community/FACTFinder/Asn/Model/Catalog/Layer.php +4 -4
- app/code/community/FACTFinder/Asn/Model/Handler/Search.php +4 -4
- app/code/community/FACTFinder/Asn/Model/Layer/Filter/Factfinder.php +4 -4
- app/code/community/FACTFinder/Asn/Model/Layer/Filter/Item.php +4 -4
- app/code/community/FACTFinder/Asn/Model/Observer.php +5 -4
- app/code/community/FACTFinder/Asn/Model/Resource/Product/Attribute/Collection.php +4 -4
- app/code/community/FACTFinder/Asn/Model/Resource/Search/Collection.php +4 -4
- app/code/community/FACTFinder/Asn/etc/config.xml +2 -2
- app/code/community/FACTFinder/Asn/etc/system.xml +2 -2
- app/code/community/FACTFinder/Campaigns/Block/Abstract.php +4 -4
- app/code/community/FACTFinder/Campaigns/Block/Advisory/Product.php +0 -87
- app/code/community/FACTFinder/Campaigns/Block/Advisory/Search.php +4 -4
- app/code/community/FACTFinder/Campaigns/Block/Feedback/Abstract.php +4 -4
- app/code/community/FACTFinder/Campaigns/Block/Feedback/Cart.php +4 -4
- app/code/community/FACTFinder/Campaigns/Block/Feedback/Product.php +4 -4
- app/code/community/FACTFinder/Campaigns/Block/Feedback/Search.php +4 -4
- app/code/community/FACTFinder/Campaigns/Block/Pushed/Abstract.php +4 -4
- app/code/community/FACTFinder/Campaigns/Block/Pushed/Cart.php +4 -4
- app/code/community/FACTFinder/Campaigns/Block/Pushed/Product.php +4 -4
- app/code/community/FACTFinder/Campaigns/Block/Pushed/Search.php +4 -4
- app/code/community/FACTFinder/Campaigns/Helper/Data.php +4 -4
- app/code/community/FACTFinder/Campaigns/Model/Facade.php +4 -4
- app/code/community/FACTFinder/Campaigns/Model/Handler/Abstract.php +4 -4
- app/code/community/FACTFinder/Campaigns/Model/Handler/Cart.php +9 -9
- app/code/community/FACTFinder/Campaigns/Model/Handler/Product.php +7 -5
- app/code/community/FACTFinder/Campaigns/Model/Handler/Search.php +4 -4
- app/code/community/FACTFinder/Campaigns/Model/Observer.php +4 -4
- app/code/community/FACTFinder/Campaigns/Model/Resource/Pushedproducts/Collection.php +5 -5
- app/code/community/FACTFinder/Campaigns/etc/config.xml +2 -2
- app/code/community/FACTFinder/Campaigns/etc/system.xml +2 -2
- app/code/community/FACTFinder/Core/Block/Adminhtml/Exportlink.php +4 -4
- app/code/community/FACTFinder/Core/Block/Adminhtml/Form/Field/Attribute.php +4 -4
- app/code/community/FACTFinder/Core/Block/Adminhtml/Form/Field/Attributes.php +4 -4
- app/code/community/FACTFinder/Core/Block/Catalog/Product/List/Toolbar.php +294 -34
- app/code/community/FACTFinder/Core/Block/Catalog/Product/Pager.php +4 -4
- app/code/community/FACTFinder/Core/Block/CatalogSearch/Layer.php +44 -0
- app/code/community/FACTFinder/Core/Block/EnterpriseSearch/Layer.php +44 -0
- app/code/community/FACTFinder/Core/Helper/Backend.php +7 -6
- app/code/community/FACTFinder/Core/Helper/Data.php +14 -56
- app/code/community/FACTFinder/Core/Helper/Debug.php +10 -9
- app/code/community/FACTFinder/Core/Helper/Export.php +274 -0
- app/code/community/FACTFinder/Core/Helper/Rewrite.php +119 -0
- app/code/community/FACTFinder/Core/Helper/Search.php +27 -5
- app/code/community/FACTFinder/Core/Model/Autoloader.php +8 -6
- app/code/community/FACTFinder/Core/Model/CatalogSearch/Layer.php +4 -4
- app/code/community/FACTFinder/Core/Model/CatalogSearch/Query.php +34 -0
- app/code/community/FACTFinder/Core/Model/Export/Observer.php +93 -0
- app/code/community/FACTFinder/Core/Model/Export/Price.php +43 -6
- app/code/community/FACTFinder/Core/Model/Export/Product.php +54 -26
- app/code/community/FACTFinder/Core/Model/Export/Stock.php +44 -7
- app/code/community/FACTFinder/Core/Model/Facade.php +21 -7
- app/code/community/FACTFinder/Core/Model/File.php +4 -4
- app/code/community/FACTFinder/Core/Model/Ftp.php +159 -0
- app/code/community/FACTFinder/Core/Model/Handler/Abstract.php +4 -4
- app/code/community/FACTFinder/Core/Model/Handler/Search.php +22 -5
- app/code/community/FACTFinder/Core/Model/Handler/Status.php +30 -4
- app/code/community/FACTFinder/Core/Model/Observer.php +98 -58
- app/code/community/FACTFinder/Core/Model/Resource/Fulltext.php +45 -0
- app/code/community/FACTFinder/Core/Model/Resource/Search/Collection.php +4 -4
- app/code/community/FACTFinder/Core/Model/Resource/Search/Engine.php +4 -4
- app/code/community/FACTFinder/Core/Model/System/Config/Backend/Attributes.php +4 -4
- app/code/community/FACTFinder/Core/Model/System/Config/Backend/Cron.php +4 -4
- app/code/community/FACTFinder/Core/Model/System/Config/Backend/Enabled.php +4 -4
- app/code/community/FACTFinder/Core/Model/System/Config/Backend/Engine.php +47 -0
- app/code/community/FACTFinder/Core/Model/System/Config/Source/Authtype.php +4 -4
- app/code/community/FACTFinder/Core/Model/System/Config/Source/Engine.php +55 -0
- app/code/community/FACTFinder/Core/Model/System/Config/Source/Identifier.php +4 -4
- app/code/community/FACTFinder/Core/Model/System/Config/Source/Protocol.php +4 -4
- app/code/community/FACTFinder/Core/Model/Url.php +62 -0
- app/code/community/FACTFinder/Core/controllers/ExportController.php +12 -4
- app/code/community/FACTFinder/Core/etc/adminhtml.xml +2 -2
- app/code/community/FACTFinder/Core/etc/config.xml +26 -10
- app/code/community/FACTFinder/Core/etc/system.xml +120 -74
- app/code/community/FACTFinder/Recommendation/Helper/Data.php +35 -4
- app/code/community/FACTFinder/Recommendation/Model/Facade.php +8 -7
- app/code/community/FACTFinder/Recommendation/Model/Handler/Recommendations.php +7 -4
- app/code/community/FACTFinder/Recommendation/Model/Observer.php +9 -9
- app/code/community/FACTFinder/Recommendation/etc/config.xml +2 -2
- app/code/community/FACTFinder/Suggest/Block/TopSearch.php +6 -5
- app/code/community/FACTFinder/Suggest/Block/XmlConnect/Catalog/Search/Suggest.php +4 -4
- app/code/community/FACTFinder/Suggest/Helper/Data.php +36 -4
- app/code/community/FACTFinder/Suggest/Model/Facade.php +8 -7
- app/code/community/FACTFinder/Suggest/Model/Handler/Suggest.php +25 -18
- app/code/community/FACTFinder/Suggest/Model/Observer.php +7 -9
- app/code/community/FACTFinder/Suggest/Model/Processor.php +4 -4
- app/code/community/FACTFinder/Suggest/Model/System/Config/Source/Imagetype.php +4 -4
- app/code/community/FACTFinder/Suggest/controllers/ProxyController.php +5 -5
- app/code/community/FACTFinder/Suggest/etc/config.xml +2 -2
- app/code/community/FACTFinder/Suggest/etc/system.xml +2 -2
- app/code/community/FACTFinder/Tagcloud/Block/TagCloud.php +4 -4
- app/code/community/FACTFinder/Tagcloud/Helper/Data.php +4 -4
- app/code/community/FACTFinder/Tagcloud/Model/Facade.php +4 -4
- app/code/community/FACTFinder/Tagcloud/Model/Handler/TagCloud.php +4 -4
- app/code/community/FACTFinder/Tagcloud/etc/config.xml +2 -2
- app/code/community/FACTFinder/Tracking/Block/Abstract.php +74 -0
- app/code/community/FACTFinder/Tracking/Block/Click.php +85 -0
- app/code/community/FACTFinder/Tracking/Block/Init.php +0 -101
- app/code/community/FACTFinder/Tracking/Block/Recommendation.php +83 -0
- app/code/community/FACTFinder/Tracking/Helper/Data.php +4 -4
- app/code/community/FACTFinder/Tracking/Model/Facade.php +4 -4
- app/code/community/FACTFinder/Tracking/Model/Handler/Tracking.php +39 -6
- app/code/community/FACTFinder/Tracking/Model/Observer.php +48 -30
- app/code/community/FACTFinder/Tracking/Model/Processor.php +16 -8
- app/code/community/FACTFinder/Tracking/Model/Queue.php +4 -4
- app/code/community/FACTFinder/Tracking/Model/Resource/Queue.php +4 -4
- app/code/community/FACTFinder/Tracking/Model/Resource/Queue/Collection.php +4 -4
- app/code/community/FACTFinder/Tracking/controllers/ProxyController.php +4 -4
- app/code/community/FACTFinder/Tracking/etc/config.xml +4 -4
- app/code/community/FACTFinder/Tracking/etc/system.xml +2 -2
- app/code/community/FACTFinder/Tracking/sql/factfinder_tracking_setup/{mysql4-install-1.0.0.php → install-1.0.0.php} +2 -2
- app/code/community/FACTFinder/Tracking/sql/factfinder_tracking_setup/upgrade-1.0.0-4.1.2.php +33 -0
- app/design/frontend/base/default/layout/factfinder/asn.xml +2 -2
- app/design/frontend/base/default/layout/factfinder/campaigns.xml +18 -5
- app/design/frontend/base/default/layout/factfinder/core.xml +3 -3
- app/design/frontend/base/default/layout/factfinder/suggest.xml +2 -2
- app/design/frontend/base/default/layout/factfinder/tagcloud.xml +2 -2
- app/design/frontend/base/default/layout/factfinder/tracking.xml +12 -3
- app/design/frontend/base/default/template/factfinder/asn/layer/filter/slider.phtml +2 -2
- app/design/frontend/base/default/template/factfinder/asn/layer/slider.phtml +2 -2
- app/design/frontend/base/default/template/factfinder/campaigns/advisory.phtml +2 -2
- app/design/frontend/base/default/template/factfinder/campaigns/feedback.phtml +2 -2
- app/design/frontend/base/default/template/factfinder/campaigns/pushed.phtml +2 -2
- app/design/frontend/base/default/template/factfinder/core/export/locked.phtml +2 -2
- app/design/frontend/base/default/template/factfinder/core/export/nofile.phtml +2 -2
- app/design/frontend/base/default/template/factfinder/suggest/advancedsuggest.phtml +2 -2
- app/design/frontend/base/default/template/factfinder/tracking/{init.phtml → click.phtml} +6 -5
- app/design/frontend/base/default/template/factfinder/tracking/recommendation.phtml +27 -0
- app/etc/modules/FACTFinder_Asn.xml +12 -0
- app/etc/modules/FACTFinder_Campaigns.xml +13 -0
- app/etc/modules/FACTFinder_Core.xml +9 -0
- app/etc/modules/FACTFinder_Recommendation.xml +12 -0
- app/etc/modules/FACTFinder_Suggest.xml +13 -0
- app/etc/modules/FACTFinder_Tagcloud.xml +12 -0
- app/etc/modules/FACTFinder_Tracking.xml +13 -0
- js/factfinder/suggest.js +2 -2
- js/factfinder/tracking.js +2 -2
- lib/FACTFinder/Adapter/AbstractAdapter.php +48 -6
- lib/FACTFinder/Adapter/Compare.php +17 -12
- lib/FACTFinder/Adapter/ProductCampaign.php +12 -31
- lib/FACTFinder/Adapter/Recommendation.php +25 -11
- lib/FACTFinder/Adapter/Search.php +116 -48
- lib/FACTFinder/Adapter/SimilarRecords.php +13 -7
- lib/FACTFinder/Adapter/Suggest.php +1 -1
- lib/FACTFinder/Adapter/TagCloud.php +1 -1
- lib/FACTFinder/Adapter/Tracking.php +43 -36
- lib/FACTFinder/Core/AbstractConfiguration.php +137 -6
- lib/FACTFinder/Core/ArrayConfiguration.php +324 -0
- lib/FACTFinder/Core/Server/EasyCurlDataProvider.php +1 -1
- lib/FACTFinder/Core/Server/FileSystemDataProvider.php +39 -15
- lib/FACTFinder/Core/XmlConfiguration.php +2 -2
- lib/FACTFinder/Data/BreadCrumbType.php +3 -0
- lib/FACTFinder/Data/FilterGroup.php +2 -12
- lib/FACTFinder/Data/FilterStyle.php +0 -3
- lib/FACTFinder/Data/Result.php +0 -15
- lib/FACTFinder/Data/SortingDirection.php +37 -0
- lib/FACTFinder/Data/SortingItem.php +65 -0
- lib/FACTFinder/Data/SortingItems.php +13 -0
- lib/FACTFinder/Util/Log4PhpLogger.php +48 -48
- lib/FACTFinder/Util/Parameters.php +1 -1
- lib/FACTFinderCustom/Configuration.php +36 -32
- package.xml +9 -9
- shell/factfinder.php +133 -33
- skin/frontend/base/default/js/factfinder_onetouchslider/234A0ACCECB3C19247FA8B7920453761.cache.js +477 -0
- skin/frontend/base/default/js/factfinder_onetouchslider/25E490B929D7CDBF44085E4E4D9D6F78.cache.js +476 -0
- skin/frontend/base/default/js/factfinder_onetouchslider/53ABFAE8983A4589B497F48695DB2A7C.cache.js +484 -0
- skin/frontend/base/default/js/factfinder_onetouchslider/75B23D057185BAB61CFE100CE08C4D84.cache.js +477 -0
- skin/frontend/base/default/js/factfinder_onetouchslider/79DD9AE9135ADFDE204324DA7F1B1405.cache.png +0 -0
- skin/frontend/base/default/js/factfinder_onetouchslider/9F0D0456482D7A7A901A2CD8F64EA019.cache.js +502 -0
- skin/frontend/base/default/js/factfinder_onetouchslider/clear.cache.gif +0 -0
- skin/frontend/base/default/js/factfinder_onetouchslider/de.factfinder.asn.slider.OneTouchSlider.nocache.js +16 -0
app/code/community/FACTFinder/Asn/Block/Catalog/Layer/Factfinder.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Asn
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*
|
12 |
*/
|
@@ -19,8 +19,8 @@
|
|
19 |
* @category Mage
|
20 |
* @package FACTFinder_Asn
|
21 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
22 |
-
* @copyright Copyright (c)
|
23 |
-
* @license
|
24 |
* @link http://www.flagbit.de
|
25 |
*/
|
26 |
class FACTFinder_Asn_Block_Catalog_Layer_Factfinder extends Mage_Catalog_Block_Layer_Filter_Attribute
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Asn
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
* @link http://www.flagbit.de
|
11 |
*
|
12 |
*/
|
19 |
* @category Mage
|
20 |
* @package FACTFinder_Asn
|
21 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
22 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
23 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
24 |
* @link http://www.flagbit.de
|
25 |
*/
|
26 |
class FACTFinder_Asn_Block_Catalog_Layer_Factfinder extends Mage_Catalog_Block_Layer_Filter_Attribute
|
app/code/community/FACTFinder/Asn/Block/Catalog/Layer/State.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Asn
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*
|
12 |
*/
|
@@ -19,8 +19,8 @@
|
|
19 |
* @category Mage
|
20 |
* @package FACTFinder_Asn
|
21 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
22 |
-
* @copyright Copyright (c)
|
23 |
-
* @license
|
24 |
* @link http://www.flagbit.de
|
25 |
*/
|
26 |
class FACTFinder_Asn_Block_Catalog_Layer_State extends Mage_Catalog_Block_Layer_State
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Asn
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
* @link http://www.flagbit.de
|
11 |
*
|
12 |
*/
|
19 |
* @category Mage
|
20 |
* @package FACTFinder_Asn
|
21 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
22 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
23 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
24 |
* @link http://www.flagbit.de
|
25 |
*/
|
26 |
class FACTFinder_Asn_Block_Catalog_Layer_State extends Mage_Catalog_Block_Layer_State
|
app/code/community/FACTFinder/Asn/Block/Catalog/Product/List/Toolbar.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Asn
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
@@ -18,8 +18,8 @@
|
|
18 |
* @category Mage
|
19 |
* @package FACTFinder_Asn
|
20 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
21 |
-
* @copyright Copyright (c)
|
22 |
-
* @license
|
23 |
* @link http://www.flagbit.de
|
24 |
*/
|
25 |
class FACTFinder_Asn_Block_Catalog_Product_List_Toolbar extends FACTFinder_Core_Block_Catalog_Product_List_Toolbar
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Asn
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
18 |
* @category Mage
|
19 |
* @package FACTFinder_Asn
|
20 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
21 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
22 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
23 |
* @link http://www.flagbit.de
|
24 |
*/
|
25 |
class FACTFinder_Asn_Block_Catalog_Product_List_Toolbar extends FACTFinder_Core_Block_Catalog_Product_List_Toolbar
|
app/code/community/FACTFinder/Asn/Block/Catalog/Product/Pager.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Asn
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
@@ -18,8 +18,8 @@
|
|
18 |
* @category Mage
|
19 |
* @package FACTFinder_Asn
|
20 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
21 |
-
* @copyright Copyright (c)
|
22 |
-
* @license
|
23 |
* @link http://www.flagbit.de
|
24 |
*/
|
25 |
class FACTFinder_Asn_Block_Catalog_Product_Pager extends FACTFinder_Core_Block_Catalog_Product_Pager
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Asn
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
18 |
* @category Mage
|
19 |
* @package FACTFinder_Asn
|
20 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
21 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
22 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
23 |
* @link http://www.flagbit.de
|
24 |
*/
|
25 |
class FACTFinder_Asn_Block_Catalog_Product_Pager extends FACTFinder_Core_Block_Catalog_Product_Pager
|
app/code/community/FACTFinder/Asn/Helper/Data.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Asn
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
@@ -16,8 +16,8 @@
|
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Asn
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
-
* @copyright Copyright (c)
|
20 |
-
* @license
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
class FACTFinder_Asn_Helper_Data extends Mage_Core_Helper_Abstract
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Asn
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Asn
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
20 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
class FACTFinder_Asn_Helper_Data extends Mage_Core_Helper_Abstract
|
app/code/community/FACTFinder/Asn/Model/Catalog/Layer.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Asn
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
@@ -18,8 +18,8 @@
|
|
18 |
* @category Mage
|
19 |
* @package FACTFinder_Asn
|
20 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
21 |
-
* @copyright Copyright (c)
|
22 |
-
* @license
|
23 |
* @link http://www.flagbit.de
|
24 |
*/
|
25 |
class FACTFinder_Asn_Model_Catalog_Layer extends Mage_Catalog_Model_Layer
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Asn
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
18 |
* @category Mage
|
19 |
* @package FACTFinder_Asn
|
20 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
21 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
22 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
23 |
* @link http://www.flagbit.de
|
24 |
*/
|
25 |
class FACTFinder_Asn_Model_Catalog_Layer extends Mage_Catalog_Model_Layer
|
app/code/community/FACTFinder/Asn/Model/Handler/Search.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Asn
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
@@ -18,8 +18,8 @@
|
|
18 |
* @category Mage
|
19 |
* @package FACTFinder_Asn
|
20 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
21 |
-
* @copyright Copyright (c)
|
22 |
-
* @license
|
23 |
* @link http://www.flagbit.de
|
24 |
*/
|
25 |
class FACTFinder_Asn_Model_Handler_Search extends FACTFinder_Core_Model_Handler_Search
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Asn
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
18 |
* @category Mage
|
19 |
* @package FACTFinder_Asn
|
20 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
21 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
22 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
23 |
* @link http://www.flagbit.de
|
24 |
*/
|
25 |
class FACTFinder_Asn_Model_Handler_Search extends FACTFinder_Core_Model_Handler_Search
|
app/code/community/FACTFinder/Asn/Model/Layer/Filter/Factfinder.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Asn
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
@@ -16,8 +16,8 @@
|
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Asn
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
-
* @copyright Copyright (c)
|
20 |
-
* @license
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
class FACTFinder_Asn_Model_Layer_Filter_Factfinder extends Mage_Catalog_Model_Layer_Filter_Abstract
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Asn
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Asn
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
20 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
class FACTFinder_Asn_Model_Layer_Filter_Factfinder extends Mage_Catalog_Model_Layer_Filter_Abstract
|
app/code/community/FACTFinder/Asn/Model/Layer/Filter/Item.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Asn
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
@@ -16,8 +16,8 @@
|
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Asn
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
-
* @copyright Copyright (c)
|
20 |
-
* @license
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
class FACTFinder_Asn_Model_Layer_Filter_Item extends Mage_Catalog_Model_Layer_Filter_Item
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Asn
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Asn
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
20 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
class FACTFinder_Asn_Model_Layer_Filter_Item extends Mage_Catalog_Model_Layer_Filter_Item
|
app/code/community/FACTFinder/Asn/Model/Observer.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Asn
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
@@ -16,8 +16,8 @@
|
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Asn
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
-
* @copyright Copyright (c)
|
20 |
-
* @license
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
class FACTFinder_Asn_Model_Observer
|
@@ -39,6 +39,7 @@ class FACTFinder_Asn_Model_Observer
|
|
39 |
$block->setChild('layer_state', $stateBlock);
|
40 |
|
41 |
$filterableAttributes = Mage::getResourceModel('factfinder_asn/product_attribute_collection');
|
|
|
42 |
foreach ($filterableAttributes as $index => $attribute) {
|
43 |
$filter = $block->getLayout()
|
44 |
->createBlock('factfinder_asn/catalog_layer_factfinder')
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Asn
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Asn
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
20 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
class FACTFinder_Asn_Model_Observer
|
39 |
$block->setChild('layer_state', $stateBlock);
|
40 |
|
41 |
$filterableAttributes = Mage::getResourceModel('factfinder_asn/product_attribute_collection');
|
42 |
+
$filterableAttributes->setStoreId(Mage::app()->getStore()->getStoreId());
|
43 |
foreach ($filterableAttributes as $index => $attribute) {
|
44 |
$filter = $block->getLayout()
|
45 |
->createBlock('factfinder_asn/catalog_layer_factfinder')
|
app/code/community/FACTFinder/Asn/Model/Resource/Product/Attribute/Collection.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Asn
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
@@ -18,8 +18,8 @@
|
|
18 |
* @category Mage
|
19 |
* @package FACTFinder_Asn
|
20 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
21 |
-
* @copyright Copyright (c)
|
22 |
-
* @license
|
23 |
* @link http://www.flagbit.de
|
24 |
*/
|
25 |
class FACTFinder_Asn_Model_Resource_Product_Attribute_Collection
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Asn
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
18 |
* @category Mage
|
19 |
* @package FACTFinder_Asn
|
20 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
21 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
22 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
23 |
* @link http://www.flagbit.de
|
24 |
*/
|
25 |
class FACTFinder_Asn_Model_Resource_Product_Attribute_Collection
|
app/code/community/FACTFinder/Asn/Model/Resource/Search/Collection.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Asn
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
@@ -16,8 +16,8 @@
|
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Asn
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
-
* @copyright Copyright (c)
|
20 |
-
* @license
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
class FACTFinder_Asn_Model_Resource_Search_Collection extends FACTFinder_Core_Model_Resource_Search_Collection
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Asn
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Asn
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
20 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
class FACTFinder_Asn_Model_Resource_Search_Collection extends FACTFinder_Core_Model_Resource_Search_Collection
|
app/code/community/FACTFinder/Asn/etc/config.xml
CHANGED
@@ -6,8 +6,8 @@
|
|
6 |
* @category Mage
|
7 |
* @package FACTFinder_Asn
|
8 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
9 |
-
* @copyright Copyright (c)
|
10 |
-
* @license
|
11 |
* @link http://www.flagbit.de
|
12 |
*/
|
13 |
-->
|
6 |
* @category Mage
|
7 |
* @package FACTFinder_Asn
|
8 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
9 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
10 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
11 |
* @link http://www.flagbit.de
|
12 |
*/
|
13 |
-->
|
app/code/community/FACTFinder/Asn/etc/system.xml
CHANGED
@@ -6,8 +6,8 @@
|
|
6 |
* @category Mage
|
7 |
* @package FACTFinder_Asn
|
8 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
9 |
-
* @copyright Copyright (c)
|
10 |
-
* @license
|
11 |
* @link http://www.flagbit.de
|
12 |
*/
|
13 |
-->
|
6 |
* @category Mage
|
7 |
* @package FACTFinder_Asn
|
8 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
9 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
10 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
11 |
* @link http://www.flagbit.de
|
12 |
*/
|
13 |
-->
|
app/code/community/FACTFinder/Campaigns/Block/Abstract.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Campaigns
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
@@ -16,8 +16,8 @@
|
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Campaigns
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
-
* @copyright Copyright (c)
|
20 |
-
* @license
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
abstract class FACTFinder_Campaigns_Block_Abstract extends Mage_Core_Block_Template
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Campaigns
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Campaigns
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
20 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
abstract class FACTFinder_Campaigns_Block_Abstract extends Mage_Core_Block_Template
|
app/code/community/FACTFinder/Campaigns/Block/Advisory/Product.php
DELETED
@@ -1,87 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* FACTFinder_Campaigns
|
4 |
-
*
|
5 |
-
* @category Mage
|
6 |
-
* @package FACTFinder_Campaigns
|
7 |
-
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c) 2015, Flagbit GmbH & Co. KG
|
9 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
10 |
-
* @link http://www.flagbit.de
|
11 |
-
*/
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Class FACTFinder_Campaigns_Block_Advisory_Product
|
15 |
-
*
|
16 |
-
* Provides advisory hints to the product view page
|
17 |
-
*
|
18 |
-
* @category Mage
|
19 |
-
* @package FACTFinder_Campaigns
|
20 |
-
* @author Flagbit Magento Team <magento@flagbit.de>
|
21 |
-
* @copyright Copyright (c) 2015, Flagbit GmbH & Co. KG
|
22 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
23 |
-
* @link http://www.flagbit.de
|
24 |
-
*/
|
25 |
-
class FACTFinder_Campaigns_Block_Advisory_Product extends FACTFinder_Campaigns_Block_Abstract
|
26 |
-
{
|
27 |
-
|
28 |
-
/**
|
29 |
-
* @var string
|
30 |
-
*/
|
31 |
-
protected $_handlerModel = 'factfinder_campaigns/handler_product';
|
32 |
-
|
33 |
-
|
34 |
-
/**
|
35 |
-
* @return \Mage_Core_Model_Abstract
|
36 |
-
*/
|
37 |
-
protected function _getHandler()
|
38 |
-
{
|
39 |
-
return Mage::getSingleton('factfinder_campaigns/handler_product', $this->_getProductIds());
|
40 |
-
}
|
41 |
-
|
42 |
-
|
43 |
-
/**
|
44 |
-
* @return array
|
45 |
-
*/
|
46 |
-
protected function _getProductIds()
|
47 |
-
{
|
48 |
-
$productIds = array();
|
49 |
-
if (Mage::registry('current_product')) {
|
50 |
-
$productIds = array(
|
51 |
-
Mage::registry('current_product')->getData(Mage::helper('factfinder_campaigns')->getIdFieldName())
|
52 |
-
);
|
53 |
-
}
|
54 |
-
|
55 |
-
return $productIds;
|
56 |
-
}
|
57 |
-
|
58 |
-
|
59 |
-
/**
|
60 |
-
* Get campaign questions and answers
|
61 |
-
*
|
62 |
-
* @return array
|
63 |
-
*/
|
64 |
-
public function getActiveQuestions()
|
65 |
-
{
|
66 |
-
$questions = array();
|
67 |
-
|
68 |
-
if ($this->canCampaignBeDisplay()) {
|
69 |
-
$questions = $this->_getHandler()->getActiveAdvisorQuestions();
|
70 |
-
}
|
71 |
-
|
72 |
-
return $questions;
|
73 |
-
}
|
74 |
-
|
75 |
-
|
76 |
-
/**
|
77 |
-
* Check if campaign can be displayed
|
78 |
-
*
|
79 |
-
* @return bool
|
80 |
-
*/
|
81 |
-
protected function canCampaignBeDisplay()
|
82 |
-
{
|
83 |
-
return (bool) Mage::registry('current_product');
|
84 |
-
}
|
85 |
-
|
86 |
-
|
87 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/FACTFinder/Campaigns/Block/Advisory/Search.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Campaigns
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
@@ -16,8 +16,8 @@
|
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Campaigns
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
-
* @copyright Copyright (c)
|
20 |
-
* @license
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
class FACTFinder_Campaigns_Block_Advisory_Search extends FACTFinder_Campaigns_Block_Abstract
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Campaigns
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Campaigns
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
20 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
class FACTFinder_Campaigns_Block_Advisory_Search extends FACTFinder_Campaigns_Block_Abstract
|
app/code/community/FACTFinder/Campaigns/Block/Feedback/Abstract.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Campaigns
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
@@ -16,8 +16,8 @@
|
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Campaigns
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
-
* @copyright Copyright (c)
|
20 |
-
* @license
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
abstract class FACTFinder_Campaigns_Block_Feedback_Abstract extends FACTFinder_Campaigns_Block_Abstract
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Campaigns
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Campaigns
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
20 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
abstract class FACTFinder_Campaigns_Block_Feedback_Abstract extends FACTFinder_Campaigns_Block_Abstract
|
app/code/community/FACTFinder/Campaigns/Block/Feedback/Cart.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Campaigns
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
@@ -18,8 +18,8 @@
|
|
18 |
* @category Mage
|
19 |
* @package FACTFinder_Campaigns
|
20 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
21 |
-
* @copyright Copyright (c)
|
22 |
-
* @license
|
23 |
* @link http://www.flagbit.de
|
24 |
*/
|
25 |
class FACTFinder_Campaigns_Block_Feedback_Cart extends FACTFinder_Campaigns_Block_Feedback_Abstract
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Campaigns
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
18 |
* @category Mage
|
19 |
* @package FACTFinder_Campaigns
|
20 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
21 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
22 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
23 |
* @link http://www.flagbit.de
|
24 |
*/
|
25 |
class FACTFinder_Campaigns_Block_Feedback_Cart extends FACTFinder_Campaigns_Block_Feedback_Abstract
|
app/code/community/FACTFinder/Campaigns/Block/Feedback/Product.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Campaigns
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
@@ -16,8 +16,8 @@
|
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Campaigns
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
-
* @copyright Copyright (c)
|
20 |
-
* @license
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
class FACTFinder_Campaigns_Block_Feedback_Product extends FACTFinder_Campaigns_Block_Feedback_Abstract
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Campaigns
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Campaigns
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
20 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
class FACTFinder_Campaigns_Block_Feedback_Product extends FACTFinder_Campaigns_Block_Feedback_Abstract
|
app/code/community/FACTFinder/Campaigns/Block/Feedback/Search.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Campaigns
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
@@ -16,8 +16,8 @@
|
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Campaigns
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
-
* @copyright Copyright (c)
|
20 |
-
* @license
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
class FACTFinder_Campaigns_Block_Feedback_Search extends FACTFinder_Campaigns_Block_Feedback_Abstract
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Campaigns
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Campaigns
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
20 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
class FACTFinder_Campaigns_Block_Feedback_Search extends FACTFinder_Campaigns_Block_Feedback_Abstract
|
app/code/community/FACTFinder/Campaigns/Block/Pushed/Abstract.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Campaigns
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
@@ -16,8 +16,8 @@
|
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Campaigns
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
-
* @copyright Copyright (c)
|
20 |
-
* @license
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
abstract class FACTFinder_Campaigns_Block_Pushed_Abstract extends Mage_Catalog_Block_Product_List_Upsell
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Campaigns
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Campaigns
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
20 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
abstract class FACTFinder_Campaigns_Block_Pushed_Abstract extends Mage_Catalog_Block_Product_List_Upsell
|
app/code/community/FACTFinder/Campaigns/Block/Pushed/Cart.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Campaigns
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
@@ -16,8 +16,8 @@
|
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Campaigns
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
-
* @copyright Copyright (c)
|
20 |
-
* @license
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
class FACTFinder_Campaigns_Block_Pushed_Cart extends FACTFinder_Campaigns_Block_Pushed_Abstract
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Campaigns
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Campaigns
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
20 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
class FACTFinder_Campaigns_Block_Pushed_Cart extends FACTFinder_Campaigns_Block_Pushed_Abstract
|
app/code/community/FACTFinder/Campaigns/Block/Pushed/Product.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Campaigns
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
@@ -16,8 +16,8 @@
|
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Campaigns
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
-
* @copyright Copyright (c)
|
20 |
-
* @license
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
class FACTFinder_Campaigns_Block_Pushed_Product extends FACTFinder_Campaigns_Block_Pushed_Abstract
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Campaigns
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Campaigns
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
20 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
class FACTFinder_Campaigns_Block_Pushed_Product extends FACTFinder_Campaigns_Block_Pushed_Abstract
|
app/code/community/FACTFinder/Campaigns/Block/Pushed/Search.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Campaigns
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
@@ -16,8 +16,8 @@
|
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Campaigns
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
-
* @copyright Copyright (c)
|
20 |
-
* @license
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
class FACTFinder_Campaigns_Block_Pushed_Search extends FACTFinder_Campaigns_Block_Pushed_Abstract
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Campaigns
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Campaigns
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
20 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
class FACTFinder_Campaigns_Block_Pushed_Search extends FACTFinder_Campaigns_Block_Pushed_Abstract
|
app/code/community/FACTFinder/Campaigns/Helper/Data.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Campaigns
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
@@ -16,8 +16,8 @@
|
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Campaigns
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
-
* @copyright Copyright (c)
|
20 |
-
* @license
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
class FACTFinder_Campaigns_Helper_Data extends Mage_Core_Helper_Abstract
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Campaigns
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Campaigns
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
20 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
class FACTFinder_Campaigns_Helper_Data extends Mage_Core_Helper_Abstract
|
app/code/community/FACTFinder/Campaigns/Model/Facade.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Campaigns
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
@@ -16,8 +16,8 @@
|
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Campaigns
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
-
* @copyright Copyright (c)
|
20 |
-
* @license
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
class FACTFinder_Campaigns_Model_Facade extends FACTFinder_Core_Model_Facade
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Campaigns
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Campaigns
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
20 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
class FACTFinder_Campaigns_Model_Facade extends FACTFinder_Core_Model_Facade
|
app/code/community/FACTFinder/Campaigns/Model/Handler/Abstract.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Campaigns
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
@@ -16,8 +16,8 @@
|
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Campaigns
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
-
* @copyright Copyright (c)
|
20 |
-
* @license
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
abstract class FACTFinder_Campaigns_Model_Handler_Abstract extends FACTFinder_Core_Model_Handler_Search
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Campaigns
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Campaigns
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
20 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
abstract class FACTFinder_Campaigns_Model_Handler_Abstract extends FACTFinder_Core_Model_Handler_Search
|
app/code/community/FACTFinder/Campaigns/Model/Handler/Cart.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Campaigns
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
@@ -16,8 +16,8 @@
|
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Campaigns
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
-
* @copyright Copyright (c)
|
20 |
-
* @license
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
class FACTFinder_Campaigns_Model_Handler_Cart extends FACTFinder_Campaigns_Model_Handler_Abstract
|
@@ -43,14 +43,12 @@ class FACTFinder_Campaigns_Model_Handler_Cart extends FACTFinder_Campaigns_Model
|
|
43 |
{
|
44 |
$quote = Mage::getSingleton('checkout/session')->getQuote();
|
45 |
|
46 |
-
$productIds = array();
|
47 |
-
|
48 |
/** @var Mage_Sales_Model_Quote_Item $item */
|
49 |
foreach ($quote->getAllItems() as $item) {
|
50 |
-
$
|
51 |
}
|
52 |
|
53 |
-
return $
|
54 |
}
|
55 |
|
56 |
|
@@ -61,7 +59,9 @@ class FACTFinder_Campaigns_Model_Handler_Cart extends FACTFinder_Campaigns_Model
|
|
61 |
*/
|
62 |
public function getCampaigns()
|
63 |
{
|
64 |
-
|
|
|
|
|
65 |
|
66 |
return parent::getCampaigns();
|
67 |
}
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Campaigns
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Campaigns
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
20 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
class FACTFinder_Campaigns_Model_Handler_Cart extends FACTFinder_Campaigns_Model_Handler_Abstract
|
43 |
{
|
44 |
$quote = Mage::getSingleton('checkout/session')->getQuote();
|
45 |
|
|
|
|
|
46 |
/** @var Mage_Sales_Model_Quote_Item $item */
|
47 |
foreach ($quote->getAllItems() as $item) {
|
48 |
+
$this->_productIds[] = $item->getProduct()->getData(Mage::helper('factfinder_campaigns')->getIdFieldName());
|
49 |
}
|
50 |
|
51 |
+
return $this->_productIds;
|
52 |
}
|
53 |
|
54 |
|
59 |
*/
|
60 |
public function getCampaigns()
|
61 |
{
|
62 |
+
if (!empty($this->_productIds)) {
|
63 |
+
$this->_getFacade()->getProductCampaignAdapter()->makeShoppingCartCampaign();
|
64 |
+
}
|
65 |
|
66 |
return parent::getCampaigns();
|
67 |
}
|
app/code/community/FACTFinder/Campaigns/Model/Handler/Product.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Campaigns
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
@@ -16,8 +16,8 @@
|
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Campaigns
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
-
* @copyright Copyright (c)
|
20 |
-
* @license
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
class FACTFinder_Campaigns_Model_Handler_Product extends FACTFinder_Campaigns_Model_Handler_Abstract
|
@@ -56,7 +56,9 @@ class FACTFinder_Campaigns_Model_Handler_Product extends FACTFinder_Campaigns_Mo
|
|
56 |
*/
|
57 |
public function getCampaigns()
|
58 |
{
|
59 |
-
|
|
|
|
|
60 |
|
61 |
return parent::getCampaigns();
|
62 |
}
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Campaigns
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Campaigns
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
20 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
class FACTFinder_Campaigns_Model_Handler_Product extends FACTFinder_Campaigns_Model_Handler_Abstract
|
56 |
*/
|
57 |
public function getCampaigns()
|
58 |
{
|
59 |
+
if (!empty($this->_productIds)) {
|
60 |
+
$this->_getFacade()->getProductCampaignAdapter()->makeProductCampaign();
|
61 |
+
}
|
62 |
|
63 |
return parent::getCampaigns();
|
64 |
}
|
app/code/community/FACTFinder/Campaigns/Model/Handler/Search.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Campaigns
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
@@ -16,8 +16,8 @@
|
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Campaigns
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
-
* @copyright Copyright (c)
|
20 |
-
* @license
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
class FACTFinder_Campaigns_Model_Handler_Search extends FACTFinder_Core_Model_Handler_Search
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Campaigns
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Campaigns
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
20 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
class FACTFinder_Campaigns_Model_Handler_Search extends FACTFinder_Core_Model_Handler_Search
|
app/code/community/FACTFinder/Campaigns/Model/Observer.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Campaigns
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
@@ -16,8 +16,8 @@
|
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Campaigns
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
-
* @copyright Copyright (c)
|
20 |
-
* @license
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
class FACTFinder_Campaigns_Model_Observer
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Campaigns
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Campaigns
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
20 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
class FACTFinder_Campaigns_Model_Observer
|
app/code/community/FACTFinder/Campaigns/Model/Resource/Pushedproducts/Collection.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Campaigns
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
@@ -16,8 +16,8 @@
|
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Campaigns
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
-
* @copyright Copyright (c)
|
20 |
-
* @license
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
class FACTFinder_Campaigns_Model_Resource_Pushedproducts_Collection
|
@@ -109,7 +109,7 @@ class FACTFinder_Campaigns_Model_Resource_Pushedproducts_Collection
|
|
109 |
);
|
110 |
}
|
111 |
|
112 |
-
$idFieldName = Mage::helper('
|
113 |
|
114 |
if (!empty($productIds)) {
|
115 |
// add Filter to Query
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Campaigns
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
* @link http://www.flagbit.de
|
11 |
*/
|
12 |
|
16 |
* @category Mage
|
17 |
* @package FACTFinder_Campaigns
|
18 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
19 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
20 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
21 |
* @link http://www.flagbit.de
|
22 |
*/
|
23 |
class FACTFinder_Campaigns_Model_Resource_Pushedproducts_Collection
|
109 |
);
|
110 |
}
|
111 |
|
112 |
+
$idFieldName = Mage::helper('factfinder/search')->getIdFieldName();
|
113 |
|
114 |
if (!empty($productIds)) {
|
115 |
// add Filter to Query
|
app/code/community/FACTFinder/Campaigns/etc/config.xml
CHANGED
@@ -6,8 +6,8 @@
|
|
6 |
* @category Mage
|
7 |
* @package FACTFinder_Campaigns
|
8 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
9 |
-
* @copyright Copyright (c)
|
10 |
-
* @license
|
11 |
* @link http://www.flagbit.de
|
12 |
*/
|
13 |
-->
|
6 |
* @category Mage
|
7 |
* @package FACTFinder_Campaigns
|
8 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
9 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
10 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
11 |
* @link http://www.flagbit.de
|
12 |
*/
|
13 |
-->
|
app/code/community/FACTFinder/Campaigns/etc/system.xml
CHANGED
@@ -6,8 +6,8 @@
|
|
6 |
* @category Mage
|
7 |
* @package FACTFinder_Campaigns
|
8 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
9 |
-
* @copyright Copyright (c)
|
10 |
-
* @license
|
11 |
* @link http://www.flagbit.de
|
12 |
*/
|
13 |
-->
|
6 |
* @category Mage
|
7 |
* @package FACTFinder_Campaigns
|
8 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
9 |
+
* @copyright Copyright (c) 2016, Flagbit GmbH & Co. KG
|
10 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
11 |
* @link http://www.flagbit.de
|
12 |
*/
|
13 |
-->
|
app/code/community/FACTFinder/Core/Block/Adminhtml/Exportlink.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Core
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*
|
12 |
*/
|
@@ -17,8 +17,8 @@
|
|
17 |
* @category Mage
|
18 |
* @package FACTFinder_Core
|
19 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
20 |
-
* @copyright Copyright (c)
|
21 |
-
* @license
|
22 |
* @link http://www.flagbit.de
|
23 |
*/
|
24 |
class FACTFinder_Core_Block_Adminhtml_Exportlink extends Mage_Adminhtml_Block_System_Config_Form_Field
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Core
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016 Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
* @link http://www.flagbit.de
|
11 |
*
|
12 |
*/
|
17 |
* @category Mage
|
18 |
* @package FACTFinder_Core
|
19 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
20 |
+
* @copyright Copyright (c) 2016 Flagbit GmbH & Co. KG (http://www.flagbit.de)
|
21 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
22 |
* @link http://www.flagbit.de
|
23 |
*/
|
24 |
class FACTFinder_Core_Block_Adminhtml_Exportlink extends Mage_Adminhtml_Block_System_Config_Form_Field
|
app/code/community/FACTFinder/Core/Block/Adminhtml/Form/Field/Attribute.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Core
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*
|
12 |
*/
|
@@ -17,8 +17,8 @@
|
|
17 |
* @category Mage
|
18 |
* @package FACTFinder_Core
|
19 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
20 |
-
* @copyright Copyright (c)
|
21 |
-
* @license
|
22 |
* @link http://www.flagbit.de
|
23 |
*/
|
24 |
class FACTFinder_Core_Block_Adminhtml_Form_Field_Attribute extends Mage_Core_Block_Html_Select
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Core
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016 Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
* @link http://www.flagbit.de
|
11 |
*
|
12 |
*/
|
17 |
* @category Mage
|
18 |
* @package FACTFinder_Core
|
19 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
20 |
+
* @copyright Copyright (c) 2016 Flagbit GmbH & Co. KG (http://www.flagbit.de)
|
21 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
22 |
* @link http://www.flagbit.de
|
23 |
*/
|
24 |
class FACTFinder_Core_Block_Adminhtml_Form_Field_Attribute extends Mage_Core_Block_Html_Select
|
app/code/community/FACTFinder/Core/Block/Adminhtml/Form/Field/Attributes.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Core
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*
|
12 |
*/
|
@@ -17,8 +17,8 @@
|
|
17 |
* @category Mage
|
18 |
* @package FACTFinder_Core
|
19 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
20 |
-
* @copyright Copyright (c)
|
21 |
-
* @license
|
22 |
* @link http://www.flagbit.de
|
23 |
*/
|
24 |
class FACTFinder_Core_Block_Adminhtml_Form_Field_Attributes
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Core
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016 Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
* @link http://www.flagbit.de
|
11 |
*
|
12 |
*/
|
17 |
* @category Mage
|
18 |
* @package FACTFinder_Core
|
19 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
20 |
+
* @copyright Copyright (c) 2016 Flagbit GmbH & Co. KG (http://www.flagbit.de)
|
21 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
22 |
* @link http://www.flagbit.de
|
23 |
*/
|
24 |
class FACTFinder_Core_Block_Adminhtml_Form_Field_Attributes
|
app/code/community/FACTFinder/Core/Block/Catalog/Product/List/Toolbar.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Core
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*
|
12 |
*/
|
@@ -17,12 +17,13 @@
|
|
17 |
* @category Mage
|
18 |
* @package FACTFinder_Core
|
19 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
20 |
-
* @copyright Copyright (c)
|
21 |
-
* @license
|
22 |
* @link http://www.flagbit.de
|
23 |
*/
|
24 |
class FACTFinder_Core_Block_Catalog_Product_List_Toolbar extends Mage_Catalog_Block_Product_List_Toolbar
|
25 |
{
|
|
|
26 |
|
27 |
/**
|
28 |
* @var bool
|
@@ -52,6 +53,17 @@ class FACTFinder_Core_Block_Catalog_Product_List_Toolbar extends Mage_Catalog_Bl
|
|
52 |
}
|
53 |
|
54 |
parent::_construct();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
}
|
56 |
|
57 |
|
@@ -64,27 +76,21 @@ class FACTFinder_Core_Block_Catalog_Product_List_Toolbar extends Mage_Catalog_Bl
|
|
64 |
*/
|
65 |
public function getPagerUrl($params=array())
|
66 |
{
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
$sortings = $this->_handler->getSorting();
|
71 |
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
} elseif (!isset($this->_sortings[$sortingId])) {
|
77 |
-
/** @var \FACTFinder\Data\Item $sorting */
|
78 |
-
foreach ($sortings as $sorting) {
|
79 |
-
$url = $sorting->getUrl();
|
80 |
-
if (strpos($url, $sortingId) !== false) {
|
81 |
-
$this->_sortings[$sortingId] = $sorting->getUrl();
|
82 |
-
break;
|
83 |
-
}
|
84 |
-
}
|
85 |
}
|
86 |
}
|
87 |
|
|
|
|
|
|
|
|
|
88 |
if (isset($this->_sortings[$sortingId])) {
|
89 |
return $this->_sortings[$sortingId];
|
90 |
} else {
|
@@ -100,8 +106,16 @@ class FACTFinder_Core_Block_Catalog_Product_List_Toolbar extends Mage_Catalog_Bl
|
|
100 |
*/
|
101 |
public function getLimitUrl($limit)
|
102 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
$params = array(
|
104 |
-
$this->getLimitVarName() => $limit
|
105 |
);
|
106 |
|
107 |
$query = http_build_query($params);
|
@@ -114,7 +128,7 @@ class FACTFinder_Core_Block_Catalog_Product_List_Toolbar extends Mage_Catalog_Bl
|
|
114 |
|
115 |
if (count($currentRequest) > 1) {
|
116 |
$params = array_pop($currentRequest);
|
117 |
-
$params = $this->_removeParam($params,
|
118 |
$params = $this->_removeParam($params, 'p');
|
119 |
|
120 |
$currentRequest = array_pop($currentRequest);
|
@@ -125,23 +139,27 @@ class FACTFinder_Core_Block_Catalog_Product_List_Toolbar extends Mage_Catalog_Bl
|
|
125 |
}
|
126 |
}
|
127 |
|
|
|
128 |
/**
|
129 |
* Uses a given base URL to remove subfolders from the current request path in case Magento is hosted in a
|
130 |
* subdirectory.
|
131 |
*
|
132 |
* @param string $fullPath The full request path.
|
133 |
-
* @param string $baseUrl
|
134 |
* @return string
|
135 |
*/
|
136 |
-
|
|
|
137 |
$basePath = parse_url($baseUrl, PHP_URL_PATH);
|
138 |
$pos = strpos($fullPath, $basePath);
|
139 |
if ($pos !== false) {
|
140 |
return substr_replace($fullPath, '', $pos, strlen($basePath));
|
141 |
}
|
|
|
142 |
return $fullPath;
|
143 |
}
|
144 |
|
|
|
145 |
/**
|
146 |
* Get sorting id
|
147 |
*
|
@@ -163,6 +181,28 @@ class FACTFinder_Core_Block_Catalog_Product_List_Toolbar extends Mage_Catalog_Bl
|
|
163 |
}
|
164 |
|
165 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
/**
|
167 |
* Get grit products sort order field
|
168 |
*
|
@@ -222,15 +262,20 @@ class FACTFinder_Core_Block_Catalog_Product_List_Toolbar extends Mage_Catalog_Bl
|
|
222 |
{
|
223 |
if ($this->_handler && $this->_handler->getSorting()) {
|
224 |
$sortings = $this->_handler->getSorting();
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
|
|
|
|
|
|
|
|
|
|
234 |
}
|
235 |
}
|
236 |
}
|
@@ -248,6 +293,13 @@ class FACTFinder_Core_Block_Catalog_Product_List_Toolbar extends Mage_Catalog_Bl
|
|
248 |
public function getDirectionVarName()
|
249 |
{
|
250 |
if ($this->_handler) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
251 |
return 'sort' . $this->getCurrentOrder();
|
252 |
}
|
253 |
|
@@ -277,4 +329,212 @@ class FACTFinder_Core_Block_Catalog_Product_List_Toolbar extends Mage_Catalog_Bl
|
|
277 |
}
|
278 |
|
279 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
280 |
}
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Core
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016 Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
* @link http://www.flagbit.de
|
11 |
*
|
12 |
*/
|
17 |
* @category Mage
|
18 |
* @package FACTFinder_Core
|
19 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
20 |
+
* @copyright Copyright (c) 2016 Flagbit GmbH & Co. KG (http://www.flagbit.de)
|
21 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
22 |
* @link http://www.flagbit.de
|
23 |
*/
|
24 |
class FACTFinder_Core_Block_Catalog_Product_List_Toolbar extends Mage_Catalog_Block_Product_List_Toolbar
|
25 |
{
|
26 |
+
const SORT_PARAM_PATTERN = 'sort([\w\-]*?)';
|
27 |
|
28 |
/**
|
29 |
* @var bool
|
53 |
}
|
54 |
|
55 |
parent::_construct();
|
56 |
+
|
57 |
+
// reset orders if we use the ones from FF
|
58 |
+
if ($this->_handler && Mage::helper('factfinder/search')->useSortings()) {
|
59 |
+
$this->_availableOrder = array();
|
60 |
+
$sortItems = $this->_handler->getSorting();
|
61 |
+
if ($sortItems != null) {
|
62 |
+
foreach ($sortItems as $item) {
|
63 |
+
$this->addOrderToAvailableOrders($item->getLabel(), $item->getLabel());
|
64 |
+
}
|
65 |
+
}
|
66 |
+
}
|
67 |
}
|
68 |
|
69 |
|
76 |
*/
|
77 |
public function getPagerUrl($params=array())
|
78 |
{
|
79 |
+
if (empty($this->_handler)) {
|
80 |
+
return parent::getPagerUrl($params);
|
81 |
+
}
|
|
|
82 |
|
83 |
+
if (Mage::helper('factfinder/search')->useSortings()) {
|
84 |
+
$sortingUrl = $this->getSortingUrl($params);
|
85 |
+
if ($sortingUrl) {
|
86 |
+
return $sortingUrl;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
}
|
88 |
}
|
89 |
|
90 |
+
$sortingId = $this->_getSortingId($params);
|
91 |
+
|
92 |
+
$this->initSortings($sortingId);
|
93 |
+
|
94 |
if (isset($this->_sortings[$sortingId])) {
|
95 |
return $this->_sortings[$sortingId];
|
96 |
} else {
|
106 |
*/
|
107 |
public function getLimitUrl($limit)
|
108 |
{
|
109 |
+
$limitUrl = null;
|
110 |
+
if ($this->_handler && Mage::helper('factfinder/search')->useResultsPerPageOptions()) {
|
111 |
+
$limitUrl = $this->getResultsPerPageOptionUrl($limit);
|
112 |
+
if ($limitUrl != null) {
|
113 |
+
return $limitUrl;
|
114 |
+
}
|
115 |
+
}
|
116 |
+
|
117 |
$params = array(
|
118 |
+
$this->getLimitVarName() => $limit
|
119 |
);
|
120 |
|
121 |
$query = http_build_query($params);
|
128 |
|
129 |
if (count($currentRequest) > 1) {
|
130 |
$params = array_pop($currentRequest);
|
131 |
+
$params = $this->_removeParam($params, $this->getLimitVarName());
|
132 |
$params = $this->_removeParam($params, 'p');
|
133 |
|
134 |
$currentRequest = array_pop($currentRequest);
|
139 |
}
|
140 |
}
|
141 |
|
142 |
+
|
143 |
/**
|
144 |
* Uses a given base URL to remove subfolders from the current request path in case Magento is hosted in a
|
145 |
* subdirectory.
|
146 |
*
|
147 |
* @param string $fullPath The full request path.
|
148 |
+
* @param string $baseUrl The base URL of the Magento installation.
|
149 |
* @return string
|
150 |
*/
|
151 |
+
protected function removeBasePathByBaseUrl($fullPath, $baseUrl)
|
152 |
+
{
|
153 |
$basePath = parse_url($baseUrl, PHP_URL_PATH);
|
154 |
$pos = strpos($fullPath, $basePath);
|
155 |
if ($pos !== false) {
|
156 |
return substr_replace($fullPath, '', $pos, strlen($basePath));
|
157 |
}
|
158 |
+
|
159 |
return $fullPath;
|
160 |
}
|
161 |
|
162 |
+
|
163 |
/**
|
164 |
* Get sorting id
|
165 |
*
|
181 |
}
|
182 |
|
183 |
|
184 |
+
/**
|
185 |
+
* Get sorting Url
|
186 |
+
*
|
187 |
+
* @param array $params
|
188 |
+
*
|
189 |
+
* @return bool|string
|
190 |
+
*/
|
191 |
+
protected function getSortingUrl($params)
|
192 |
+
{
|
193 |
+
if (isset($params[$this->getOrderVarName()])) {
|
194 |
+
$sortItems = $this->_handler->getSorting();
|
195 |
+
foreach ($sortItems as $sortItem) {
|
196 |
+
if ($params[$this->getOrderVarName()] == $sortItem->getLabel()) {
|
197 |
+
return $sortItem->getUrl();
|
198 |
+
}
|
199 |
+
}
|
200 |
+
}
|
201 |
+
|
202 |
+
return false;
|
203 |
+
}
|
204 |
+
|
205 |
+
|
206 |
/**
|
207 |
* Get grit products sort order field
|
208 |
*
|
262 |
{
|
263 |
if ($this->_handler && $this->_handler->getSorting()) {
|
264 |
$sortings = $this->_handler->getSorting();
|
265 |
+
if ($sortings != null) {
|
266 |
+
$this->getRequest()->getQuery();
|
267 |
+
/** @var \FACTFinder\Data\Item $sorting */
|
268 |
+
foreach ($sortings as $sorting) {
|
269 |
+
if ($sorting->isSelected()) {
|
270 |
+
if (Mage::helper('factfinder/search')->useSortings()) {
|
271 |
+
return $sorting->getLabel();
|
272 |
+
}
|
273 |
+
|
274 |
+
$url = $sorting->getUrl();
|
275 |
+
preg_match('/[\?|\&]{1}'.self::SORT_PARAM_PATTERN.'=/', $url, $matches);
|
276 |
+
if (isset($matches[1])) {
|
277 |
+
return $matches[1];
|
278 |
+
}
|
279 |
}
|
280 |
}
|
281 |
}
|
293 |
public function getDirectionVarName()
|
294 |
{
|
295 |
if ($this->_handler) {
|
296 |
+
if (Mage::helper('factfinder/search')->useSortings()) {
|
297 |
+
foreach ($this->getRequest()->getParams() as $key => $value) {
|
298 |
+
if (preg_match('/'.self::SORT_PARAM_PATTERN.'/', $key)) {
|
299 |
+
return $key;
|
300 |
+
}
|
301 |
+
}
|
302 |
+
}
|
303 |
return 'sort' . $this->getCurrentOrder();
|
304 |
}
|
305 |
|
329 |
}
|
330 |
|
331 |
|
332 |
+
/**
|
333 |
+
* Avoid resetting orders by magento if we should use ours
|
334 |
+
*
|
335 |
+
* @param array $orders
|
336 |
+
*
|
337 |
+
* @return $this
|
338 |
+
*/
|
339 |
+
public function setAvailableOrders($orders)
|
340 |
+
{
|
341 |
+
if (Mage::helper('factfinder/search')->useSortings()) {
|
342 |
+
return $this;
|
343 |
+
}
|
344 |
+
|
345 |
+
return parent::setAvailableOrders($orders);
|
346 |
+
}
|
347 |
+
|
348 |
+
|
349 |
+
/**
|
350 |
+
* Init sortings and map them according to parameters in the query
|
351 |
+
*
|
352 |
+
* @param string $sortingId
|
353 |
+
*
|
354 |
+
* @return $this
|
355 |
+
*/
|
356 |
+
protected function initSortings($sortingId)
|
357 |
+
{
|
358 |
+
if (!$sortingId || !$this->_handler) {
|
359 |
+
return $this;
|
360 |
+
}
|
361 |
+
|
362 |
+
$sortings = $this->_handler->getSorting();
|
363 |
+
|
364 |
+
// relevance default and has no directions
|
365 |
+
if ($sortingId == $this->_orderField) {
|
366 |
+
$sorting = $sortings[0];
|
367 |
+
$this->_sortings[$sortingId] = $sorting->getUrl();
|
368 |
+
} elseif (!isset($this->_sortings[$sortingId])) {
|
369 |
+
/** @var \FACTFinder\Data\Item $sorting */
|
370 |
+
foreach ($sortings as $sorting) {
|
371 |
+
$url = $sorting->getUrl();
|
372 |
+
if (strpos($url, $sortingId) !== false) {
|
373 |
+
$this->_sortings[$sortingId] = $sorting->getUrl();
|
374 |
+
break;
|
375 |
+
}
|
376 |
+
}
|
377 |
+
}
|
378 |
+
|
379 |
+
return $this;
|
380 |
+
}
|
381 |
+
|
382 |
+
|
383 |
+
/**
|
384 |
+
* Returns url model class name
|
385 |
+
*
|
386 |
+
* @return string
|
387 |
+
*/
|
388 |
+
protected function _getUrlModelClass()
|
389 |
+
{
|
390 |
+
return 'factfinder/url';
|
391 |
+
}
|
392 |
+
|
393 |
+
|
394 |
+
/**
|
395 |
+
* Retrieve Pager URL
|
396 |
+
*
|
397 |
+
* @param string $order
|
398 |
+
* @param string $direction
|
399 |
+
*
|
400 |
+
* @return string
|
401 |
+
*/
|
402 |
+
public function getOrderUrl($order, $direction)
|
403 |
+
{
|
404 |
+
if ($order === null
|
405 |
+
&& Mage::helper('factfinder/search')->useSortings()
|
406 |
+
&& $this->getRequest()->getParam($this->getDirectionVarName())
|
407 |
+
) {
|
408 |
+
// we use raw value since the one from magento doesn't use redirect url
|
409 |
+
$url = trim(Mage::getBaseUrl('web'), '/');
|
410 |
+
$request = $this->removeBasePathByBaseUrl($_SERVER['REQUEST_URI'], $url);
|
411 |
+
$request = preg_replace(
|
412 |
+
"/{$this->getDirectionVarName()}=([^&]+)/",
|
413 |
+
$this->getDirectionVarName() . '=' . $direction,
|
414 |
+
$request
|
415 |
+
);
|
416 |
+
return trim(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB), '/') . $request;
|
417 |
+
}
|
418 |
+
|
419 |
+
return parent::getOrderUrl($order, $direction);
|
420 |
+
}
|
421 |
+
|
422 |
+
|
423 |
+
/**
|
424 |
+
* Retrieve available results per page values from search response.
|
425 |
+
*
|
426 |
+
* @return array
|
427 |
+
*/
|
428 |
+
public function getAvailableLimit()
|
429 |
+
{
|
430 |
+
if ($this->_handler && Mage::helper('factfinder/search')->useResultsPerPageOptions()) {
|
431 |
+
$resultsPerPageOptions = $this->_handler->getResultsPerPageOptions();
|
432 |
+
if ($resultsPerPageOptions != null) {
|
433 |
+
/** @var \FACTFinder\Data\Item $resultsPerPageOptions */
|
434 |
+
foreach ($resultsPerPageOptions as $option) {
|
435 |
+
$this->_availableLimit[] = $option->getLabel();
|
436 |
+
}
|
437 |
+
}
|
438 |
+
}
|
439 |
+
|
440 |
+
if (!empty($this->_availableLimit)) {
|
441 |
+
return $this->_availableLimit;
|
442 |
+
}
|
443 |
+
|
444 |
+
return parent::getAvailableLimit();
|
445 |
+
}
|
446 |
+
|
447 |
+
|
448 |
+
/**
|
449 |
+
* Get specified results per page value.
|
450 |
+
*
|
451 |
+
* @return string
|
452 |
+
*/
|
453 |
+
public function getLimit()
|
454 |
+
{
|
455 |
+
if ($this->_handler && Mage::helper('factfinder/search')->useResultsPerPageOptions()) {
|
456 |
+
$currentLimit = $this->getRequest()->getParam($this->getLimitVarName());
|
457 |
+
if ($currentLimit == null && $this->_handler->getResultsPerPageOptions() != null) {
|
458 |
+
$currentLimit = $this->_handler->getResultsPerPageOptions()->getDefaultOption()->getLabel();
|
459 |
+
}
|
460 |
+
|
461 |
+
return $currentLimit;
|
462 |
+
}
|
463 |
+
|
464 |
+
return parent::getLimit();
|
465 |
+
}
|
466 |
+
|
467 |
+
|
468 |
+
/**
|
469 |
+
* Checks if the given results per page value is selected.
|
470 |
+
*
|
471 |
+
* @param string $limit
|
472 |
+
*
|
473 |
+
* @return bool
|
474 |
+
*/
|
475 |
+
public function isLimitCurrent($limit)
|
476 |
+
{
|
477 |
+
if ($this->_handler && Mage::helper('factfinder/search')->useResultsPerPageOptions()) {
|
478 |
+
return $this->getResultsPerPageOptionLabel($limit) == $this->getLimit();
|
479 |
+
}
|
480 |
+
|
481 |
+
return parent::isLimitCurrent($limit);
|
482 |
+
}
|
483 |
+
|
484 |
+
|
485 |
+
/**
|
486 |
+
* Returns the results per page value for a key.
|
487 |
+
*
|
488 |
+
* @param string $limit
|
489 |
+
*
|
490 |
+
* @return string
|
491 |
+
*/
|
492 |
+
protected function getResultsPerPageOptionLabel($limit)
|
493 |
+
{
|
494 |
+
$resultsPerPageOptions = $this->_handler->getResultsPerPageOptions();
|
495 |
+
if ($resultsPerPageOptions != null) {
|
496 |
+
if (isset($resultsPerPageOptions[$limit])) {
|
497 |
+
return $resultsPerPageOptions[$limit]->getLabel();
|
498 |
+
}
|
499 |
+
}
|
500 |
+
|
501 |
+
return $limit;
|
502 |
+
}
|
503 |
+
|
504 |
+
|
505 |
+
/**
|
506 |
+
* Returns the results per page url for a key.
|
507 |
+
*
|
508 |
+
* @param string $limit
|
509 |
+
*
|
510 |
+
* @return string
|
511 |
+
*/
|
512 |
+
protected function getResultsPerPageOptionUrl($limit)
|
513 |
+
{
|
514 |
+
$resultsPerPageOptions = $this->_handler->getResultsPerPageOptions();
|
515 |
+
if ($resultsPerPageOptions != null && isset($resultsPerPageOptions[$limit])) {
|
516 |
+
return $resultsPerPageOptions[$limit]->getUrl();
|
517 |
+
}
|
518 |
+
|
519 |
+
return null;
|
520 |
+
}
|
521 |
+
|
522 |
+
|
523 |
+
/**
|
524 |
+
* Returns the default results per page value.
|
525 |
+
*
|
526 |
+
* @return string
|
527 |
+
*/
|
528 |
+
public function getDefaultPerPageValue()
|
529 |
+
{
|
530 |
+
if ($this->_handler && Mage::helper('factfinder/search')->useResultsPerPageOptions()
|
531 |
+
&& $this->_handler->getResultsPerPageOptions() != null
|
532 |
+
) {
|
533 |
+
return $this->_handler->getResultsPerPageOptions()->getDefaultOption()->getLabel();
|
534 |
+
}
|
535 |
+
|
536 |
+
return parent::getDefaultPerPageValue();
|
537 |
+
}
|
538 |
+
|
539 |
+
|
540 |
}
|
app/code/community/FACTFinder/Core/Block/Catalog/Product/Pager.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Core
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*
|
12 |
*/
|
@@ -17,8 +17,8 @@
|
|
17 |
* @category Mage
|
18 |
* @package FACTFinder_Core
|
19 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
20 |
-
* @copyright Copyright (c)
|
21 |
-
* @license
|
22 |
* @link http://www.flagbit.de
|
23 |
*/
|
24 |
class FACTFinder_Core_Block_Catalog_Product_Pager extends Mage_Page_Block_Html_Pager
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Core
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016 Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
* @link http://www.flagbit.de
|
11 |
*
|
12 |
*/
|
17 |
* @category Mage
|
18 |
* @package FACTFinder_Core
|
19 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
20 |
+
* @copyright Copyright (c) 2016 Flagbit GmbH & Co. KG (http://www.flagbit.de)
|
21 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
22 |
* @link http://www.flagbit.de
|
23 |
*/
|
24 |
class FACTFinder_Core_Block_Catalog_Product_Pager extends Mage_Page_Block_Html_Pager
|
app/code/community/FACTFinder/Core/Block/CatalogSearch/Layer.php
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* View.php
|
4 |
+
*
|
5 |
+
* @category Mage
|
6 |
+
* @package FACTFinder_Core
|
7 |
+
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016 Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
+
* @link http://www.flagbit.de
|
11 |
+
*/
|
12 |
+
class FACTFinder_Core_Block_CatalogSearch_Layer extends Mage_CatalogSearch_Block_Layer
|
13 |
+
{
|
14 |
+
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Rewrite the block to prevent using default layer model
|
18 |
+
*
|
19 |
+
* @return FACTFinder_Core_Model_CatalogSearch_Layer|Mage_Catalog_Model_Layer
|
20 |
+
*/
|
21 |
+
public function getLayer()
|
22 |
+
{
|
23 |
+
if (Mage::helper('factfinder')->isEnabled()) {
|
24 |
+
return Mage::getSingleton('factfinder/catalogSearch_layer');
|
25 |
+
}
|
26 |
+
|
27 |
+
return parent::getLayer();
|
28 |
+
}
|
29 |
+
|
30 |
+
|
31 |
+
/**
|
32 |
+
* @return bool
|
33 |
+
*/
|
34 |
+
public function canShowBlock()
|
35 |
+
{
|
36 |
+
if (Mage::helper('factfinder')->isEnabled()) {
|
37 |
+
return (bool) $this->getLayer()->getProductCollection()->getSize();
|
38 |
+
}
|
39 |
+
|
40 |
+
return parent::canShowBlock();
|
41 |
+
}
|
42 |
+
|
43 |
+
|
44 |
+
}
|
app/code/community/FACTFinder/Core/Block/EnterpriseSearch/Layer.php
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* View.php
|
4 |
+
*
|
5 |
+
* @category Mage
|
6 |
+
* @package FACTFinder_Core
|
7 |
+
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016 Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
+
* @link http://www.flagbit.de
|
11 |
+
*/
|
12 |
+
class FACTFinder_Core_Block_EnterpriseSearch_Layer extends Enterprise_Search_Block_Catalogsearch_Layer
|
13 |
+
{
|
14 |
+
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Rewrite the block to prevent using default layer model
|
18 |
+
*
|
19 |
+
* @return FACTFinder_Core_Model_CatalogSearch_Layer|Mage_Catalog_Model_Layer
|
20 |
+
*/
|
21 |
+
public function getLayer()
|
22 |
+
{
|
23 |
+
if (Mage::helper('factfinder')->isEnabled()) {
|
24 |
+
return Mage::getSingleton('factfinder/catalogSearch_layer');
|
25 |
+
}
|
26 |
+
|
27 |
+
return parent::getLayer();
|
28 |
+
}
|
29 |
+
|
30 |
+
|
31 |
+
/**
|
32 |
+
* @return bool
|
33 |
+
*/
|
34 |
+
public function canShowBlock()
|
35 |
+
{
|
36 |
+
if (Mage::helper('factfinder')->isEnabled()) {
|
37 |
+
return (bool) $this->getLayer()->getProductCollection()->getSize();
|
38 |
+
}
|
39 |
+
|
40 |
+
return parent::canShowBlock();
|
41 |
+
}
|
42 |
+
|
43 |
+
|
44 |
+
}
|
app/code/community/FACTFinder/Core/Helper/Backend.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Core
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*
|
12 |
*/
|
@@ -19,8 +19,8 @@
|
|
19 |
* @category Mage
|
20 |
* @package FACTFinder_Core
|
21 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
22 |
-
* @copyright Copyright (c)
|
23 |
-
* @license
|
24 |
* @link http://www.flagbit.de
|
25 |
*/
|
26 |
class FACTFinder_Core_Helper_Backend extends Mage_Core_Helper_Abstract
|
@@ -179,10 +179,11 @@ class FACTFinder_Core_Helper_Backend extends Mage_Core_Helper_Abstract
|
|
179 |
* Check configuration data by contacting FACT-Finder servers.
|
180 |
*
|
181 |
* @param array $configData
|
|
|
182 |
*
|
183 |
* @return array
|
184 |
*/
|
185 |
-
public function checkConfigData($configData)
|
186 |
{
|
187 |
$dataArray = $this->_getCompleteFieldsetData($configData);
|
188 |
$data = new Varien_Object($dataArray);
|
@@ -202,7 +203,7 @@ class FACTFinder_Core_Helper_Backend extends Mage_Core_Helper_Abstract
|
|
202 |
}
|
203 |
|
204 |
if (count($errors) == 0) {
|
205 |
-
$checkStatusHandler = Mage::getSingleton('factfinder/handler_status', $
|
206 |
if (!$checkStatusHandler->checkStatus()) {
|
207 |
$errors = $checkStatusHandler->getErrorMessages();
|
208 |
}
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Core
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016 Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
* @link http://www.flagbit.de
|
11 |
*
|
12 |
*/
|
19 |
* @category Mage
|
20 |
* @package FACTFinder_Core
|
21 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
22 |
+
* @copyright Copyright (c) 2016 Flagbit GmbH & Co. KG (http://www.flagbit.de)
|
23 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
24 |
* @link http://www.flagbit.de
|
25 |
*/
|
26 |
class FACTFinder_Core_Helper_Backend extends Mage_Core_Helper_Abstract
|
179 |
* Check configuration data by contacting FACT-Finder servers.
|
180 |
*
|
181 |
* @param array $configData
|
182 |
+
* @param int $storeId
|
183 |
*
|
184 |
* @return array
|
185 |
*/
|
186 |
+
public function checkConfigData($configData, $storeId = 0)
|
187 |
{
|
188 |
$dataArray = $this->_getCompleteFieldsetData($configData);
|
189 |
$data = new Varien_Object($dataArray);
|
203 |
}
|
204 |
|
205 |
if (count($errors) == 0) {
|
206 |
+
$checkStatusHandler = Mage::getSingleton('factfinder/handler_status', array('store_id' => $storeId));
|
207 |
if (!$checkStatusHandler->checkStatus()) {
|
208 |
$errors = $checkStatusHandler->getErrorMessages();
|
209 |
}
|
app/code/community/FACTFinder/Core/Helper/Data.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Core
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*
|
12 |
*/
|
@@ -17,14 +17,16 @@
|
|
17 |
* @category Mage
|
18 |
* @package FACTFinder_Core
|
19 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
20 |
-
* @copyright Copyright (c)
|
21 |
-
* @license
|
22 |
* @link http://www.flagbit.de
|
23 |
*/
|
24 |
class FACTFinder_Core_Helper_Data extends Mage_Core_Helper_Abstract
|
25 |
{
|
26 |
|
27 |
const SKIP_FF_PARAM_NAME = 'skip_ff';
|
|
|
|
|
28 |
|
29 |
|
30 |
/**
|
@@ -36,7 +38,9 @@ class FACTFinder_Core_Helper_Data extends Mage_Core_Helper_Abstract
|
|
36 |
*/
|
37 |
public function isEnabled($feature = null)
|
38 |
{
|
39 |
-
if ($this->_getRequest()->getParam
|
|
|
|
|
40 |
return false;
|
41 |
}
|
42 |
|
@@ -76,35 +80,6 @@ class FACTFinder_Core_Helper_Data extends Mage_Core_Helper_Abstract
|
|
76 |
}
|
77 |
|
78 |
|
79 |
-
/**
|
80 |
-
* Update xml file in etc/modules according to backend config
|
81 |
-
* Return true, if the file was written and false if an error occurred
|
82 |
-
*
|
83 |
-
* @param string $module
|
84 |
-
* @param bool $isActive
|
85 |
-
*
|
86 |
-
* @return bool
|
87 |
-
*/
|
88 |
-
public function updateModuleState($module, $isActive = true)
|
89 |
-
{
|
90 |
-
$dir = Mage::getBaseDir('etc') . DS . 'modules' . DS;
|
91 |
-
$file = $dir . $module . '.xml';
|
92 |
-
|
93 |
-
if (!file_exists($file)) {
|
94 |
-
return;
|
95 |
-
}
|
96 |
-
|
97 |
-
$xml = new DOMDocument();
|
98 |
-
$xml->load($file);
|
99 |
-
foreach ($xml->getElementsByTagName('active') as $item) {
|
100 |
-
$item->nodeValue = $isActive ? 'true' : 'false';
|
101 |
-
}
|
102 |
-
|
103 |
-
// silencing is not good, but we only need the result of the operation
|
104 |
-
return (bool) @$xml->save($file);
|
105 |
-
}
|
106 |
-
|
107 |
-
|
108 |
/**
|
109 |
* Redirect to the same url but with the skip parameter
|
110 |
*
|
@@ -113,7 +88,7 @@ class FACTFinder_Core_Helper_Data extends Mage_Core_Helper_Abstract
|
|
113 |
public function performFallbackRedirect()
|
114 |
{
|
115 |
if (!$this->_getRequest()->getParam(self::SKIP_FF_PARAM_NAME)
|
116 |
-
&& Mage::getStoreConfig
|
117 |
) {
|
118 |
$url = Mage::helper('core/url')->getCurrentUrl();
|
119 |
$url .= strpos($url, '?') ? '&' : '?';
|
@@ -126,32 +101,15 @@ class FACTFinder_Core_Helper_Data extends Mage_Core_Helper_Abstract
|
|
126 |
|
127 |
|
128 |
/**
|
129 |
-
*
|
130 |
*
|
131 |
* @param null|int $storeId
|
132 |
*
|
133 |
-
* @return
|
134 |
*/
|
135 |
-
public function
|
136 |
{
|
137 |
-
return Mage::
|
138 |
-
}
|
139 |
-
|
140 |
-
|
141 |
-
/**
|
142 |
-
* Get list of channels for store
|
143 |
-
*
|
144 |
-
* @param null|int $storeId
|
145 |
-
*
|
146 |
-
* @return array
|
147 |
-
*/
|
148 |
-
public function getStoreChannels($storeId = null)
|
149 |
-
{
|
150 |
-
$primary = Mage::getStoreConfig('factfinder/search/channel', $storeId);
|
151 |
-
$secondary = Mage::getStoreConfig('factfinder/search/secondary_channels', $storeId);
|
152 |
-
$secondary = explode(';', $secondary);
|
153 |
-
|
154 |
-
return array_merge(array($primary), $secondary);
|
155 |
}
|
156 |
|
157 |
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Core
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
+
* @copyright Copyright (c) 2016 Flagbit GmbH & Co. KG
|
9 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
10 |
* @link http://www.flagbit.de
|
11 |
*
|
12 |
*/
|
17 |
* @category Mage
|
18 |
* @package FACTFinder_Core
|
19 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
20 |
+
* @copyright Copyright (c) 2016 Flagbit GmbH & Co. KG (http://www.flagbit.de)
|
21 |
+
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
|
22 |
* @link http://www.flagbit.de
|
23 |
*/
|
24 |
class FACTFinder_Core_Helper_Data extends Mage_Core_Helper_Abstract
|
25 |
{
|
26 |
|
27 |
const SKIP_FF_PARAM_NAME = 'skip_ff';
|
28 |
+
const USE_FALLBACK_CONFIG_PATH = 'factfinder/fallback/use_fallback';
|
29 |
+
const PRIMARY_CHANNEL_CONFIG_PATH = 'factfinder/search/channel';
|
30 |
|
31 |
|
32 |
/**
|
38 |
*/
|
39 |
public function isEnabled($feature = null)
|
40 |
{
|
41 |
+
if ($this->_getRequest()->getParam(self::SKIP_FF_PARAM_NAME)
|
42 |
+
&& Mage::getStoreConfig(self::USE_FALLBACK_CONFIG_PATH)
|
43 |
+
) {
|
44 |
return false;
|
45 |
}
|
46 |
|
80 |
}
|
81 |
|
82 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
/**
|
84 |
* Redirect to the same url but with the skip parameter
|
85 |
*
|
88 |
public function performFallbackRedirect()
|
89 |
{
|
90 |
if (!$this->_getRequest()->getParam(self::SKIP_FF_PARAM_NAME)
|
91 |
+
&& Mage::getStoreConfig(self::USE_FALLBACK_CONFIG_PATH)
|
92 |
) {
|
93 |
$url = Mage::helper('core/url')->getCurrentUrl();
|
94 |
$url .= strpos($url, '?') ? '&' : '?';
|
101 |
|
102 |
|
103 |
/**
|
104 |
+
* Get primary channel for store
|
105 |
*
|
106 |
* @param null|int $storeId
|
107 |
*
|
108 |
+
* @return string|null
|
109 |
*/
|
110 |
+
public function getPrimaryChannel($storeId = null)
|
111 |
{
|
112 |
+
return Mage::getStoreConfig(self::PRIMARY_CHANNEL_CONFIG_PATH, $storeId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
}
|
114 |
|
115 |
|
app/code/community/FACTFinder/Core/Helper/Debug.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
* @category Mage
|
6 |
* @package FACTFinder_Core
|
7 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
8 |
-
* @copyright Copyright (c)
|
9 |
-
* @license
|
10 |
* @link http://www.flagbit.de
|
11 |
*
|
12 |
*/
|
@@ -17,8 +17,8 @@
|
|
17 |
* @category Mage
|
18 |
* @package FACTFinder_Core
|
19 |
* @author Flagbit Magento Team <magento@flagbit.de>
|
20 |
-
* @copyright Copyright (c)
|
21 |
-
* @license
|
22 |
* @link http://www.flagbit.de
|
23 |
*/
|
24 |
class FACTFinder_Core_Helper_Debug extends Mage_Core_Helper_Abstract
|
@@ -89,17 +89,18 @@ class FACTFinder_Core_Helper_Debug extends Mage_Core_Helper_Abstract
|
|
89 |
* Debug Log to file var/log/factfinder.log
|
90 |
*
|