Version Notes
- added multisite functionnality
- added more logs
- fixed read action js error
Download this release
Release Info
Developer | Mathieu |
Extension | Affinity_Items |
Version | 1.1.4 |
Comparing to | |
See all releases |
Code changes from version 1.1.3 to 1.1.4
- app/code/local/AffinityEngine/AffinityItems/Block/Adminhtml/Affinityitems.php +37 -16
- app/code/local/AffinityEngine/AffinityItems/Helper/Aeadapter.php +73 -37
- app/code/local/AffinityEngine/AffinityItems/Helper/Data.php +68 -52
- app/code/local/AffinityEngine/AffinityItems/Model/Cart.php +3 -2
- app/code/local/AffinityEngine/AffinityItems/Model/CatProdRepo.php +3 -2
- app/code/local/AffinityEngine/AffinityItems/Model/Config.php +3 -0
- app/code/local/AffinityEngine/AffinityItems/Model/Cron.php +63 -31
- app/code/local/AffinityEngine/AffinityItems/Model/Log.php +18 -3
- app/code/local/AffinityEngine/AffinityItems/Model/Observer.php +93 -45
- app/code/local/AffinityEngine/AffinityItems/Model/Sdk/Core/Curl.php +6 -1
- app/code/local/AffinityEngine/AffinityItems/Model/Source/Loglevel.php +1 -0
- app/code/local/AffinityEngine/AffinityItems/Model/Sync/ActionSync.php +4 -4
- app/code/local/AffinityEngine/AffinityItems/Model/Sync/CategorySync.php +3 -3
- app/code/local/AffinityEngine/AffinityItems/Model/Sync/MemberSync.php +22 -22
- app/code/local/AffinityEngine/AffinityItems/Model/Sync/ProductSync.php +5 -7
- app/code/local/AffinityEngine/AffinityItems/Model/Sync/Sync.php +46 -21
- app/code/local/AffinityEngine/AffinityItems/Model/Syncrotate.php +10 -4
- app/code/local/AffinityEngine/AffinityItems/Model/System/Config/Source/Dropdown/Values.php +24 -0
- app/code/local/AffinityEngine/AffinityItems/controllers/ActionController.php +1 -1
- app/code/local/AffinityEngine/AffinityItems/controllers/Adminhtml/AffinityitemslogController.php +48 -15
- app/code/local/AffinityEngine/AffinityItems/controllers/Adminhtml/AjaxController.php +4 -2
- app/code/local/AffinityEngine/AffinityItems/etc/config.xml +147 -141
- app/code/local/AffinityEngine/AffinityItems/etc/system.xml +293 -284
- app/code/local/AffinityEngine/AffinityItems/sql/affinityitems_setup/mysql4-install-1.0.0.php +5 -1
- app/code/local/AffinityEngine/AffinityItems/sql/affinityitems_setup/mysql4-upgrade-1.1.3-1.1.4.php +29 -0
- app/design/adminhtml/default/default/template/affinityitems/affinityitems_login.phtml +35 -2
- app/design/adminhtml/default/default/template/affinityitems/affinityitems_sync.phtml +36 -3
- app/design/frontend/base/default/template/affinityengine/ae_js.phtml +2 -2
- app/design/frontend/base/default/template/affinityengine/horizontal.phtml +1 -1
- app/design/frontend/base/default/template/affinityengine/vertical.phtml +1 -1
- app/etc/modules/AffinityEngine_AffinityItems.xml +1 -1
- package.xml +8 -8
- skin/frontend/base/default/js/affinityitems/affinityitems.js +4 -4
app/code/local/AffinityEngine/AffinityItems/Block/Adminhtml/Affinityitems.php
CHANGED
@@ -1,21 +1,42 @@
|
|
1 |
<?php
|
2 |
|
|
|
3 |
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
-
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
-
|
10 |
-
$this->_blockGroup = "affinityitems";
|
11 |
-
$this->_headerText = Mage::helper("affinityitems")->__("Affinityitems Log Manager");
|
12 |
-
$this->_addButton('save_and_continue', array(
|
13 |
-
'label' => Mage::helper('adminhtml')->__('Clear Log'),
|
14 |
-
'onclick' => "setLocation('" . $this->getUrl('*/*/deleteall') . "')",
|
15 |
-
'class' => 'save',
|
16 |
-
), -100);
|
17 |
-
parent::__construct();
|
18 |
-
$this->_removeButton('add');
|
19 |
-
}
|
20 |
-
|
21 |
-
}
|
1 |
<?php
|
2 |
|
3 |
+
class AffinityEngine_AffinityItems_Block_Adminhtml_Affinityitems extends Mage_Adminhtml_Block_Widget_Grid_Container {
|
4 |
|
5 |
+
public function __construct() {
|
6 |
+
$logfile = Mage::getBaseDir('log') . '/AffinityDebug.log';
|
7 |
+
$this->_controller = "adminhtml_affinityitems";
|
8 |
+
$this->_blockGroup = "affinityitems";
|
9 |
+
$this->_headerText = Mage::helper("affinityitems")->__("Affinityitems Log Manager");
|
10 |
+
$this->_addButton('save_and_continue', array(
|
11 |
+
'label' => Mage::helper('adminhtml')->__('Clear Log'),
|
12 |
+
'onclick' => "setLocation('" . $this->getUrl('*/*/deleteall') . "')",
|
13 |
+
'class' => 'save',
|
14 |
+
), -100);
|
15 |
+
if (file_exists($logfile)) {
|
16 |
+
$this->_addButton('download_log', array(
|
17 |
+
'label' => Mage::helper('adminhtml')->__('Download AffinityDebug.log') . ' (' . $this->human_filesize() . ')',
|
18 |
+
'onclick' => "setLocation('" . $this->getUrl('*/*/downloadLog') . "')",
|
19 |
+
'class' => 'save',
|
20 |
+
), -200);
|
21 |
+
$this->_addButton('clear_log', array(
|
22 |
+
'label' => Mage::helper('adminhtml')->__('Clear AffinityDebug.log') . ' (' . $this->human_filesize() . ')',
|
23 |
+
'onclick' => "setLocation('" . $this->getUrl('*/*/clearLog') . "')",
|
24 |
+
'class' => 'save',
|
25 |
+
), -300);
|
26 |
+
}
|
27 |
+
parent::__construct();
|
28 |
+
$this->_removeButton('add');
|
29 |
+
}
|
30 |
|
31 |
+
private function human_filesize($decimals = 2) {
|
32 |
+
$logfile = Mage::getBaseDir('log') . '/AffinityDebug.log';
|
33 |
+
if (file_exists($logfile)) {
|
34 |
+
$bytes = filesize($logfile);
|
35 |
+
$sz = 'BKMGTP';
|
36 |
+
$factor = floor((strlen($bytes) - 1) / 3);
|
37 |
+
return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . @$sz[$factor];
|
38 |
+
}
|
39 |
+
return 'empty file';
|
40 |
+
}
|
41 |
|
42 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/AffinityEngine/AffinityItems/Helper/Aeadapter.php
CHANGED
@@ -2,40 +2,48 @@
|
|
2 |
|
3 |
class AffinityEngine_AffinityItems_Helper_Aeadapter extends Mage_Core_Helper_Abstract {
|
4 |
|
5 |
-
public function authentication($email, $password, $site_id, $security_key) {
|
6 |
$ae_config = new Mage_Core_Model_Config();
|
7 |
-
$ae_config->saveConfig('affinityitems/security/login', $email, '
|
8 |
-
$ae_config->saveConfig('affinityitems/security/password', 'empty', '
|
9 |
-
$ae_config->saveConfig('affinityitems/security/site_id', $site_id, '
|
10 |
-
$ae_config->saveConfig('affinityitems/security/key', $security_key, '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
}
|
12 |
|
13 |
public function getTestHost() {
|
14 |
return $this->getConfigFromDb('affinityitems/security/conf_test_host');
|
15 |
}
|
16 |
-
|
17 |
public function getProdHost() {
|
18 |
return $this->getConfigFromDb('affinityitems/security/conf_prod_host');
|
19 |
}
|
20 |
-
|
21 |
public function getPort() {
|
22 |
return $this->getConfigFromDb('affinityitems/security/conf_port');
|
23 |
}
|
24 |
|
25 |
public function getSiteId() {
|
26 |
-
return $this->getConfigFromDb('affinityitems/security/site_id');
|
27 |
}
|
28 |
|
29 |
public function getLogin() {
|
30 |
-
return $this->getConfigFromDb('affinityitems/security/login');
|
31 |
}
|
32 |
|
33 |
public function getPassowrd() {
|
34 |
-
return $this->getConfigFromDb('affinityitems/security/password');
|
35 |
}
|
36 |
|
37 |
public function getSecurityKey() {
|
38 |
-
return $this->getConfigFromDb('affinityitems/security/key');
|
39 |
}
|
40 |
|
41 |
public function getRegisterUrl() {
|
@@ -51,35 +59,63 @@ class AffinityEngine_AffinityItems_Helper_Aeadapter extends Mage_Core_Helper_Abs
|
|
51 |
}
|
52 |
|
53 |
public function checkSync($value = false) {
|
54 |
-
if (!$value)
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
|
|
|
|
|
|
|
|
78 |
return ($this->getConfigFromDb('affinityitems/general/dev_prod')) ? $this->getProdHost() : $this->getTestHost();
|
79 |
}
|
80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
public function getConfigFromDb($path = false) {
|
82 |
-
return ($path) ? Mage::getModel('affinityitems/config')->getValue($path) : false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
}
|
84 |
|
85 |
}
|
2 |
|
3 |
class AffinityEngine_AffinityItems_Helper_Aeadapter extends Mage_Core_Helper_Abstract {
|
4 |
|
5 |
+
public function authentication($email, $password, $site_id, $security_key, $website_id = 0) {
|
6 |
$ae_config = new Mage_Core_Model_Config();
|
7 |
+
$ae_config->saveConfig('affinityitems/security/' . $this->getAuthPrefix() . 'login', $email, 'websites', $website_id);
|
8 |
+
$ae_config->saveConfig('affinityitems/security/' . $this->getAuthPrefix() . 'password', 'empty', 'websites', $website_id);
|
9 |
+
$ae_config->saveConfig('affinityitems/security/' . $this->getAuthPrefix() . 'site_id', $site_id, 'websites', $website_id);
|
10 |
+
$ae_config->saveConfig('affinityitems/security/' . $this->getAuthPrefix() . 'key', $security_key, 'websites', $website_id);
|
11 |
+
}
|
12 |
+
|
13 |
+
public function getAuthPrefix() {
|
14 |
+
return ($this->getEnv()) ? 'prod_' : 'test_';
|
15 |
+
}
|
16 |
+
|
17 |
+
public function getEnv() {
|
18 |
+
return $this->getConfigFromDb('affinityitems/general/dev_prod');
|
19 |
}
|
20 |
|
21 |
public function getTestHost() {
|
22 |
return $this->getConfigFromDb('affinityitems/security/conf_test_host');
|
23 |
}
|
24 |
+
|
25 |
public function getProdHost() {
|
26 |
return $this->getConfigFromDb('affinityitems/security/conf_prod_host');
|
27 |
}
|
28 |
+
|
29 |
public function getPort() {
|
30 |
return $this->getConfigFromDb('affinityitems/security/conf_port');
|
31 |
}
|
32 |
|
33 |
public function getSiteId() {
|
34 |
+
return $this->getConfigFromDb('affinityitems/security/' . $this->getAuthPrefix() . 'site_id');
|
35 |
}
|
36 |
|
37 |
public function getLogin() {
|
38 |
+
return $this->getConfigFromDb('affinityitems/security/' . $this->getAuthPrefix() . 'login');
|
39 |
}
|
40 |
|
41 |
public function getPassowrd() {
|
42 |
+
return $this->getConfigFromDb('affinityitems/security/' . $this->getAuthPrefix() . 'password');
|
43 |
}
|
44 |
|
45 |
public function getSecurityKey() {
|
46 |
+
return $this->getConfigFromDb('affinityitems/security/' . $this->getAuthPrefix() . 'key');
|
47 |
}
|
48 |
|
49 |
public function getRegisterUrl() {
|
59 |
}
|
60 |
|
61 |
public function checkSync($value = false) {
|
62 |
+
if (!$value)
|
63 |
+
return false;
|
64 |
+
switch ($value) {
|
65 |
+
case 'categories':
|
66 |
+
return (count(Mage::getModel('affinityitems/sync_sync')->getCategoriesForSync()) > 0 || count(Mage::getModel('affinityitems/sync_sync')->getDeletedCategoriesForSync()) > 0) ? false : true;
|
67 |
+
break;
|
68 |
+
case 'products':
|
69 |
+
return (count(Mage::getModel('affinityitems/sync_sync')->getProductsForSync()) > 0 || count(Mage::getModel('affinityitems/sync_sync')->getDeletedProductsForSync()) > 0) ? false : true;
|
70 |
+
break;
|
71 |
+
case 'members':
|
72 |
+
return (count(Mage::getModel('affinityitems/sync_sync')->getMembersForSync()) > 0) ? false : true;
|
73 |
+
break;
|
74 |
+
case 'orders':
|
75 |
+
return (count(Mage::getModel('affinityitems/sync_sync')->getOrdersForSync()) > 0) ? false : true;
|
76 |
+
break;
|
77 |
+
case 'cart':
|
78 |
+
return (count(Mage::getModel('affinityitems/sync_sync')->getCartForSync()) > 0) ? false : true;
|
79 |
+
break;
|
80 |
+
case 'actions':
|
81 |
+
return (count(Mage::getModel('affinityitems/sync_sync')->getActionsForSync()) > 0) ? false : true;
|
82 |
+
break;
|
83 |
+
default:
|
84 |
+
return false;
|
85 |
+
break;
|
86 |
+
}
|
87 |
+
}
|
88 |
+
|
89 |
+
public function getHost() {
|
90 |
return ($this->getConfigFromDb('affinityitems/general/dev_prod')) ? $this->getProdHost() : $this->getTestHost();
|
91 |
}
|
92 |
+
|
93 |
+
public function getWebsiteId() {
|
94 |
+
if (Mage::app()->getRequest()->getParam('website_id')) {
|
95 |
+
return Mage::app()->getRequest()->getParam('website_id');
|
96 |
+
} elseif (Mage::registry('website_id')) {
|
97 |
+
return Mage::registry('website_id');
|
98 |
+
} elseif (!Mage::app()->getStore()->isAdmin() && Mage::getDesign()->getArea() != 'adminhtml') {
|
99 |
+
return Mage::app()->getWebsite()->getId();
|
100 |
+
}
|
101 |
+
return 0;
|
102 |
+
}
|
103 |
+
|
104 |
public function getConfigFromDb($path = false) {
|
105 |
+
return ($path) ? Mage::getModel('affinityitems/config')->getValue($path, $this->getWebsiteId()) : false;
|
106 |
+
}
|
107 |
+
|
108 |
+
public function getWebsiteIdByRootCategoryId($rootId) {
|
109 |
+
$update_query = "SELECT `website_id` FROM `" . Mage::getSingleton('core/resource')->getTableName('core_store_group') . "` WHERE `root_category_id` = '" . $rootId . "';";
|
110 |
+
$db_read = Mage::getSingleton('core/resource')->getConnection('affinityitems_read');
|
111 |
+
$result = $db_read->fetchOne($update_query);
|
112 |
+
return $result;
|
113 |
+
}
|
114 |
+
|
115 |
+
public function registerWebsiteId($website_id) {
|
116 |
+
Mage::unregister('website_id');
|
117 |
+
Mage::register('website_id', $website_id);
|
118 |
+
return;
|
119 |
}
|
120 |
|
121 |
}
|
app/code/local/AffinityEngine/AffinityItems/Helper/Data.php
CHANGED
@@ -33,27 +33,25 @@ class AffinityEngine_AffinityItems_Helper_Data extends Mage_Core_Helper_Abstract
|
|
33 |
$path = Mage::app()->getRequest()->getRouteName() . Mage::app()->getRequest()->getControllerName();
|
34 |
switch ($path) {
|
35 |
case 'cmsindex':
|
36 |
-
|
37 |
-
|
38 |
case 'catalogcategory':
|
39 |
-
|
40 |
-
|
41 |
case 'catalogproduct':
|
42 |
-
|
43 |
-
|
44 |
case 'checkoutcart':
|
45 |
-
|
46 |
-
|
47 |
case 'catalogsearchresult':
|
48 |
-
|
49 |
-
|
50 |
}
|
51 |
return 'category';
|
52 |
}
|
53 |
|
54 |
-
|
55 |
-
public function getExtensionVersion()
|
56 |
-
{
|
57 |
return (string) Mage::getConfig()->getNode()->modules->AffinityEngine_AffinityItems->version;
|
58 |
}
|
59 |
|
@@ -64,10 +62,10 @@ class AffinityEngine_AffinityItems_Helper_Data extends Mage_Core_Helper_Abstract
|
|
64 |
return (strpos($value, ',') !== false) ? explode(",", $value) : $value;
|
65 |
}
|
66 |
|
67 |
-
public function getGeneral($endPath = false) {
|
68 |
if (!$endPath)
|
69 |
return;
|
70 |
-
$value = Mage::getStoreConfig(self::XML_PATH . 'general/' . $endPath);
|
71 |
return $value;
|
72 |
}
|
73 |
|
@@ -147,14 +145,15 @@ class AffinityEngine_AffinityItems_Helper_Data extends Mage_Core_Helper_Abstract
|
|
147 |
$cats = $product->getCategoryIds();
|
148 |
$query = "
|
149 |
SELECT `request_path`
|
150 |
-
FROM `".Mage::getSingleton('core/resource')->getTableName('core_url_rewrite')."`
|
151 |
WHERE `product_id`='" . $product->getEntityId() . "'
|
152 |
AND `category_id`='" . end($cats) . "'
|
153 |
AND `store_id`='" . Mage::app()->getStore()->getId() . "';
|
154 |
";
|
155 |
$read = Mage::getSingleton('core/resource')->getConnection('affinityitems_read');
|
156 |
$result = $read->fetchRow($query);
|
157 |
-
if(!$result)
|
|
|
158 |
return Mage::getUrl('') . $result['request_path'];
|
159 |
}
|
160 |
// if it fails, than use failsafe way with category object loading
|
@@ -199,9 +198,9 @@ class AffinityEngine_AffinityItems_Helper_Data extends Mage_Core_Helper_Abstract
|
|
199 |
Mage::getModel('core/cookie')->set('aeguest', $aeguest, 630720000);
|
200 |
return;
|
201 |
}
|
202 |
-
|
203 |
-
public function isModuleEnabledAndRegistered() {
|
204 |
-
return (bool) Mage::helper('affinityitems/aeadapter')->isRegistered() && $this->
|
205 |
}
|
206 |
|
207 |
public function canDisplayProduct($product) {
|
@@ -209,12 +208,16 @@ class AffinityEngine_AffinityItems_Helper_Data extends Mage_Core_Helper_Abstract
|
|
209 |
return (bool) (!$product->getStatus() == 2 || $product->getVisibility() == 1 || $stock->getIsInStock() == 0 || count($product->getCategoryIds()) == 0 );
|
210 |
}
|
211 |
|
|
|
|
|
|
|
|
|
212 |
public function getIp() {
|
213 |
-
|
214 |
}
|
215 |
|
216 |
public function getMemberId() {
|
217 |
-
if(Mage::getSingleton('customer/session')->isLoggedIn()) {
|
218 |
$customerData = Mage::getSingleton('customer/session')->getCustomer();
|
219 |
return $customerData->getId();
|
220 |
} else {
|
@@ -225,59 +228,72 @@ class AffinityEngine_AffinityItems_Helper_Data extends Mage_Core_Helper_Abstract
|
|
225 |
public function getLang() {
|
226 |
return substr(Mage::app()->getLocale()->getLocaleCode(), 0, 2);
|
227 |
}
|
228 |
-
|
229 |
public function deleteCategorySync() {
|
|
|
|
|
230 |
$categories = Mage::getModel('catalog/category')->getCollection();
|
231 |
$categories->addIsActiveFilter()
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
|
|
237 |
$categories->setDataToAll('ae_sync', 0)->setDataToAll('observer', true)->setDataToAll('ae_sync_date', null)->save();
|
238 |
}
|
239 |
|
240 |
public function deleteProductSync() {
|
241 |
$products = Mage::getModel('catalog/product')->getCollection();
|
242 |
-
$products->addStoreFilter(
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
$products->addFieldToFilter('visibility', Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH);
|
249 |
$products->setDataToAll('ae_sync', 0)->setDataToAll('observer', true)->setDataToAll('ae_sync_date', null)->save();
|
250 |
}
|
251 |
|
252 |
public function deleteOrderSync() {
|
253 |
-
$
|
254 |
-
$
|
255 |
-
|
256 |
-
$
|
257 |
}
|
258 |
|
259 |
public function deleteMemberSync() {
|
260 |
-
|
261 |
-
|
262 |
-
|
|
|
263 |
array('attribute' => 'ae_sync', 'null' => false),
|
264 |
array('attribute' => 'ae_sync', 'eq' => 1),
|
265 |
-
|
266 |
-
|
|
|
267 |
}
|
268 |
|
269 |
public function deleteCartSync() {
|
270 |
-
$
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
}
|
275 |
|
276 |
public function deleteActionSync() {
|
277 |
-
$
|
278 |
-
|
279 |
-
|
280 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
281 |
}
|
282 |
|
283 |
-
}
|
33 |
$path = Mage::app()->getRequest()->getRouteName() . Mage::app()->getRequest()->getControllerName();
|
34 |
switch ($path) {
|
35 |
case 'cmsindex':
|
36 |
+
return "home";
|
37 |
+
break;
|
38 |
case 'catalogcategory':
|
39 |
+
return "category";
|
40 |
+
break;
|
41 |
case 'catalogproduct':
|
42 |
+
return "product";
|
43 |
+
break;
|
44 |
case 'checkoutcart':
|
45 |
+
return "cart";
|
46 |
+
break;
|
47 |
case 'catalogsearchresult':
|
48 |
+
return "search";
|
49 |
+
break;
|
50 |
}
|
51 |
return 'category';
|
52 |
}
|
53 |
|
54 |
+
public function getExtensionVersion() {
|
|
|
|
|
55 |
return (string) Mage::getConfig()->getNode()->modules->AffinityEngine_AffinityItems->version;
|
56 |
}
|
57 |
|
62 |
return (strpos($value, ',') !== false) ? explode(",", $value) : $value;
|
63 |
}
|
64 |
|
65 |
+
public function getGeneral($endPath = false, $websiteId = 0) {
|
66 |
if (!$endPath)
|
67 |
return;
|
68 |
+
$value = Mage::getStoreConfig(self::XML_PATH . 'general/' . $endPath, $websiteId);
|
69 |
return $value;
|
70 |
}
|
71 |
|
145 |
$cats = $product->getCategoryIds();
|
146 |
$query = "
|
147 |
SELECT `request_path`
|
148 |
+
FROM `" . Mage::getSingleton('core/resource')->getTableName('core_url_rewrite') . "`
|
149 |
WHERE `product_id`='" . $product->getEntityId() . "'
|
150 |
AND `category_id`='" . end($cats) . "'
|
151 |
AND `store_id`='" . Mage::app()->getStore()->getId() . "';
|
152 |
";
|
153 |
$read = Mage::getSingleton('core/resource')->getConnection('affinityitems_read');
|
154 |
$result = $read->fetchRow($query);
|
155 |
+
if (!$result)
|
156 |
+
throw new Exception('no record in db');
|
157 |
return Mage::getUrl('') . $result['request_path'];
|
158 |
}
|
159 |
// if it fails, than use failsafe way with category object loading
|
198 |
Mage::getModel('core/cookie')->set('aeguest', $aeguest, 630720000);
|
199 |
return;
|
200 |
}
|
201 |
+
|
202 |
+
public function isModuleEnabledAndRegistered($websiteId = 0) {
|
203 |
+
return (bool) Mage::helper('affinityitems/aeadapter')->isRegistered() && $this->getWebsiteConfig('general/enable', $websiteId);
|
204 |
}
|
205 |
|
206 |
public function canDisplayProduct($product) {
|
208 |
return (bool) (!$product->getStatus() == 2 || $product->getVisibility() == 1 || $stock->getIsInStock() == 0 || count($product->getCategoryIds()) == 0 );
|
209 |
}
|
210 |
|
211 |
+
public function getWebsiteConfig($path, $website_id) {
|
212 |
+
return Mage::app()->getWebsite($website_id)->getConfig(self::XML_PATH . $path);
|
213 |
+
}
|
214 |
+
|
215 |
public function getIp() {
|
216 |
+
return long2ip(Mage::helper('core/http')->getRemoteAddr(true));
|
217 |
}
|
218 |
|
219 |
public function getMemberId() {
|
220 |
+
if (Mage::getSingleton('customer/session')->isLoggedIn()) {
|
221 |
$customerData = Mage::getSingleton('customer/session')->getCustomer();
|
222 |
return $customerData->getId();
|
223 |
} else {
|
228 |
public function getLang() {
|
229 |
return substr(Mage::app()->getLocale()->getLocaleCode(), 0, 2);
|
230 |
}
|
231 |
+
|
232 |
public function deleteCategorySync() {
|
233 |
+
$store_id = Mage::getModel('affinityitems/sync_sync')->getStoreIdByWebsiteId();
|
234 |
+
$rootId = Mage::app()->getStore()->getRootCategoryId();
|
235 |
$categories = Mage::getModel('catalog/category')->getCollection();
|
236 |
$categories->addIsActiveFilter()
|
237 |
+
->addFieldToFilter('path', array('like' => "1/" . $rootId . "/%"))
|
238 |
+
->addAttributeToFilter(
|
239 |
+
array(
|
240 |
+
array('attribute' => 'ae_sync', 'null' => false),
|
241 |
+
array('attribute' => 'ae_sync', 'eq' => 1),
|
242 |
+
), '', 'left');
|
243 |
$categories->setDataToAll('ae_sync', 0)->setDataToAll('observer', true)->setDataToAll('ae_sync_date', null)->save();
|
244 |
}
|
245 |
|
246 |
public function deleteProductSync() {
|
247 |
$products = Mage::getModel('catalog/product')->getCollection();
|
248 |
+
$products->addStoreFilter(Mage::getModel('affinityitems/sync_sync')->getStoreIdByWebsiteId())
|
249 |
+
->addAttributeToFilter(
|
250 |
+
array(
|
251 |
+
array('attribute' => 'ae_sync', 'null' => false),
|
252 |
+
array('attribute' => 'ae_sync', 'eq' => 1),
|
253 |
+
), '', 'left');
|
254 |
$products->addFieldToFilter('visibility', Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH);
|
255 |
$products->setDataToAll('ae_sync', 0)->setDataToAll('observer', true)->setDataToAll('ae_sync_date', null)->save();
|
256 |
}
|
257 |
|
258 |
public function deleteOrderSync() {
|
259 |
+
$store_filter = (Mage::registry('website_id')) ? " WHERE `store_name` LIKE '%".Mage::app()->getWebsite(Mage::registry('website_id'))->getName()."%';" : ";";
|
260 |
+
$update_query = "UPDATE `" . Mage::getSingleton('core/resource')->getTableName('sales_flat_order') . "` SET `ae_sync`='0' ".$store_filter;
|
261 |
+
$db_write = Mage::getSingleton('core/resource')->getConnection('affinityitems_write');
|
262 |
+
$result = $db_write->query($update_query);
|
263 |
}
|
264 |
|
265 |
public function deleteMemberSync() {
|
266 |
+
$members = Mage::getModel('customer/customer')->getCollection();
|
267 |
+
$website_id = (Mage::registry('website_id')) ? Mage::registry('website_id') : 0;
|
268 |
+
$members->addAttributeToFilter(
|
269 |
+
array(
|
270 |
array('attribute' => 'ae_sync', 'null' => false),
|
271 |
array('attribute' => 'ae_sync', 'eq' => 1),
|
272 |
+
), '', 'left')
|
273 |
+
->addFieldToFilter('website_id', $website_id);
|
274 |
+
$members->setDataToAll('ae_sync', 0)->save();
|
275 |
}
|
276 |
|
277 |
public function deleteCartSync() {
|
278 |
+
$store_filter = (Mage::registry('website_id')) ? " WHERE `website_id` = '".Mage::registry('website_id')."';" : ";";
|
279 |
+
$update_query = "DELETE FROM `" . Mage::getSingleton('core/resource')->getTableName('ae_cart_repository') . "` ".$store_filter;
|
280 |
+
$db_write = Mage::getSingleton('core/resource')->getConnection('affinityitems_write');
|
281 |
+
$result = $db_write->query($update_query);
|
282 |
}
|
283 |
|
284 |
public function deleteActionSync() {
|
285 |
+
$store_filter = (Mage::registry('website_id')) ? " WHERE `website_id` = '".Mage::registry('website_id')."';" : ";";
|
286 |
+
$update_query = "DELETE FROM `" . Mage::getSingleton('core/resource')->getTableName('ae_guest_action_repository') . "` ".$store_filter;
|
287 |
+
$db_write = Mage::getSingleton('core/resource')->getConnection('affinityitems_write');
|
288 |
+
$result = $db_write->query($update_query);
|
289 |
+
}
|
290 |
+
|
291 |
+
public function deleteAllSync() {
|
292 |
+
$this->deleteCategorySync();
|
293 |
+
$this->deleteProductSync();
|
294 |
+
$this->deleteMemberSync();
|
295 |
+
$this->deleteCartSync();
|
296 |
+
$this->deleteActionSync();
|
297 |
}
|
298 |
|
299 |
+
}
|
app/code/local/AffinityEngine/AffinityItems/Model/Cart.php
CHANGED
@@ -6,7 +6,7 @@ class AffinityEngine_AffinityItems_Model_Cart extends Mage_Core_Model_Abstract {
|
|
6 |
$this->_init('affinityitems/cart');
|
7 |
}
|
8 |
|
9 |
-
public function cartrepo($id_cart, $id_product, $quantity, $action, $attributes = array(), $aeguestId, $aegroup, $ip, $aememberId = '', $language = '') {
|
10 |
|
11 |
$test=$this->setData(
|
12 |
array(
|
@@ -20,7 +20,8 @@ class AffinityEngine_AffinityItems_Model_Cart extends Mage_Core_Model_Abstract {
|
|
20 |
'aememberid' => $aememberId,
|
21 |
'aegroup' => $aegroup,
|
22 |
'language' => $language,
|
23 |
-
'ip' => $ip
|
|
|
24 |
)
|
25 |
)->save();
|
26 |
}
|
6 |
$this->_init('affinityitems/cart');
|
7 |
}
|
8 |
|
9 |
+
public function cartrepo($id_cart, $id_product, $quantity, $action, $attributes = array(), $aeguestId, $aegroup, $ip, $aememberId = '', $language = '', $websiteId = 0) {
|
10 |
|
11 |
$test=$this->setData(
|
12 |
array(
|
20 |
'aememberid' => $aememberId,
|
21 |
'aegroup' => $aegroup,
|
22 |
'language' => $language,
|
23 |
+
'ip' => $ip,
|
24 |
+
'website_id' => $websiteId
|
25 |
)
|
26 |
)->save();
|
27 |
}
|
app/code/local/AffinityEngine/AffinityItems/Model/CatProdRepo.php
CHANGED
@@ -6,12 +6,13 @@ class AffinityEngine_AffinityItems_Model_CatProdRepo extends Mage_Core_Model_Abs
|
|
6 |
$this->_init('affinityitems/catProdRepo');
|
7 |
}
|
8 |
|
9 |
-
public function addToCatProdRepo($obj_id, $obj_type) {
|
10 |
|
11 |
$test=$this->setData(
|
12 |
array(
|
13 |
'obj_id' => $obj_id,
|
14 |
-
'obj_type' => $obj_type
|
|
|
15 |
)
|
16 |
)->save();
|
17 |
}
|
6 |
$this->_init('affinityitems/catProdRepo');
|
7 |
}
|
8 |
|
9 |
+
public function addToCatProdRepo($obj_id, $obj_type, $websiteId) {
|
10 |
|
11 |
$test=$this->setData(
|
12 |
array(
|
13 |
'obj_id' => $obj_id,
|
14 |
+
'obj_type' => $obj_type,
|
15 |
+
'website_id' => $websiteId
|
16 |
)
|
17 |
)->save();
|
18 |
}
|
app/code/local/AffinityEngine/AffinityItems/Model/Config.php
CHANGED
@@ -3,6 +3,9 @@
|
|
3 |
class AffinityEngine_AffinityItems_Model_Config extends Mage_Core_Model_Abstract {
|
4 |
|
5 |
public function getValue($path, $storeId = 0) {
|
|
|
|
|
|
|
6 |
$query = "
|
7 |
SELECT `value`
|
8 |
FROM `" . Mage::getSingleton('core/resource')->getTableName('core_config_data') . "`
|
3 |
class AffinityEngine_AffinityItems_Model_Config extends Mage_Core_Model_Abstract {
|
4 |
|
5 |
public function getValue($path, $storeId = 0) {
|
6 |
+
$exclude = array('conf_test_host', 'conf_prod_host', 'conf_port', 'dev_port', 'dev_prod_rel');
|
7 |
+
$path_arr = explode('/', $path);
|
8 |
+
$storeId = (!in_array(end($path_arr), $exclude)) ? $storeId : 0;
|
9 |
$query = "
|
10 |
SELECT `value`
|
11 |
FROM `" . Mage::getSingleton('core/resource')->getTableName('core_config_data') . "`
|
app/code/local/AffinityEngine/AffinityItems/Model/Cron.php
CHANGED
@@ -14,8 +14,35 @@ class AffinityEngine_AffinityItems_Model_Cron {
|
|
14 |
$this->logger = Mage::getModel('affinityitems/log');
|
15 |
}
|
16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
public function Sync() {
|
18 |
-
|
|
|
|
|
|
|
19 |
$this->logger->log("[INFO]", "You are not logged in to Affinity, or extension is not enabled ! [" . time() . "]");
|
20 |
if ($this->isShell)
|
21 |
echo "You are not logged in to Affinity, or extension is not enabled !" . "\n";
|
@@ -30,24 +57,26 @@ class AffinityEngine_AffinityItems_Model_Cron {
|
|
30 |
if ($this->isShell)
|
31 |
echo "Setting locks" . "\n";
|
32 |
|
|
|
|
|
33 |
$this->indexProcess->lockAndBlock();
|
34 |
|
35 |
$sync_model = Mage::getModel('affinityitems/sync_sync');
|
36 |
$syncrotate_model = Mage::getModel('affinityitems/syncrotate');
|
37 |
-
$last_sync = (count($syncrotate_model->getCollection())) ? $syncrotate_model->getCollection()->getFirstItem()->getData('last_sync') : 'actions';
|
38 |
-
$initialsync = (count($syncrotate_model->getCollection())) ? (bool) $syncrotate_model->getCollection()->getFirstItem()->getData('initial_sync') : true;
|
39 |
-
$sync_count = $this->helper->getAdvanced('sync_count');
|
40 |
|
|
|
|
|
41 |
if ($initialsync) {
|
42 |
if ($this->isShell)
|
43 |
echo " - Initial sync in progress..." . "\n";
|
44 |
$this->logger->log("[INFO]", "Initial sync in progress...! [" . time() . "]");
|
45 |
}
|
46 |
-
|
47 |
$resyncRequest = new AffinityEngine_AffinityItems_Model_Sdk_Request_ResynchronizeRequest(array());
|
48 |
$elementList = $resyncRequest->get();
|
49 |
-
if(isset($elementList['synchro'])) {
|
50 |
-
if(is_array($elementList['synchro'])) {
|
51 |
foreach ($elementList['synchro'] as $element) {
|
52 |
if ($this->isShell)
|
53 |
echo " - Resync process " . ucfirst(strtolower($element)) . "..." . "\n";
|
@@ -75,55 +104,57 @@ class AffinityEngine_AffinityItems_Model_Cron {
|
|
75 |
}
|
76 |
}
|
77 |
|
78 |
-
if(isset($elementList['abRatio'])) {
|
79 |
-
Mage::getModel('core/config')->saveConfig('affinityitems/general/guest_percentage', ($elementList['abRatio']*100));
|
80 |
}
|
81 |
|
82 |
-
if(isset($elementList['trackingJs'])) {
|
83 |
-
Mage::getModel('core/config')->saveConfig('affinityitems/advanced/ae_tracking_js', (int)$elementList['trackingJs']);
|
84 |
}
|
85 |
-
|
86 |
if ((count($sync_model->getCategoriesForSync()) || count($sync_model->getDeletedCategoriesForSync())) && ($last_sync == 'actions' || $initialsync)) {
|
87 |
if ($this->isShell)
|
88 |
echo " - Syncing categories..." . "\n";
|
89 |
-
$
|
|
|
90 |
Mage::getModel('affinityitems/sync_categorySync')->syncCategories($sync_count, true); //new
|
91 |
Mage::getModel('affinityitems/sync_categorySync')->syncCategories($sync_count, false); //old
|
92 |
Mage::getModel('affinityitems/sync_categorySync')->syncDeletedCategories($sync_count);
|
93 |
-
|
94 |
} elseif ((count($sync_model->getProductsForSync()) || count($sync_model->getDeletedProductsForSync())) && ($last_sync == 'categories' || $initialsync)) {
|
95 |
if ($this->isShell)
|
96 |
echo " - Syncing products..." . "\n";
|
97 |
-
$
|
|
|
98 |
Mage::getModel('affinityitems/sync_productSync')->syncProducts($sync_count, true); //new
|
99 |
Mage::getModel('affinityitems/sync_productSync')->syncProducts($sync_count, false); //old
|
100 |
Mage::getModel('affinityitems/sync_productSync')->syncDeletedProducts($sync_count);
|
101 |
-
|
102 |
-
} elseif((count($sync_model->getMembersForSync())) && ($last_sync == 'products' || $initialsync)) {
|
103 |
if ($this->isShell)
|
104 |
echo " - Syncing members..." . "\n";
|
105 |
-
$
|
|
|
106 |
Mage::getModel('affinityitems/sync_memberSync')->syncMember($sync_count);
|
107 |
} elseif (count($sync_model->getOrdersForSync()) && ($last_sync == 'members' || $initialsync)) {
|
108 |
if ($this->isShell)
|
109 |
echo " - Syncing orders..." . "\n";
|
110 |
-
$
|
|
|
111 |
Mage::getModel('affinityitems/sync_orderSync')->syncOrders($sync_count);
|
112 |
} elseif (count($sync_model->getCartForSync()) && ($last_sync == 'orders' || $initialsync)) {
|
113 |
if ($this->isShell)
|
114 |
echo " - Syncing cart actions..." . "\n";
|
115 |
-
$
|
|
|
116 |
Mage::getModel('affinityitems/sync_CartActionSync')->syncCartActions($sync_count);
|
117 |
-
|
118 |
} elseif (count($sync_model->getActionsForSync()) && ($last_sync == 'cart' || $initialsync)) {
|
119 |
if ($this->isShell)
|
120 |
echo " - Syncing actions..." . "\n";
|
121 |
-
$
|
|
|
122 |
Mage::getModel('affinityitems/sync_ActionSync')->syncActions($sync_count);
|
123 |
-
|
124 |
} else {
|
125 |
if ($initialsync) {
|
126 |
-
$syncrotate_model->updInitial(0);
|
127 |
if ($this->isShell)
|
128 |
echo " - Initial sync finished..." . "\n";
|
129 |
$this->logger->log("[INFO]", "Initial sync finished...! [" . time() . "]");
|
@@ -132,29 +163,30 @@ class AffinityEngine_AffinityItems_Model_Cron {
|
|
132 |
echo " - Tried to sync " . $last_sync . "..." . "\n";
|
133 |
switch ($last_sync) {
|
134 |
case 'actions':
|
135 |
-
$syncrotate_model->upd('categories');
|
136 |
break;
|
137 |
case 'categories':
|
138 |
-
$syncrotate_model->upd('products');
|
139 |
break;
|
140 |
case 'products':
|
141 |
-
$syncrotate_model->upd('members');
|
142 |
break;
|
143 |
case 'members':
|
144 |
-
$syncrotate_model->upd('orders');
|
145 |
break;
|
146 |
case 'orders':
|
147 |
-
$syncrotate_model->upd('cart');
|
148 |
break;
|
149 |
case 'cart':
|
150 |
-
$syncrotate_model->upd('actions');
|
151 |
break;
|
152 |
}
|
153 |
}
|
154 |
if ($this->isShell)
|
155 |
echo "Removing locks" . "\n";
|
156 |
-
|
157 |
$this->indexProcess->unlock();
|
|
|
158 |
}
|
159 |
|
160 |
}
|
14 |
$this->logger = Mage::getModel('affinityitems/log');
|
15 |
}
|
16 |
|
17 |
+
public function getWebsiteForSync() {
|
18 |
+
//get all websites
|
19 |
+
$syncrotate_model = Mage::getModel('affinityitems/syncrotate');
|
20 |
+
$_websites = Mage::app()->getWebsites();
|
21 |
+
foreach ($_websites as $website) {
|
22 |
+
Mage::register('website_id', $website->getId());
|
23 |
+
if ($this->helper->isModuleEnabledAndRegistered($website->getId())) {
|
24 |
+
$syncrotate_model->updReg(1, $website->getId());
|
25 |
+
} else {
|
26 |
+
$syncrotate_model->updReg(0, $website->getId());
|
27 |
+
}
|
28 |
+
Mage::unregister('website_id');
|
29 |
+
}
|
30 |
+
$sync_website_collection = $syncrotate_model->getCollection();
|
31 |
+
foreach ($sync_website_collection as $sync_item) {
|
32 |
+
if ($sync_item->getInitalSync() && $sync_item->getWebsiteReg())
|
33 |
+
return $sync_item->getWebsiteId();
|
34 |
+
}
|
35 |
+
foreach ($sync_website_collection as $sync_item) {
|
36 |
+
if ($sync_item->getWebsiteReg())
|
37 |
+
return $sync_item->getWebsiteId();
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
public function Sync() {
|
42 |
+
$website_id = $this->getWebsiteForSync();
|
43 |
+
$this->logger->log("[INFO]", "AE Cron start for website ". $website_id ." [" . time() . "]");
|
44 |
+
Mage::register('website_id', $website_id);
|
45 |
+
if (!$this->helper->isModuleEnabledAndRegistered($website_id)) {
|
46 |
$this->logger->log("[INFO]", "You are not logged in to Affinity, or extension is not enabled ! [" . time() . "]");
|
47 |
if ($this->isShell)
|
48 |
echo "You are not logged in to Affinity, or extension is not enabled !" . "\n";
|
57 |
if ($this->isShell)
|
58 |
echo "Setting locks" . "\n";
|
59 |
|
60 |
+
$this->logger->log("[INFO]", "Setting locks [" . time() . "]");
|
61 |
+
|
62 |
$this->indexProcess->lockAndBlock();
|
63 |
|
64 |
$sync_model = Mage::getModel('affinityitems/sync_sync');
|
65 |
$syncrotate_model = Mage::getModel('affinityitems/syncrotate');
|
66 |
+
$last_sync = (count($syncrotate_model->getCollection())) ? $syncrotate_model->getCollection()->addFieldToFilter('website_id', $website_id)->getFirstItem()->getData('last_sync') : 'actions';
|
67 |
+
$initialsync = (count($syncrotate_model->getCollection())) ? (bool) $syncrotate_model->getCollection()->addFieldToFilter('website_id', $website_id)->getFirstItem()->getData('initial_sync') : true;
|
|
|
68 |
|
69 |
+
$sync_count = $this->helper->getAdvanced('sync_count');
|
70 |
+
|
71 |
if ($initialsync) {
|
72 |
if ($this->isShell)
|
73 |
echo " - Initial sync in progress..." . "\n";
|
74 |
$this->logger->log("[INFO]", "Initial sync in progress...! [" . time() . "]");
|
75 |
}
|
|
|
76 |
$resyncRequest = new AffinityEngine_AffinityItems_Model_Sdk_Request_ResynchronizeRequest(array());
|
77 |
$elementList = $resyncRequest->get();
|
78 |
+
if (isset($elementList['synchro'])) {
|
79 |
+
if (is_array($elementList['synchro'])) {
|
80 |
foreach ($elementList['synchro'] as $element) {
|
81 |
if ($this->isShell)
|
82 |
echo " - Resync process " . ucfirst(strtolower($element)) . "..." . "\n";
|
104 |
}
|
105 |
}
|
106 |
|
107 |
+
if (isset($elementList['abRatio'])) {
|
108 |
+
Mage::getModel('core/config')->saveConfig('affinityitems/general/guest_percentage', ($elementList['abRatio'] * 100));
|
109 |
}
|
110 |
|
111 |
+
if (isset($elementList['trackingJs'])) {
|
112 |
+
Mage::getModel('core/config')->saveConfig('affinityitems/advanced/ae_tracking_js', (int) $elementList['trackingJs']);
|
113 |
}
|
114 |
+
|
115 |
if ((count($sync_model->getCategoriesForSync()) || count($sync_model->getDeletedCategoriesForSync())) && ($last_sync == 'actions' || $initialsync)) {
|
116 |
if ($this->isShell)
|
117 |
echo " - Syncing categories..." . "\n";
|
118 |
+
$this->logger->log("[INFO]", "Syncing categories... [" . time() . "]");
|
119 |
+
$syncrotate_model->upd('categories', $website_id);
|
120 |
Mage::getModel('affinityitems/sync_categorySync')->syncCategories($sync_count, true); //new
|
121 |
Mage::getModel('affinityitems/sync_categorySync')->syncCategories($sync_count, false); //old
|
122 |
Mage::getModel('affinityitems/sync_categorySync')->syncDeletedCategories($sync_count);
|
|
|
123 |
} elseif ((count($sync_model->getProductsForSync()) || count($sync_model->getDeletedProductsForSync())) && ($last_sync == 'categories' || $initialsync)) {
|
124 |
if ($this->isShell)
|
125 |
echo " - Syncing products..." . "\n";
|
126 |
+
$this->logger->log("[INFO]", "Syncing products... [" . time() . "]");
|
127 |
+
$syncrotate_model->upd('products', $website_id);
|
128 |
Mage::getModel('affinityitems/sync_productSync')->syncProducts($sync_count, true); //new
|
129 |
Mage::getModel('affinityitems/sync_productSync')->syncProducts($sync_count, false); //old
|
130 |
Mage::getModel('affinityitems/sync_productSync')->syncDeletedProducts($sync_count);
|
131 |
+
} elseif ((count($sync_model->getMembersForSync())) && ($last_sync == 'products' || $initialsync)) {
|
|
|
132 |
if ($this->isShell)
|
133 |
echo " - Syncing members..." . "\n";
|
134 |
+
$this->logger->log("[INFO]", "Syncing members... [" . time() . "]");
|
135 |
+
$syncrotate_model->upd('members', $website_id);
|
136 |
Mage::getModel('affinityitems/sync_memberSync')->syncMember($sync_count);
|
137 |
} elseif (count($sync_model->getOrdersForSync()) && ($last_sync == 'members' || $initialsync)) {
|
138 |
if ($this->isShell)
|
139 |
echo " - Syncing orders..." . "\n";
|
140 |
+
$this->logger->log("[INFO]", "Syncing orders... [" . time() . "]");
|
141 |
+
$syncrotate_model->upd('orders', $website_id);
|
142 |
Mage::getModel('affinityitems/sync_orderSync')->syncOrders($sync_count);
|
143 |
} elseif (count($sync_model->getCartForSync()) && ($last_sync == 'orders' || $initialsync)) {
|
144 |
if ($this->isShell)
|
145 |
echo " - Syncing cart actions..." . "\n";
|
146 |
+
$this->logger->log("[INFO]", "Syncing cart actions... [" . time() . "]");
|
147 |
+
$syncrotate_model->upd('cart', $website_id);
|
148 |
Mage::getModel('affinityitems/sync_CartActionSync')->syncCartActions($sync_count);
|
|
|
149 |
} elseif (count($sync_model->getActionsForSync()) && ($last_sync == 'cart' || $initialsync)) {
|
150 |
if ($this->isShell)
|
151 |
echo " - Syncing actions..." . "\n";
|
152 |
+
$this->logger->log("[INFO]", "Syncing actions... [" . time() . "]");
|
153 |
+
$syncrotate_model->upd('actions', $website_id);
|
154 |
Mage::getModel('affinityitems/sync_ActionSync')->syncActions($sync_count);
|
|
|
155 |
} else {
|
156 |
if ($initialsync) {
|
157 |
+
$syncrotate_model->updInitial(0, $website_id);
|
158 |
if ($this->isShell)
|
159 |
echo " - Initial sync finished..." . "\n";
|
160 |
$this->logger->log("[INFO]", "Initial sync finished...! [" . time() . "]");
|
163 |
echo " - Tried to sync " . $last_sync . "..." . "\n";
|
164 |
switch ($last_sync) {
|
165 |
case 'actions':
|
166 |
+
$syncrotate_model->upd('categories', $website_id);
|
167 |
break;
|
168 |
case 'categories':
|
169 |
+
$syncrotate_model->upd('products', $website_id);
|
170 |
break;
|
171 |
case 'products':
|
172 |
+
$syncrotate_model->upd('members', $website_id);
|
173 |
break;
|
174 |
case 'members':
|
175 |
+
$syncrotate_model->upd('orders', $website_id);
|
176 |
break;
|
177 |
case 'orders':
|
178 |
+
$syncrotate_model->upd('cart', $website_id);
|
179 |
break;
|
180 |
case 'cart':
|
181 |
+
$syncrotate_model->upd('actions', $website_id);
|
182 |
break;
|
183 |
}
|
184 |
}
|
185 |
if ($this->isShell)
|
186 |
echo "Removing locks" . "\n";
|
187 |
+
$this->logger->log("[INFO]", "Removing locks... [" . time() . "]");
|
188 |
$this->indexProcess->unlock();
|
189 |
+
$this->logger->log("[INFO]", "AE Cron stop [" . time() . "]");
|
190 |
}
|
191 |
|
192 |
}
|
app/code/local/AffinityEngine/AffinityItems/Model/Log.php
CHANGED
@@ -7,9 +7,24 @@ class AffinityEngine_AffinityItems_Model_Log extends Mage_Core_Model_Abstract {
|
|
7 |
}
|
8 |
|
9 |
public function log($severity, $message) {
|
10 |
-
$log_level = Mage::getStoreConfig('affinityitems/developer/log_level');
|
11 |
-
if ($log_level == '0' || ($log_level == '1' && $severity != "[INFO]") || ($log_level == '2' && $severity != "[ERROR]"))
|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
}
|
14 |
|
15 |
}
|
7 |
}
|
8 |
|
9 |
public function log($severity, $message) {
|
10 |
+
$log_level = Mage::getStoreConfig('affinityitems/developer/log_level', 0);
|
11 |
+
if ($log_level == '0' || ($log_level == '1' && $severity != "[INFO]") || ($log_level == '2' && $severity != "[ERROR]") || ($log_level != '4' && $severity == "[DEBUG]"))
|
12 |
+
return;
|
13 |
+
if ($log_level == 4) {
|
14 |
+
switch ($severity) {
|
15 |
+
case '[INFO]':
|
16 |
+
$ll = 6;
|
17 |
+
break;
|
18 |
+
case '[ERROR]':
|
19 |
+
$ll = 3;
|
20 |
+
break;
|
21 |
+
default:
|
22 |
+
$ll = 7;
|
23 |
+
}
|
24 |
+
Mage::log($message, $ll, 'AffinityDebug.log', true);
|
25 |
+
} else {
|
26 |
+
$this->setData(array('date_add' => new Zend_Db_Expr('NOW()'), 'severity' => $severity, 'message' => $message))->save();
|
27 |
+
}
|
28 |
}
|
29 |
|
30 |
}
|
app/code/local/AffinityEngine/AffinityItems/Model/Observer.php
CHANGED
@@ -6,11 +6,14 @@ class AffinityEngine_AffinityItems_Model_Observer {
|
|
6 |
$this->logger = Mage::getModel('affinityitems/log');
|
7 |
$this->cookie = Mage::getModel('core/cookie');
|
8 |
$this->helper = Mage::helper('affinityitems');
|
|
|
9 |
$this->aegroups = array("A", "B");
|
10 |
}
|
11 |
|
12 |
public function addToCart($observer) {
|
13 |
-
|
|
|
|
|
14 |
if ($this->cookie->get('aeguest') && in_array($this->cookie->get('aegroup'), $this->aegroups)) {
|
15 |
$cart_repo_model = Mage::getModel("affinityitems/cart");
|
16 |
$options = $observer->getProduct()->getTypeInstance(true)->getOrderOptions($observer->getProduct());
|
@@ -37,7 +40,7 @@ class AffinityEngine_AffinityItems_Model_Observer {
|
|
37 |
|
38 |
if (!Mage::getModel('affinityitems/sync_cartActionSync')->syncCartFromObserver($action)) {
|
39 |
$cart_repo_model->cartrepo(
|
40 |
-
$action->getIdCart(), $action->getIdProduct(), $action->getQuantity(), $action->getAction(), $attribute_ids, $action->getAeguestid(), $action->getAegroup(), $action->getIp(), $action->getAememberid(), $action->getLanguage());
|
41 |
}
|
42 |
|
43 |
|
@@ -55,7 +58,9 @@ class AffinityEngine_AffinityItems_Model_Observer {
|
|
55 |
}
|
56 |
|
57 |
public function updateCart($observer) {
|
58 |
-
|
|
|
|
|
59 |
if ($aeguestId = $this->cookie->get('aeguest') && in_array($this->cookie->get('aegroup'), $this->aegroups)) {
|
60 |
$cart = Mage::getModel('checkout/cart')->getQuote();
|
61 |
$cart_repo_model = Mage::getModel("affinityitems/cart");
|
@@ -89,7 +94,7 @@ class AffinityEngine_AffinityItems_Model_Observer {
|
|
89 |
|
90 |
if (!Mage::getModel('affinityitems/sync_cartActionSync')->syncCartFromObserver($action)) {
|
91 |
$cart_repo_model->cartrepo(
|
92 |
-
$action->getIdCart(), $action->getIdProduct(), $action->getQuantity(), $action->getAction(), $attribute_ids, $action->getAeguestid(), $action->getAegroup(), $action->getIp(), $action->getAememberid(), $action->getLanguage());
|
93 |
}
|
94 |
}
|
95 |
}
|
@@ -110,7 +115,9 @@ class AffinityEngine_AffinityItems_Model_Observer {
|
|
110 |
}
|
111 |
|
112 |
public function updateProductCart($observer) {
|
113 |
-
|
|
|
|
|
114 |
if ($aeguestId = $this->cookie->get('aeguest') && in_array($this->cookie->get('aegroup'), $this->aegroups)) {
|
115 |
$cart_repo_model = Mage::getModel("affinityitems/cart");
|
116 |
|
@@ -142,7 +149,7 @@ class AffinityEngine_AffinityItems_Model_Observer {
|
|
142 |
|
143 |
if (!Mage::getModel('affinityitems/sync_cartActionSync')->syncCartFromObserver($action)) {
|
144 |
$cart_repo_model->cartrepo(
|
145 |
-
$action->getIdCart(), $action->getIdProduct(), $action->getQuantity(), $action->getAction(), $attribute_ids, $action->getAeguestid(), $action->getAegroup(), $action->getIp(), $action->getAememberid(), $action->getLanguage());
|
146 |
}
|
147 |
break;
|
148 |
}
|
@@ -163,7 +170,9 @@ class AffinityEngine_AffinityItems_Model_Observer {
|
|
163 |
}
|
164 |
|
165 |
public function removeFromCart($observer) {
|
166 |
-
|
|
|
|
|
167 |
if ($aeguestId = $this->cookie->get('aeguest') && in_array($this->cookie->get('aegroup'), $this->aegroups)) {
|
168 |
$options = $observer->getQuoteItem()->getProduct()->getTypeInstance(true)->getOrderOptions($observer->getQuoteItem()->getProduct());
|
169 |
$attribute_ids = array();
|
@@ -198,32 +207,47 @@ class AffinityEngine_AffinityItems_Model_Observer {
|
|
198 |
|
199 |
if (!Mage::getModel('affinityitems/sync_cartActionSync')->syncCartFromObserver($action)) {
|
200 |
$cart_repo_model->cartrepo(
|
201 |
-
$action->getIdCart(), $action->getIdProduct(), $action->getQuantity(), $action->getAction(), $attribute_ids, $action->getAeguestid(), $action->getAegroup(), $action->getIp(), $action->getAememberid(), $action->getLanguage());
|
202 |
}
|
203 |
}
|
204 |
}
|
205 |
}
|
206 |
|
207 |
public function saveProduct($observer) {
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
|
|
|
|
|
|
|
|
212 |
}
|
213 |
}
|
214 |
}
|
215 |
|
216 |
public function saveCategory($observer) {
|
217 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
if (!$observer->getData('data_object')->getData('observer')) {
|
219 |
if (!Mage::getModel('affinityitems/sync_categorySync')->syncCategoryFromObserver($observer->getData('data_object')->getData('entity_id')))
|
220 |
$observer->getData('data_object')->setData('ae_sync', 0);
|
221 |
}
|
222 |
}
|
223 |
}
|
224 |
-
|
225 |
public function saveOrder($observer) {
|
226 |
-
|
|
|
|
|
|
|
227 |
if (!$observer->getData('data_object')->getData('observer')) {
|
228 |
if (!Mage::getModel('affinityitems/sync_orderSync')->syncOrderFromObserver($observer->getData('data_object')->getData('entity_id'))) {
|
229 |
$observer->getData('data_object')->setData('ae_sync', 0);
|
@@ -237,7 +261,9 @@ class AffinityEngine_AffinityItems_Model_Observer {
|
|
237 |
}
|
238 |
|
239 |
public function checkCookie($observer) {
|
240 |
-
|
|
|
|
|
241 |
if (!$this->helper->isAdmin()) {
|
242 |
if (!$this->cookie->get('aeguest') || $force = Mage::app()->getRequest()->getParam('aeabtesting')) {
|
243 |
$this->helper->generateGuest();
|
@@ -252,7 +278,9 @@ class AffinityEngine_AffinityItems_Model_Observer {
|
|
252 |
}
|
253 |
|
254 |
public function login($params) {
|
255 |
-
|
|
|
|
|
256 |
if (!$this->helper->isAdmin()) {
|
257 |
if ($this->cookie->get('aeguest') && $customer = Mage::getSingleton('customer/session')->isLoggedIn()) {
|
258 |
try {
|
@@ -274,7 +302,9 @@ class AffinityEngine_AffinityItems_Model_Observer {
|
|
274 |
}
|
275 |
|
276 |
public function updateHosts(Varien_Event_Observer $observer) {
|
277 |
-
|
|
|
|
|
278 |
if ($this->detectEnviromentChange())
|
279 |
return false;
|
280 |
$ips = unserialize(Mage::getStoreConfig('affinityitems/advanced/server_ip'));
|
@@ -295,7 +325,9 @@ class AffinityEngine_AffinityItems_Model_Observer {
|
|
295 |
if (Mage::getStoreConfig('affinityitems/general/dev_prod') <> Mage::getStoreConfig('affinityitems/general/dev_prod_rel')) {
|
296 |
$ae_config = new Mage_Core_Model_Config();
|
297 |
$ae_config->saveConfig('affinityitems/general/dev_prod_rel', Mage::getStoreConfig('affinityitems/general/dev_prod'), 'default', 0);
|
298 |
-
|
|
|
|
|
299 |
$this->logger->log('[INFO]', 'Enviroment changed, login info removed, need to login again to AffinityEngine server');
|
300 |
Mage::getSingleton('adminhtml/session')->addSuccess('Enviroment changed, login info removed, need to login again to AffinityEngine server');
|
301 |
return true;
|
@@ -304,37 +336,53 @@ class AffinityEngine_AffinityItems_Model_Observer {
|
|
304 |
}
|
305 |
|
306 |
public function deleteCategory($observer) {
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
319 |
}
|
320 |
}
|
321 |
}
|
322 |
|
323 |
public function deleteProduct($observer) {
|
324 |
-
|
325 |
-
$
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
$
|
335 |
-
|
336 |
-
|
337 |
-
|
|
|
|
|
|
|
|
|
338 |
}
|
339 |
}
|
340 |
}
|
6 |
$this->logger = Mage::getModel('affinityitems/log');
|
7 |
$this->cookie = Mage::getModel('core/cookie');
|
8 |
$this->helper = Mage::helper('affinityitems');
|
9 |
+
$this->aehelper = Mage::helper('affinityitems/aeadapter');
|
10 |
$this->aegroups = array("A", "B");
|
11 |
}
|
12 |
|
13 |
public function addToCart($observer) {
|
14 |
+
$website_id = Mage::app()->getWebsite()->getId();
|
15 |
+
$this->aehelper->registerWebsiteId($website_id);
|
16 |
+
if ($this->helper->isModuleEnabledAndRegistered($website_id)) {
|
17 |
if ($this->cookie->get('aeguest') && in_array($this->cookie->get('aegroup'), $this->aegroups)) {
|
18 |
$cart_repo_model = Mage::getModel("affinityitems/cart");
|
19 |
$options = $observer->getProduct()->getTypeInstance(true)->getOrderOptions($observer->getProduct());
|
40 |
|
41 |
if (!Mage::getModel('affinityitems/sync_cartActionSync')->syncCartFromObserver($action)) {
|
42 |
$cart_repo_model->cartrepo(
|
43 |
+
$action->getIdCart(), $action->getIdProduct(), $action->getQuantity(), $action->getAction(), $attribute_ids, $action->getAeguestid(), $action->getAegroup(), $action->getIp(), $action->getAememberid(), $action->getLanguage(), $this->aehelper->getWebsiteId());
|
44 |
}
|
45 |
|
46 |
|
58 |
}
|
59 |
|
60 |
public function updateCart($observer) {
|
61 |
+
$website_id = Mage::app()->getWebsite()->getId();
|
62 |
+
$this->aehelper->registerWebsiteId($website_id);
|
63 |
+
if ($this->helper->isModuleEnabledAndRegistered($website_id)) {
|
64 |
if ($aeguestId = $this->cookie->get('aeguest') && in_array($this->cookie->get('aegroup'), $this->aegroups)) {
|
65 |
$cart = Mage::getModel('checkout/cart')->getQuote();
|
66 |
$cart_repo_model = Mage::getModel("affinityitems/cart");
|
94 |
|
95 |
if (!Mage::getModel('affinityitems/sync_cartActionSync')->syncCartFromObserver($action)) {
|
96 |
$cart_repo_model->cartrepo(
|
97 |
+
$action->getIdCart(), $action->getIdProduct(), $action->getQuantity(), $action->getAction(), $attribute_ids, $action->getAeguestid(), $action->getAegroup(), $action->getIp(), $action->getAememberid(), $action->getLanguage(), $this->aehelper->getWebsiteId());
|
98 |
}
|
99 |
}
|
100 |
}
|
115 |
}
|
116 |
|
117 |
public function updateProductCart($observer) {
|
118 |
+
$website_id = Mage::app()->getWebsite()->getId();
|
119 |
+
$this->aehelper->registerWebsiteId($website_id);
|
120 |
+
if ($this->helper->isModuleEnabledAndRegistered($website_id)) {
|
121 |
if ($aeguestId = $this->cookie->get('aeguest') && in_array($this->cookie->get('aegroup'), $this->aegroups)) {
|
122 |
$cart_repo_model = Mage::getModel("affinityitems/cart");
|
123 |
|
149 |
|
150 |
if (!Mage::getModel('affinityitems/sync_cartActionSync')->syncCartFromObserver($action)) {
|
151 |
$cart_repo_model->cartrepo(
|
152 |
+
$action->getIdCart(), $action->getIdProduct(), $action->getQuantity(), $action->getAction(), $attribute_ids, $action->getAeguestid(), $action->getAegroup(), $action->getIp(), $action->getAememberid(), $action->getLanguage(), $this->aehelper->getWebsiteId());
|
153 |
}
|
154 |
break;
|
155 |
}
|
170 |
}
|
171 |
|
172 |
public function removeFromCart($observer) {
|
173 |
+
$website_id = Mage::app()->getWebsite()->getId();
|
174 |
+
$this->aehelper->registerWebsiteId($website_id);
|
175 |
+
if ($this->helper->isModuleEnabledAndRegistered($website_id)) {
|
176 |
if ($aeguestId = $this->cookie->get('aeguest') && in_array($this->cookie->get('aegroup'), $this->aegroups)) {
|
177 |
$options = $observer->getQuoteItem()->getProduct()->getTypeInstance(true)->getOrderOptions($observer->getQuoteItem()->getProduct());
|
178 |
$attribute_ids = array();
|
207 |
|
208 |
if (!Mage::getModel('affinityitems/sync_cartActionSync')->syncCartFromObserver($action)) {
|
209 |
$cart_repo_model->cartrepo(
|
210 |
+
$action->getIdCart(), $action->getIdProduct(), $action->getQuantity(), $action->getAction(), $attribute_ids, $action->getAeguestid(), $action->getAegroup(), $action->getIp(), $action->getAememberid(), $action->getLanguage(), $this->aehelper->getWebsiteId());
|
211 |
}
|
212 |
}
|
213 |
}
|
214 |
}
|
215 |
|
216 |
public function saveProduct($observer) {
|
217 |
+
foreach ($observer->getData('data_object')->getData('website_ids') as $website_id) {
|
218 |
+
$this->aehelper->registerWebsiteId($website_id);
|
219 |
+
|
220 |
+
if ($this->helper->isModuleEnabledAndRegistered($website_id)) {
|
221 |
+
if (!$observer->getData('data_object')->getData('observer')) {
|
222 |
+
if (!Mage::getModel('affinityitems/sync_productSync')->syncProductFromObserver($observer->getData('data_object')->getData('entity_id')))
|
223 |
+
$observer->getData('data_object')->setData('ae_sync', 0);
|
224 |
+
}
|
225 |
}
|
226 |
}
|
227 |
}
|
228 |
|
229 |
public function saveCategory($observer) {
|
230 |
+
// trying to find website id by Root Id of category
|
231 |
+
$rootId = explode('/', $observer->getData('data_object')->getData('path'));
|
232 |
+
if (isset($rootId[1])) {
|
233 |
+
$website_id = $this->aehelper->getWebsiteIdByRootCategoryId($rootId[1]);
|
234 |
+
} else {
|
235 |
+
return;
|
236 |
+
}
|
237 |
+
$this->aehelper->registerWebsiteId($website_id);
|
238 |
+
if ($this->helper->isModuleEnabledAndRegistered($website_id)) {
|
239 |
if (!$observer->getData('data_object')->getData('observer')) {
|
240 |
if (!Mage::getModel('affinityitems/sync_categorySync')->syncCategoryFromObserver($observer->getData('data_object')->getData('entity_id')))
|
241 |
$observer->getData('data_object')->setData('ae_sync', 0);
|
242 |
}
|
243 |
}
|
244 |
}
|
245 |
+
|
246 |
public function saveOrder($observer) {
|
247 |
+
$website_id = Mage::app()->getWebsite()->getId();
|
248 |
+
if ($website_id == 0) return;
|
249 |
+
$this->aehelper->registerWebsiteId($website_id);
|
250 |
+
if ($this->helper->isModuleEnabledAndRegistered($website_id)) {
|
251 |
if (!$observer->getData('data_object')->getData('observer')) {
|
252 |
if (!Mage::getModel('affinityitems/sync_orderSync')->syncOrderFromObserver($observer->getData('data_object')->getData('entity_id'))) {
|
253 |
$observer->getData('data_object')->setData('ae_sync', 0);
|
261 |
}
|
262 |
|
263 |
public function checkCookie($observer) {
|
264 |
+
$website_id = Mage::app()->getWebsite()->getId();
|
265 |
+
$this->aehelper->registerWebsiteId($website_id);
|
266 |
+
if ($this->helper->isModuleEnabledAndRegistered($website_id)) {
|
267 |
if (!$this->helper->isAdmin()) {
|
268 |
if (!$this->cookie->get('aeguest') || $force = Mage::app()->getRequest()->getParam('aeabtesting')) {
|
269 |
$this->helper->generateGuest();
|
278 |
}
|
279 |
|
280 |
public function login($params) {
|
281 |
+
$website_id = Mage::app()->getWebsite()->getId();
|
282 |
+
$this->aehelper->registerWebsiteId($website_id);
|
283 |
+
if ($this->helper->isModuleEnabledAndRegistered($website_id)) {
|
284 |
if (!$this->helper->isAdmin()) {
|
285 |
if ($this->cookie->get('aeguest') && $customer = Mage::getSingleton('customer/session')->isLoggedIn()) {
|
286 |
try {
|
302 |
}
|
303 |
|
304 |
public function updateHosts(Varien_Event_Observer $observer) {
|
305 |
+
$website_id = Mage::app()->getWebsite()->getId();
|
306 |
+
$this->aehelper->registerWebsiteId($website_id);
|
307 |
+
if ($this->helper->isModuleEnabledAndRegistered($website_id)) {
|
308 |
if ($this->detectEnviromentChange())
|
309 |
return false;
|
310 |
$ips = unserialize(Mage::getStoreConfig('affinityitems/advanced/server_ip'));
|
325 |
if (Mage::getStoreConfig('affinityitems/general/dev_prod') <> Mage::getStoreConfig('affinityitems/general/dev_prod_rel')) {
|
326 |
$ae_config = new Mage_Core_Model_Config();
|
327 |
$ae_config->saveConfig('affinityitems/general/dev_prod_rel', Mage::getStoreConfig('affinityitems/general/dev_prod'), 'default', 0);
|
328 |
+
// No need to remove user / pass, from v1.1.5 it is saved per website
|
329 |
+
// Mage::helper('affinityitems/aeadapter')->authentication('', '', '', '');
|
330 |
+
$this->helper->deleteAllSync();
|
331 |
$this->logger->log('[INFO]', 'Enviroment changed, login info removed, need to login again to AffinityEngine server');
|
332 |
Mage::getSingleton('adminhtml/session')->addSuccess('Enviroment changed, login info removed, need to login again to AffinityEngine server');
|
333 |
return true;
|
336 |
}
|
337 |
|
338 |
public function deleteCategory($observer) {
|
339 |
+
$categoryId = $observer->getData('category')->getData('entity_id');
|
340 |
+
$category = Mage::getModel('catalog/category')->load($categoryId);
|
341 |
+
$categoryIds = $category->getPathIds();
|
342 |
+
|
343 |
+
$stores = Mage::getModel('core/store')->getCollection()->loadByCategoryIds($categoryIds);
|
344 |
+
|
345 |
+
$websiteIds = array_unique($stores->getColumnValues('website_id'));
|
346 |
+
|
347 |
+
foreach ($websiteIds as $websiteId) {
|
348 |
+
$this->aehelper->registerWebsiteId($websiteId);
|
349 |
+
|
350 |
+
if ($this->helper->isModuleEnabledAndRegistered($websiteId)) {
|
351 |
+
$cid = $observer->getData('category')->getData('entity_id');
|
352 |
+
$category = new stdClass();
|
353 |
+
$category->categoryId = $cid;
|
354 |
+
|
355 |
+
$request = new AffinityEngine_AffinityItems_Model_Sdk_Request_CategoryRequest($category);
|
356 |
+
$response = $request->delete();
|
357 |
+
if ($response) {
|
358 |
+
$this->logger->log('[INFO]', 'Delete category: (ID:' . $cid . ') [' . time() . ']');
|
359 |
+
} else {
|
360 |
+
$this->logger->log('[ERROR]', 'Delete category: (ID:' . $cid . ') [' . time() . ']');
|
361 |
+
Mage::getModel("affinityitems/catProdRepo")->addToCatProdRepo($cid, 'category', $this->aehelper->getWebsiteId());
|
362 |
+
}
|
363 |
}
|
364 |
}
|
365 |
}
|
366 |
|
367 |
public function deleteProduct($observer) {
|
368 |
+
foreach ($observer->getData('data_object')->getWebsiteIds() as $websiteId) {
|
369 |
+
$this->aehelper->registerWebsiteId($websiteId);
|
370 |
+
|
371 |
+
if ($this->helper->isModuleEnabledAndRegistered($websiteId)) {
|
372 |
+
$pid = $observer->getData('data_object')->getData('entity_id');
|
373 |
+
if ($observer->getData('data_object')->getData('type_id') == 'simple' && $observer->getData('data_object')->getData('visibility') == 1)
|
374 |
+
return;
|
375 |
+
$aeproduct = new stdClass();
|
376 |
+
$aeproduct->productId = $pid;
|
377 |
+
$request = new AffinityEngine_AffinityItems_Model_Sdk_Request_ProductRequest($aeproduct);
|
378 |
+
$response = $request->delete();
|
379 |
+
|
380 |
+
if ($response) {
|
381 |
+
$this->logger->log('[INFO]', 'Delete product: (ID:' . $pid . ') [' . time() . ']');
|
382 |
+
} else {
|
383 |
+
$this->logger->log('[ERROR]', 'Delete product: (ID:' . $pid . ') [' . time() . ']');
|
384 |
+
Mage::getModel("affinityitems/catProdRepo")->addToCatProdRepo($pid, 'product', $this->aehelper->getWebsiteId());
|
385 |
+
}
|
386 |
}
|
387 |
}
|
388 |
}
|
app/code/local/AffinityEngine/AffinityItems/Model/Sdk/Core/Curl.php
CHANGED
@@ -83,7 +83,12 @@ class AffinityEngine_AffinityItems_Model_Sdk_Core_Curl {
|
|
83 |
var_dump($vars);
|
84 |
var_dump($return); // for shell debugging only
|
85 |
}
|
86 |
-
|
|
|
|
|
|
|
|
|
|
|
87 |
curl_close($curl);
|
88 |
|
89 |
try {
|
83 |
var_dump($vars);
|
84 |
var_dump($return); // for shell debugging only
|
85 |
}
|
86 |
+
// if DEBUG logging is enabled
|
87 |
+
Mage::getModel('affinityitems/log')->log("[DEBUG]", "--- Variables sent to server ---");
|
88 |
+
Mage::getModel('affinityitems/log')->log("[DEBUG]", $vars);
|
89 |
+
Mage::getModel('affinityitems/log')->log("[DEBUG]", "--- Server response ---");
|
90 |
+
Mage::getModel('affinityitems/log')->log("[DEBUG]", $return);
|
91 |
+
|
92 |
curl_close($curl);
|
93 |
|
94 |
try {
|
app/code/local/AffinityEngine/AffinityItems/Model/Source/Loglevel.php
CHANGED
@@ -9,6 +9,7 @@ class AffinityEngine_AffinityItems_Model_Source_Loglevel
|
|
9 |
array('value'=>1, 'label'=>Mage::helper('affinityitems')->__('[INFO]')),
|
10 |
array('value'=>2, 'label'=>Mage::helper('affinityitems')->__('[ERROR]')),
|
11 |
array('value'=>3, 'label'=>Mage::helper('affinityitems')->__('[INFO] & [ERROR]')),
|
|
|
12 |
);
|
13 |
}
|
14 |
|
9 |
array('value'=>1, 'label'=>Mage::helper('affinityitems')->__('[INFO]')),
|
10 |
array('value'=>2, 'label'=>Mage::helper('affinityitems')->__('[ERROR]')),
|
11 |
array('value'=>3, 'label'=>Mage::helper('affinityitems')->__('[INFO] & [ERROR]')),
|
12 |
+
array('value'=>4, 'label'=>Mage::helper('affinityitems')->__('[DEBUG]')),
|
13 |
);
|
14 |
}
|
15 |
|
app/code/local/AffinityEngine/AffinityItems/Model/Sync/ActionSync.php
CHANGED
@@ -37,10 +37,10 @@ class AffinityEngine_AffinityItems_Model_Sync_ActionSync extends AffinityEngine_
|
|
37 |
foreach ($actions as $action) {
|
38 |
try {
|
39 |
Mage::getModel('affinityitems/action')->setId($action->getId())->delete();
|
40 |
-
|
41 |
} catch (Exception $e) {
|
42 |
$this->logger->log('[ERROR]', $e->getMessage());
|
43 |
-
|
44 |
}
|
45 |
}
|
46 |
} else {
|
@@ -79,10 +79,10 @@ class AffinityEngine_AffinityItems_Model_Sync_ActionSync extends AffinityEngine_
|
|
79 |
$this->logger->log('[ERROR]', $e->getMessage());
|
80 |
}
|
81 |
}
|
82 |
-
|
83 |
return true;
|
84 |
} else {
|
85 |
-
|
86 |
return false;
|
87 |
}
|
88 |
return false;
|
37 |
foreach ($actions as $action) {
|
38 |
try {
|
39 |
Mage::getModel('affinityitems/action')->setId($action->getId())->delete();
|
40 |
+
//$this->logger->log('[INFO]', 'Synchronize action : ' . $action->getAction() . '[' . time() . ']');
|
41 |
} catch (Exception $e) {
|
42 |
$this->logger->log('[ERROR]', $e->getMessage());
|
43 |
+
//$this->logger->log('[ERROR]', 'Synchronize action : ' . $action->getAction() . '[' . time() . ']');
|
44 |
}
|
45 |
}
|
46 |
} else {
|
79 |
$this->logger->log('[ERROR]', $e->getMessage());
|
80 |
}
|
81 |
}
|
82 |
+
//$this->logger->log('[INFO]', 'Synchronize action: ' . $action->getAction() . '[' . time() . ']');
|
83 |
return true;
|
84 |
} else {
|
85 |
+
//$this->logger->log('[ERROR]', 'Synchronize action: ' . $action->getAction() . '[' . time() . ']');
|
86 |
return false;
|
87 |
}
|
88 |
return false;
|
app/code/local/AffinityEngine/AffinityItems/Model/Sync/CategorySync.php
CHANGED
@@ -42,7 +42,7 @@ class AffinityEngine_AffinityItems_Model_Sync_CategorySync extends AffinityEngin
|
|
42 |
|
43 |
if ($response) {
|
44 |
foreach ($categoryList as $category) {
|
45 |
-
$cat = Mage::getModel('catalog/category')->
|
46 |
try {
|
47 |
$cat->setData('ae_sync', 1)->setData('observer', true)->setData('ae_sync_date', date("Y-m-d H:i:s"))->save();
|
48 |
$this->logger->log('[INFO]', 'Synchronize category: ' . $cat->getName() . ' (ID:' . $cat->getId() . ') [' . time() . ']');
|
@@ -98,7 +98,7 @@ class AffinityEngine_AffinityItems_Model_Sync_CategorySync extends AffinityEngin
|
|
98 |
public function syncCategoryFromObserver($cat_id = false) {
|
99 |
if (!$cat_id)
|
100 |
return false;
|
101 |
-
$cat = Mage::getModel('catalog/category')->setStoreId(
|
102 |
$is_new = (bool) $cat->getAeSyncDate();
|
103 |
$category = new stdClass();
|
104 |
$category->categoryId = (int) $cat->getId();
|
@@ -114,7 +114,7 @@ class AffinityEngine_AffinityItems_Model_Sync_CategorySync extends AffinityEngin
|
|
114 |
}
|
115 |
|
116 |
if ($response) {
|
117 |
-
|
118 |
try {
|
119 |
$cat->setData('ae_sync', 1)->setData('observer', true)->setData('ae_sync_date', date("Y-m-d H:i:s"))->save();
|
120 |
$this->logger->log('[INFO]', 'Synchronize category: ' . $cat->getName() . ' (ID:' . $cat->getId() . ') [' . time() . ']');
|
42 |
|
43 |
if ($response) {
|
44 |
foreach ($categoryList as $category) {
|
45 |
+
$cat = Mage::getModel('catalog/category')->load($category->categoryId);
|
46 |
try {
|
47 |
$cat->setData('ae_sync', 1)->setData('observer', true)->setData('ae_sync_date', date("Y-m-d H:i:s"))->save();
|
48 |
$this->logger->log('[INFO]', 'Synchronize category: ' . $cat->getName() . ' (ID:' . $cat->getId() . ') [' . time() . ']');
|
98 |
public function syncCategoryFromObserver($cat_id = false) {
|
99 |
if (!$cat_id)
|
100 |
return false;
|
101 |
+
$cat = Mage::getModel('catalog/category')->setStoreId($this->getStoreIdByWebsiteId())->load($cat_id);
|
102 |
$is_new = (bool) $cat->getAeSyncDate();
|
103 |
$category = new stdClass();
|
104 |
$category->categoryId = (int) $cat->getId();
|
114 |
}
|
115 |
|
116 |
if ($response) {
|
117 |
+
//$cat = Mage::getModel('catalog/category')->setStoreId($this->getStoreIdByWebsiteId())->load($category->categoryId);
|
118 |
try {
|
119 |
$cat->setData('ae_sync', 1)->setData('observer', true)->setData('ae_sync_date', date("Y-m-d H:i:s"))->save();
|
120 |
$this->logger->log('[INFO]', 'Synchronize category: ' . $cat->getName() . ' (ID:' . $cat->getId() . ') [' . time() . ']');
|
app/code/local/AffinityEngine/AffinityItems/Model/Sync/MemberSync.php
CHANGED
@@ -2,30 +2,30 @@
|
|
2 |
|
3 |
class AffinityEngine_AffinityItems_Model_Sync_MemberSync extends AffinityEngine_AffinityItems_Model_Sync_Sync {
|
4 |
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
for ($cPage = 0; $cPage <= ($countPage - 1); $cPage++) {
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
$memb->setData('ae_sync', 1)->save();
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
}
|
30 |
}
|
31 |
|
2 |
|
3 |
class AffinityEngine_AffinityItems_Model_Sync_MemberSync extends AffinityEngine_AffinityItems_Model_Sync_Sync {
|
4 |
|
5 |
+
public function syncMember($sync_count = 300, $new = true) {
|
6 |
+
$countMember = $this->getMembersForSync()->count();
|
7 |
+
$countPage = ceil($countMember / $sync_count);
|
8 |
for ($cPage = 0; $cPage <= ($countPage - 1); $cPage++) {
|
9 |
+
$members = $this->getMembersForSync()->setPageSize($sync_count);
|
10 |
+
$memberList = array();
|
11 |
+
foreach ($members as $member) {
|
12 |
+
$aemember = new stdClass();
|
13 |
+
$aemember->memberId = $member->getId();
|
14 |
+
$aemember->firstname = $member->getFirstname();
|
15 |
+
$aemember->lastname = $member->getLastname();
|
16 |
+
$aemember->email = $member->getEmail();
|
17 |
+
$aemember->birthday = '';
|
18 |
+
array_push($memberList, $aemember);
|
19 |
+
}
|
20 |
+
$request = new AffinityEngine_AffinityItems_Model_Sdk_Request_MemberRequest($memberList);
|
21 |
+
if ($request->post()) {
|
22 |
+
foreach ($memberList as $member) {
|
23 |
+
$memb = Mage::getModel('customer/customer')->load($member->memberId);
|
24 |
$memb->setData('ae_sync', 1)->save();
|
25 |
+
}
|
26 |
+
} else {
|
27 |
+
echo "bad connection";
|
28 |
+
}
|
29 |
}
|
30 |
}
|
31 |
|
app/code/local/AffinityEngine/AffinityItems/Model/Sync/ProductSync.php
CHANGED
@@ -24,10 +24,8 @@ class AffinityEngine_AffinityItems_Model_Sync_ProductSync extends AffinityEngine
|
|
24 |
|
25 |
$aeproductList = array();
|
26 |
foreach ($products as $prod) {
|
27 |
-
$prod = Mage::getModel('catalog/product')->
|
28 |
$aeproduct = new stdClass();
|
29 |
-
|
30 |
-
|
31 |
$aeproduct->productId = $prod->getId();
|
32 |
$aeproduct->updateDate = $prod->getUpdatedAt();
|
33 |
$aeproduct->categoryIds = $prod->getCategoryIds();
|
@@ -51,7 +49,7 @@ class AffinityEngine_AffinityItems_Model_Sync_ProductSync extends AffinityEngine
|
|
51 |
if ($response) {
|
52 |
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); //fix for SQL error when saving product
|
53 |
foreach ($aeproductList as $product) {
|
54 |
-
$prod = Mage::getModel('catalog/product')->setStoreId(
|
55 |
try {
|
56 |
$prod->setData('ae_sync', 1)->setData('observer', true)->setData('ae_sync_date', date("Y-m-d H:i:s"))->save();
|
57 |
$this->logger->log('[INFO]', 'Synchronize product: ' . $prod->getName() . ' (ID:' . $prod->getId() . ') [' . time() . ']');
|
@@ -110,7 +108,7 @@ class AffinityEngine_AffinityItems_Model_Sync_ProductSync extends AffinityEngine
|
|
110 |
public function syncProductFromObserver($prod = false) {
|
111 |
if (!$prod)
|
112 |
return false;
|
113 |
-
$prod = Mage::getModel('catalog/product')->setStoreId(
|
114 |
if ($prod->getVisibility() == 1 && $prod->getTypeId() == 'simple')
|
115 |
return false;
|
116 |
$is_new = (bool) $prod->getAeSyncDate();
|
@@ -129,7 +127,7 @@ class AffinityEngine_AffinityItems_Model_Sync_ProductSync extends AffinityEngine
|
|
129 |
$response = $request->put();
|
130 |
}
|
131 |
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); //fix for SQL error when saving product
|
132 |
-
$prod = Mage::getModel('catalog/product')->
|
133 |
if ($response) {
|
134 |
try {
|
135 |
$prod->setData('ae_sync', 1)->setData('observer', true)->setData('ae_sync_date', date("Y-m-d H:i:s"))->save();
|
@@ -186,7 +184,7 @@ class AffinityEngine_AffinityItems_Model_Sync_ProductSync extends AffinityEngine
|
|
186 |
$urls = array();
|
187 |
|
188 |
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
|
189 |
-
$p = Mage::getModel('catalog/product')->
|
190 |
|
191 |
$resolution = new stdClass();
|
192 |
$resolution->name = 'large';
|
24 |
|
25 |
$aeproductList = array();
|
26 |
foreach ($products as $prod) {
|
27 |
+
$prod = Mage::getModel('catalog/product')->load($prod->getId());
|
28 |
$aeproduct = new stdClass();
|
|
|
|
|
29 |
$aeproduct->productId = $prod->getId();
|
30 |
$aeproduct->updateDate = $prod->getUpdatedAt();
|
31 |
$aeproduct->categoryIds = $prod->getCategoryIds();
|
49 |
if ($response) {
|
50 |
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); //fix for SQL error when saving product
|
51 |
foreach ($aeproductList as $product) {
|
52 |
+
$prod = Mage::getModel('catalog/product')->setStoreId($this->getStoreIdByWebsiteId())->load($product->productId);
|
53 |
try {
|
54 |
$prod->setData('ae_sync', 1)->setData('observer', true)->setData('ae_sync_date', date("Y-m-d H:i:s"))->save();
|
55 |
$this->logger->log('[INFO]', 'Synchronize product: ' . $prod->getName() . ' (ID:' . $prod->getId() . ') [' . time() . ']');
|
108 |
public function syncProductFromObserver($prod = false) {
|
109 |
if (!$prod)
|
110 |
return false;
|
111 |
+
$prod = Mage::getModel('catalog/product')->setStoreId($this->getStoreIdByWebsiteId())->load($prod);
|
112 |
if ($prod->getVisibility() == 1 && $prod->getTypeId() == 'simple')
|
113 |
return false;
|
114 |
$is_new = (bool) $prod->getAeSyncDate();
|
127 |
$response = $request->put();
|
128 |
}
|
129 |
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); //fix for SQL error when saving product
|
130 |
+
$prod = Mage::getModel('catalog/product')->load($aeproduct->productId);
|
131 |
if ($response) {
|
132 |
try {
|
133 |
$prod->setData('ae_sync', 1)->setData('observer', true)->setData('ae_sync_date', date("Y-m-d H:i:s"))->save();
|
184 |
$urls = array();
|
185 |
|
186 |
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
|
187 |
+
$p = Mage::getModel('catalog/product')->load($prod->getId());
|
188 |
|
189 |
$resolution = new stdClass();
|
190 |
$resolution->name = 'large';
|
app/code/local/AffinityEngine/AffinityItems/Model/Sync/Sync.php
CHANGED
@@ -4,13 +4,17 @@ class AffinityEngine_AffinityItems_Model_Sync_Sync extends Mage_Core_Model_Abstr
|
|
4 |
|
5 |
public function __construct() {
|
6 |
$this->logger = Mage::getModel('affinityitems/log');
|
7 |
-
$this->helper = Mage::helper('affinityitems');
|
|
|
|
|
|
|
|
|
8 |
}
|
9 |
|
10 |
public function getProductsForSync() {
|
11 |
$collection = Mage::getModel('catalog/product')->getCollection();
|
12 |
$collection->addAttributeToSelect('entity_id')
|
13 |
-
->addStoreFilter(
|
14 |
->addAttributeToFilter(
|
15 |
array(
|
16 |
array('attribute' => 'ae_sync', 'null' => true),
|
@@ -19,16 +23,22 @@ class AffinityEngine_AffinityItems_Model_Sync_Sync extends Mage_Core_Model_Abstr
|
|
19 |
$collection->addFieldToFilter('visibility', Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH);
|
20 |
return $collection;
|
21 |
}
|
22 |
-
|
23 |
public function getDeletedProductsForSync() {
|
24 |
$collection = Mage::getModel('affinityitems/catProdRepo')->getCollection()->addFieldToFilter('obj_type', 'product');
|
|
|
|
|
|
|
|
|
25 |
return $collection;
|
26 |
}
|
27 |
-
|
28 |
public function getCategoriesForSync() {
|
|
|
29 |
$collection = Mage::getModel('catalog/category')->getCollection();
|
30 |
$collection->addAttributeToSelect('entity_id')
|
31 |
->addIsActiveFilter()
|
|
|
32 |
->addAttributeToFilter(
|
33 |
array(
|
34 |
array('attribute' => 'ae_sync', 'null' => true),
|
@@ -36,43 +46,58 @@ class AffinityEngine_AffinityItems_Model_Sync_Sync extends Mage_Core_Model_Abstr
|
|
36 |
), '', 'left');
|
37 |
return $collection;
|
38 |
}
|
39 |
-
|
40 |
public function getDeletedCategoriesForSync() {
|
41 |
$collection = Mage::getModel('affinityitems/catProdRepo')->getCollection()->addFieldToFilter('obj_type', 'category');
|
|
|
|
|
|
|
|
|
42 |
return $collection;
|
43 |
}
|
44 |
-
|
45 |
-
public function getMembersForSync() {
|
46 |
-
$collection = Mage::getModel('customer/customer')->getCollection();
|
47 |
-
$collection->addAttributeToSelect('entity_id')
|
48 |
-
->addAttributeToFilter(
|
49 |
-
array(
|
50 |
-
array('attribute' => 'ae_sync', 'null' => true),
|
51 |
-
array('attribute' => 'ae_sync', 'eq' => 0),
|
52 |
-
), '', 'left');
|
53 |
|
54 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
}
|
56 |
|
57 |
public function getOrdersForSync() {
|
58 |
$collection = Mage::getModel('sales/order')->getCollection();
|
59 |
$collection->addFieldToFilter('state', array('in' => array('new', 'pending_payment', 'processing', 'complete', 'payment_review')))
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
->addFieldToFilter('ae_sync', array('in' => array(null, 0)));
|
|
|
|
|
|
|
66 |
return $collection;
|
67 |
}
|
68 |
-
|
69 |
public function getActionsForSync() {
|
70 |
$collection = Mage::getModel("affinityitems/action")->getCollection();
|
|
|
|
|
|
|
71 |
return $collection;
|
72 |
}
|
73 |
|
74 |
public function getCartForSync() {
|
75 |
$collection = Mage::getModel("affinityitems/cart")->getCollection();
|
|
|
|
|
|
|
76 |
return $collection;
|
77 |
}
|
78 |
|
4 |
|
5 |
public function __construct() {
|
6 |
$this->logger = Mage::getModel('affinityitems/log');
|
7 |
+
$this->helper = Mage::helper('affinityitems');
|
8 |
+
}
|
9 |
+
|
10 |
+
public function getStoreIdByWebsiteId() {
|
11 |
+
return (Mage::registry('website_id')) ? Mage::app()->getWebsite(Mage::registry('website_id'))->getDefaultGroup()->getDefaultStoreId() : 0;
|
12 |
}
|
13 |
|
14 |
public function getProductsForSync() {
|
15 |
$collection = Mage::getModel('catalog/product')->getCollection();
|
16 |
$collection->addAttributeToSelect('entity_id')
|
17 |
+
->addStoreFilter($this->getStoreIdByWebsiteId())
|
18 |
->addAttributeToFilter(
|
19 |
array(
|
20 |
array('attribute' => 'ae_sync', 'null' => true),
|
23 |
$collection->addFieldToFilter('visibility', Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH);
|
24 |
return $collection;
|
25 |
}
|
26 |
+
|
27 |
public function getDeletedProductsForSync() {
|
28 |
$collection = Mage::getModel('affinityitems/catProdRepo')->getCollection()->addFieldToFilter('obj_type', 'product');
|
29 |
+
if (Mage::registry('website_id')) {
|
30 |
+
$collection->addFieldToFilter('website_id', Mage::registry('website_id'));
|
31 |
+
}
|
32 |
+
|
33 |
return $collection;
|
34 |
}
|
35 |
+
|
36 |
public function getCategoriesForSync() {
|
37 |
+
$rootId = Mage::app()->getStore($this->getStoreIdByWebsiteId())->getRootCategoryId();
|
38 |
$collection = Mage::getModel('catalog/category')->getCollection();
|
39 |
$collection->addAttributeToSelect('entity_id')
|
40 |
->addIsActiveFilter()
|
41 |
+
->addFieldToFilter('path', array('like' => "1/" . $rootId . "/%"))
|
42 |
->addAttributeToFilter(
|
43 |
array(
|
44 |
array('attribute' => 'ae_sync', 'null' => true),
|
46 |
), '', 'left');
|
47 |
return $collection;
|
48 |
}
|
49 |
+
|
50 |
public function getDeletedCategoriesForSync() {
|
51 |
$collection = Mage::getModel('affinityitems/catProdRepo')->getCollection()->addFieldToFilter('obj_type', 'category');
|
52 |
+
if (Mage::registry('website_id')) {
|
53 |
+
$collection->addFieldToFilter('website_id', Mage::registry('website_id'));
|
54 |
+
}
|
55 |
+
|
56 |
return $collection;
|
57 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
|
59 |
+
public function getMembersForSync() {
|
60 |
+
$collection = Mage::getModel('customer/customer')->getCollection();
|
61 |
+
$collection->addAttributeToSelect('entity_id')
|
62 |
+
->addAttributeToFilter(
|
63 |
+
array(
|
64 |
+
array('attribute' => 'ae_sync', 'null' => true),
|
65 |
+
array('attribute' => 'ae_sync', 'eq' => 0),
|
66 |
+
), '', 'left');
|
67 |
+
if (Mage::registry('website_id')) {
|
68 |
+
$collection->addFieldToFilter('website_id', Mage::registry('website_id'));
|
69 |
+
}
|
70 |
+
return $collection;
|
71 |
}
|
72 |
|
73 |
public function getOrdersForSync() {
|
74 |
$collection = Mage::getModel('sales/order')->getCollection();
|
75 |
$collection->addFieldToFilter('state', array('in' => array('new', 'pending_payment', 'processing', 'complete', 'payment_review')))
|
76 |
+
->addFieldToFilter('created_at', array(
|
77 |
+
'from' => strtotime('-6 month', time()),
|
78 |
+
'to' => time(),
|
79 |
+
'datetime' => true
|
80 |
+
))
|
81 |
->addFieldToFilter('ae_sync', array('in' => array(null, 0)));
|
82 |
+
if (Mage::registry('website_id')) {
|
83 |
+
$collection->addAttributeToFilter('store_name', array('like' => '%' . Mage::app()->getWebsite(Mage::registry('website_id'))->getName() . '%'));
|
84 |
+
}
|
85 |
return $collection;
|
86 |
}
|
87 |
+
|
88 |
public function getActionsForSync() {
|
89 |
$collection = Mage::getModel("affinityitems/action")->getCollection();
|
90 |
+
if (Mage::registry('website_id')) {
|
91 |
+
$collection->addFieldToFilter('website_id', Mage::registry('website_id'));
|
92 |
+
}
|
93 |
return $collection;
|
94 |
}
|
95 |
|
96 |
public function getCartForSync() {
|
97 |
$collection = Mage::getModel("affinityitems/cart")->getCollection();
|
98 |
+
if (Mage::registry('website_id')) {
|
99 |
+
$collection->addFieldToFilter('website_id', Mage::registry('website_id'));
|
100 |
+
}
|
101 |
return $collection;
|
102 |
}
|
103 |
|
app/code/local/AffinityEngine/AffinityItems/Model/Syncrotate.php
CHANGED
@@ -6,14 +6,20 @@ class AffinityEngine_AffinityItems_Model_Syncrotate extends Mage_Core_Model_Abst
|
|
6 |
$this->_init('affinityitems/syncrotate');
|
7 |
}
|
8 |
|
9 |
-
public function upd($sync) {
|
10 |
-
$query = "UPDATE `" . Mage::getSingleton('core/resource')->getTableName('ae_sync_rotate') . "` SET `last_sync` = '" . $sync . "' WHERE `ae_sync_rotate`.`
|
11 |
$write = Mage::getSingleton('core/resource')->getConnection('affinityitems_write');
|
12 |
$result = $write->query($query);
|
13 |
}
|
14 |
|
15 |
-
public function updInitial($value) {
|
16 |
-
$query = "UPDATE `" . Mage::getSingleton('core/resource')->getTableName('ae_sync_rotate') . "` SET `initial_sync` = '" . $value . "' WHERE `ae_sync_rotate`.`
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
$write = Mage::getSingleton('core/resource')->getConnection('affinityitems_write');
|
18 |
$result = $write->query($query);
|
19 |
}
|
6 |
$this->_init('affinityitems/syncrotate');
|
7 |
}
|
8 |
|
9 |
+
public function upd($sync, $website_id) {
|
10 |
+
$query = "UPDATE `" . Mage::getSingleton('core/resource')->getTableName('ae_sync_rotate') . "` SET `last_sync` = '" . $sync . "' WHERE `ae_sync_rotate`.`website_id` =" . $website_id . ";";
|
11 |
$write = Mage::getSingleton('core/resource')->getConnection('affinityitems_write');
|
12 |
$result = $write->query($query);
|
13 |
}
|
14 |
|
15 |
+
public function updInitial($value, $website_id) {
|
16 |
+
$query = "UPDATE `" . Mage::getSingleton('core/resource')->getTableName('ae_sync_rotate') . "` SET `initial_sync` = '" . $value . "' WHERE `ae_sync_rotate`.`website_id` =" . $website_id . ";";
|
17 |
+
$write = Mage::getSingleton('core/resource')->getConnection('affinityitems_write');
|
18 |
+
$result = $write->query($query);
|
19 |
+
}
|
20 |
+
|
21 |
+
public function updReg($value, $website_id) {
|
22 |
+
$query = "UPDATE `" . Mage::getSingleton('core/resource')->getTableName('ae_sync_rotate') . "` SET `website_reg` = '" . $value . "' WHERE `ae_sync_rotate`.`website_id` =" . $website_id . ";";
|
23 |
$write = Mage::getSingleton('core/resource')->getConnection('affinityitems_write');
|
24 |
$result = $write->query($query);
|
25 |
}
|
app/code/local/AffinityEngine/AffinityItems/Model/System/Config/Source/Dropdown/Values.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class AffinityEngine_AffinityItems_Model_System_Config_Source_Dropdown_Values{
|
3 |
+
|
4 |
+
public function toOptionArray()
|
5 |
+
{
|
6 |
+
$allStores = Mage::app()->getStores();
|
7 |
+
$optionArray=array();
|
8 |
+
$optionArray[]=array(
|
9 |
+
'value' => 0,
|
10 |
+
'label' => 'All'
|
11 |
+
);
|
12 |
+
foreach ($allStores as $_eachStoreId => $val)
|
13 |
+
{
|
14 |
+
// $_storeCode = Mage::app()->getStore($_eachStoreId)->getCode();
|
15 |
+
$_storeName = Mage::app()->getStore($_eachStoreId)->getName();
|
16 |
+
$_storeId = Mage::app()->getStore($_eachStoreId)->getId();
|
17 |
+
$optionArray[]=array(
|
18 |
+
'value' => $_storeId,
|
19 |
+
'label' => $_storeName
|
20 |
+
);
|
21 |
+
}
|
22 |
+
return $optionArray;
|
23 |
+
}
|
24 |
+
}
|
app/code/local/AffinityEngine/AffinityItems/controllers/ActionController.php
CHANGED
@@ -8,7 +8,7 @@ class AffinityEngine_AffinityItems_ActionController extends Mage_Core_Controller
|
|
8 |
}
|
9 |
|
10 |
public function ajaxAction() {
|
11 |
-
if (Mage::helper('affinityitems')->isModuleEnabledAndRegistered()) {
|
12 |
$rec_type = $this->getRequest()->getPost('recoType');
|
13 |
$rec_type = isset($rec_type) ? $rec_type : '';
|
14 |
|
8 |
}
|
9 |
|
10 |
public function ajaxAction() {
|
11 |
+
if (Mage::helper('affinityitems')->isModuleEnabledAndRegistered(Mage::app()->getWebsite()->getId())) {
|
12 |
$rec_type = $this->getRequest()->getPost('recoType');
|
13 |
$rec_type = isset($rec_type) ? $rec_type : '';
|
14 |
|
app/code/local/AffinityEngine/AffinityItems/controllers/Adminhtml/AffinityitemslogController.php
CHANGED
@@ -1,18 +1,51 @@
|
|
1 |
-
<?php
|
2 |
|
3 |
class AffinityEngine_AffinityItems_Adminhtml_AffinityitemslogController extends Mage_Adminhtml_Controller_Action {
|
4 |
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
|
3 |
class AffinityEngine_AffinityItems_Adminhtml_AffinityitemslogController extends Mage_Adminhtml_Controller_Action {
|
4 |
|
5 |
+
public function indexAction() {
|
6 |
+
$this->loadLayout();
|
7 |
+
$this->_title($this->__("AffinityItems"));
|
8 |
+
$this->_setActiveMenu('affinityengine/affinityitems_log');
|
9 |
+
$this->renderLayout();
|
10 |
+
}
|
11 |
+
|
12 |
+
public function deleteallAction() {
|
13 |
+
$resource = Mage::getSingleton('core/resource')->getConnection('core_write');
|
14 |
+
$resource->query('TRUNCATE TABLE ' . Mage::getSingleton('core/resource')->getTableName('ae_log'));
|
15 |
+
Mage::getSingleton('adminhtml/session')->addSuccess('Log cleared');
|
16 |
+
$this->_redirect('*/*/index');
|
17 |
+
}
|
18 |
+
|
19 |
+
public function clearLogAction() {
|
20 |
+
$logfile = Mage::getBaseDir('log') . '/AffinityDebug.log';
|
21 |
+
if (file_exists($logfile)) {
|
22 |
+
unlink($logfile);
|
23 |
+
Mage::getSingleton('adminhtml/session')->addSuccess('Log file cleared');
|
24 |
+
} else {
|
25 |
+
Mage::getSingleton('adminhtml/session')->addSuccess('Log file was already empty');
|
26 |
+
}
|
27 |
+
|
28 |
+
$this->_redirect('*/*/index');
|
29 |
+
}
|
30 |
+
|
31 |
+
public function downloadLogAction() {
|
32 |
+
$logfile = Mage::getBaseDir('log') . '/AffinityDebug.log';
|
33 |
+
|
34 |
+
if (!is_file($logfile) || !is_readable($logfile)) {
|
35 |
+
Mage::getSingleton('adminhtml/session')->addSuccess('Log file doesnt exist');
|
36 |
+
$this->_redirect('*/*/index');
|
37 |
+
} else {
|
38 |
+
$this->getResponse()
|
39 |
+
->setHttpResponseCode(200)
|
40 |
+
->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true)
|
41 |
+
->setHeader('Pragma', 'public', true)
|
42 |
+
->setHeader('Content-type', 'application/force-download')
|
43 |
+
->setHeader('Content-Length', filesize($logfile))
|
44 |
+
->setHeader('Content-Disposition', 'attachment' . '; filename=' . basename($logfile));
|
45 |
+
$this->getResponse()->clearBody();
|
46 |
+
$this->getResponse()->sendHeaders();
|
47 |
+
readfile($logfile);
|
48 |
+
}
|
49 |
+
}
|
50 |
+
|
51 |
+
}
|
app/code/local/AffinityEngine/AffinityItems/controllers/Adminhtml/AjaxController.php
CHANGED
@@ -3,7 +3,9 @@
|
|
3 |
class AffinityEngine_AffinityItems_Adminhtml_AjaxController extends Mage_Adminhtml_Controller_Action {
|
4 |
|
5 |
public function registerAction() {
|
6 |
-
if (Mage::app()->getRequest()->getParam('email') != '' && Mage::app()->getRequest()->getParam('password') != '') {
|
|
|
|
|
7 |
$customer = new stdClass();
|
8 |
$customer->siteName = $_SERVER['SERVER_NAME'];
|
9 |
$customer->domain = $_SERVER['HTTP_HOST'];
|
@@ -36,7 +38,7 @@ class AffinityEngine_AffinityItems_Adminhtml_AjaxController extends Mage_Adminht
|
|
36 |
|
37 |
if ($response) {
|
38 |
if ($response['_ok'] == 'true') {
|
39 |
-
Mage::helper('affinityitems/aeadapter')->authentication($response['email'], 'password', $response['siteId'], $response['securityKey']);
|
40 |
//addFirstHost();
|
41 |
} else {
|
42 |
$ret['_errorMessage'] = $response['_errorMessage'];
|
3 |
class AffinityEngine_AffinityItems_Adminhtml_AjaxController extends Mage_Adminhtml_Controller_Action {
|
4 |
|
5 |
public function registerAction() {
|
6 |
+
if (Mage::app()->getRequest()->getParam('email') != '' && Mage::app()->getRequest()->getParam('password') != '' /*&& Mage::app()->getRequest()->getParam('website_id') != ''*/) {
|
7 |
+
$website_id = Mage::app()->getRequest()->getParam('website_id');
|
8 |
+
|
9 |
$customer = new stdClass();
|
10 |
$customer->siteName = $_SERVER['SERVER_NAME'];
|
11 |
$customer->domain = $_SERVER['HTTP_HOST'];
|
38 |
|
39 |
if ($response) {
|
40 |
if ($response['_ok'] == 'true') {
|
41 |
+
Mage::helper('affinityitems/aeadapter')->authentication($response['email'], 'password', $response['siteId'], $response['securityKey'], $website_id);
|
42 |
//addFirstHost();
|
43 |
} else {
|
44 |
$ret['_errorMessage'] = $response['_errorMessage'];
|
app/code/local/AffinityEngine/AffinityItems/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<AffinityEngine_AffinityItems>
|
5 |
-
<version>1.1.
|
6 |
</AffinityEngine_AffinityItems>
|
7 |
</modules>
|
8 |
|
@@ -62,14 +62,15 @@
|
|
62 |
</affinityEngine_saveproduct>
|
63 |
</observers>
|
64 |
</catalog_product_save_after>
|
65 |
-
<
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
</
|
71 |
-
</
|
72 |
-
</
|
|
|
73 |
<sales_order_save_before>
|
74 |
<observers>
|
75 |
<affinityEngine_saveorder>
|
@@ -221,7 +222,7 @@
|
|
221 |
</affinityitems_log>
|
222 |
<affinityitems_config translate="title" module="affinityitems">
|
223 |
<title>Configuration</title>
|
224 |
-
|
225 |
</affinityitems_config>
|
226 |
</children>
|
227 |
</affinityengine>
|
@@ -267,136 +268,141 @@
|
|
267 |
|
268 |
<default>
|
269 |
<affinityitems>
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
</
|
286 |
-
<
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
</
|
301 |
-
<
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
</
|
317 |
-
<
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
</
|
333 |
-
<
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
</
|
349 |
-
<
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
</
|
365 |
-
<
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
</
|
381 |
-
<
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
|
|
|
|
|
|
|
|
|
|
389 |
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
</config>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<AffinityEngine_AffinityItems>
|
5 |
+
<version>1.1.4</version>
|
6 |
</AffinityEngine_AffinityItems>
|
7 |
</modules>
|
8 |
|
62 |
</affinityEngine_saveproduct>
|
63 |
</observers>
|
64 |
</catalog_product_save_after>
|
65 |
+
<catalog_category_save_commit_after>
|
66 |
+
<observers>
|
67 |
+
<affinityEngine_savecategory>
|
68 |
+
<type>singleton</type>
|
69 |
+
<class>AffinityEngine_AffinityItems_Model_Observer</class>
|
70 |
+
<method>saveCategory</method>
|
71 |
+
</affinityEngine_savecategory>
|
72 |
+
</observers>
|
73 |
+
</catalog_category_save_commit_after>
|
74 |
<sales_order_save_before>
|
75 |
<observers>
|
76 |
<affinityEngine_saveorder>
|
222 |
</affinityitems_log>
|
223 |
<affinityitems_config translate="title" module="affinityitems">
|
224 |
<title>Configuration</title>
|
225 |
+
<sort_order>10</sort_order>
|
226 |
</affinityitems_config>
|
227 |
</children>
|
228 |
</affinityengine>
|
268 |
|
269 |
<default>
|
270 |
<affinityitems>
|
271 |
+
<general>
|
272 |
+
<storeid>
|
273 |
+
0
|
274 |
+
</storeid>
|
275 |
+
</general>
|
276 |
+
<items_home>
|
277 |
+
<number_products>4</number_products>
|
278 |
+
<number_products_per_line>4</number_products_per_line>
|
279 |
+
<recommendation_config>personalization</recommendation_config>
|
280 |
+
<image_size>0</image_size>
|
281 |
+
<parent_div>,ae_products_block_center clearfix</parent_div>
|
282 |
+
<title_class>ae_block_title_center</title_class>
|
283 |
+
<content_div>,ae_content_block_center</content_div>
|
284 |
+
<ul>,ae_list_products_block_center</ul>
|
285 |
+
<li>,ae_product_block_center</li>
|
286 |
+
<product_image_class>ae_img_center</product_image_class>
|
287 |
+
<product_name_class>ae_products_name_center</product_name_class>
|
288 |
+
<product_dsecription_class>ae_product_description</product_dsecription_class>
|
289 |
+
<price_container_class>ae_price_container_center</price_container_class>
|
290 |
+
<price_class>ae_price_center</price_class>
|
291 |
+
</items_home>
|
292 |
+
<items_left>
|
293 |
+
<number_products>4</number_products>
|
294 |
+
<number_products_per_line>4</number_products_per_line>
|
295 |
+
<image_size>0</image_size>
|
296 |
+
<parent_div>,ae_products_block_center clearfix</parent_div>
|
297 |
+
<title_class>ae_block_title_center</title_class>
|
298 |
+
<content_div>,ae_content_block_center</content_div>
|
299 |
+
<ul>,ae_list_products_block_center</ul>
|
300 |
+
<li>,ae_product_block_center</li>
|
301 |
+
<product_image_class>ae_img_center</product_image_class>
|
302 |
+
<product_name_class>ae_products_name_center</product_name_class>
|
303 |
+
<product_dsecription_class>ae_product_description</product_dsecription_class>
|
304 |
+
<price_container_class>ae_price_container_center</price_container_class>
|
305 |
+
<price_class>ae_price_center</price_class>
|
306 |
+
</items_left>
|
307 |
+
<items_right>
|
308 |
+
<number_products>4</number_products>
|
309 |
+
<number_products_per_line>4</number_products_per_line>
|
310 |
+
<recommendation_config>personalization</recommendation_config>
|
311 |
+
<image_size>0</image_size>
|
312 |
+
<parent_div>,ae_products_block_center clearfix</parent_div>
|
313 |
+
<title_class>ae_block_title_center</title_class>
|
314 |
+
<content_div>,ae_content_block_center</content_div>
|
315 |
+
<ul>,ae_list_products_block_center</ul>
|
316 |
+
<li>,ae_product_block_center</li>
|
317 |
+
<product_image_class>ae_img_center</product_image_class>
|
318 |
+
<product_name_class>ae_products_name_center</product_name_class>
|
319 |
+
<product_dsecription_class>ae_product_description</product_dsecription_class>
|
320 |
+
<price_container_class>ae_price_container_center</price_container_class>
|
321 |
+
<price_class>ae_price_center</price_class>
|
322 |
+
</items_right>
|
323 |
+
<items_cart>
|
324 |
+
<number_products>4</number_products>
|
325 |
+
<number_products_per_line>4</number_products_per_line>
|
326 |
+
<recommendation_config>personalization</recommendation_config>
|
327 |
+
<image_size>0</image_size>
|
328 |
+
<parent_div>,ae_products_block_center clearfix</parent_div>
|
329 |
+
<title_class>ae_block_title_center</title_class>
|
330 |
+
<content_div>,ae_content_block_center</content_div>
|
331 |
+
<ul>,ae_list_products_block_center</ul>
|
332 |
+
<li>,ae_product_block_center</li>
|
333 |
+
<product_image_class>ae_img_center</product_image_class>
|
334 |
+
<product_name_class>ae_products_name_center</product_name_class>
|
335 |
+
<product_dsecription_class>ae_product_description</product_dsecription_class>
|
336 |
+
<price_container_class>ae_price_container_center</price_container_class>
|
337 |
+
<price_class>ae_price_center</price_class>
|
338 |
+
</items_cart>
|
339 |
+
<items_product>
|
340 |
+
<number_products>4</number_products>
|
341 |
+
<number_products_per_line>4</number_products_per_line>
|
342 |
+
<recommendation_config>personalization</recommendation_config>
|
343 |
+
<image_size>0</image_size>
|
344 |
+
<parent_div>,ae_products_block_center clearfix</parent_div>
|
345 |
+
<title_class>ae_block_title_center</title_class>
|
346 |
+
<content_div>,ae_content_block_center</content_div>
|
347 |
+
<ul>,ae_list_products_block_center</ul>
|
348 |
+
<li>,ae_product_block_center</li>
|
349 |
+
<product_image_class>ae_img_center</product_image_class>
|
350 |
+
<product_name_class>ae_products_name_center</product_name_class>
|
351 |
+
<product_dsecription_class>ae_product_description</product_dsecription_class>
|
352 |
+
<price_container_class>ae_price_container_center</price_container_class>
|
353 |
+
<price_class>ae_price_center</price_class>
|
354 |
+
</items_product>
|
355 |
+
<items_search>
|
356 |
+
<number_products>4</number_products>
|
357 |
+
<number_products_per_line>4</number_products_per_line>
|
358 |
+
<recommendation_config>personalization</recommendation_config>
|
359 |
+
<image_size>0</image_size>
|
360 |
+
<parent_div>,ae_products_block_center clearfix</parent_div>
|
361 |
+
<title_class>ae_block_title_center</title_class>
|
362 |
+
<content_div>,ae_content_block_center</content_div>
|
363 |
+
<ul>,ae_list_products_block_center</ul>
|
364 |
+
<li>,ae_product_block_center</li>
|
365 |
+
<product_image_class>ae_img_center</product_image_class>
|
366 |
+
<product_name_class>ae_products_name_center</product_name_class>
|
367 |
+
<product_dsecription_class>ae_product_description</product_dsecription_class>
|
368 |
+
<price_container_class>ae_price_container_center</price_container_class>
|
369 |
+
<price_class>ae_price_center</price_class>
|
370 |
+
</items_search>
|
371 |
+
<items_category>
|
372 |
+
<number_products>4</number_products>
|
373 |
+
<number_products_per_line>4</number_products_per_line>
|
374 |
+
<recommendation_config>personalization</recommendation_config>
|
375 |
+
<image_size>0</image_size>
|
376 |
+
<parent_div>,ae_products_block_center clearfix</parent_div>
|
377 |
+
<title_class>ae_block_title_center</title_class>
|
378 |
+
<content_div>,ae_content_block_center</content_div>
|
379 |
+
<ul>,ae_list_products_block_center</ul>
|
380 |
+
<li>,ae_product_block_center</li>
|
381 |
+
<product_image_class>ae_img_center</product_image_class>
|
382 |
+
<product_name_class>ae_products_name_center</product_name_class>
|
383 |
+
<product_dsecription_class>ae_product_description</product_dsecription_class>
|
384 |
+
<price_container_class>ae_price_container_center</price_container_class>
|
385 |
+
<price_class>ae_price_center</price_class>
|
386 |
+
</items_category>
|
387 |
+
<image_size>
|
388 |
+
<default>125,125</default>
|
389 |
+
<large>458,458</large>
|
390 |
+
<medium>250,250</medium>
|
391 |
+
<small>98,98</small>
|
392 |
+
</image_size>
|
393 |
+
</affinityitems>
|
394 |
+
</default>
|
395 |
|
396 |
+
<crontab>
|
397 |
+
<jobs>
|
398 |
+
<affinityitems_sync>
|
399 |
+
<schedule>
|
400 |
+
<cron_expr>*/5 * * * *</cron_expr>
|
401 |
+
</schedule>
|
402 |
+
<run>
|
403 |
+
<model>affinityitems/cron::Sync</model>
|
404 |
+
</run>
|
405 |
+
</affinityitems_sync>
|
406 |
+
</jobs>
|
407 |
+
</crontab>
|
408 |
</config>
|
app/code/local/AffinityEngine/AffinityItems/etc/system.xml
CHANGED
@@ -24,23 +24,31 @@
|
|
24 |
<show_in_website>1</show_in_website>
|
25 |
<show_in_store>1</show_in_store>
|
26 |
<fields>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
<enable translate="label">
|
28 |
<label>Activation</label>
|
29 |
<frontend_type>select</frontend_type>
|
30 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
31 |
<sort_order>0</sort_order>
|
32 |
-
<show_in_default>
|
33 |
<show_in_website>1</show_in_website>
|
34 |
-
<show_in_store>
|
35 |
</enable>
|
36 |
<dev_prod translate="label">
|
37 |
<label>Enviroment</label>
|
38 |
<frontend_type>select</frontend_type>
|
39 |
<source_model>affinityitems/source_enviroment</source_model>
|
40 |
<sort_order>3</sort_order>
|
41 |
-
<show_in_default>
|
42 |
<show_in_website>1</show_in_website>
|
43 |
-
<show_in_store>
|
44 |
<comment><![CDATA[You will be logged out from affinity server on change]]></comment>
|
45 |
</dev_prod>
|
46 |
<version translate="label">
|
@@ -48,8 +56,8 @@
|
|
48 |
<frontend_type>text</frontend_type>
|
49 |
<frontend_model>affinityitems/renderer_config_version</frontend_model>
|
50 |
<sort_order>20</sort_order>
|
51 |
-
<show_in_default>
|
52 |
-
<show_in_website>
|
53 |
<show_in_store>0</show_in_store>
|
54 |
<depends>
|
55 |
<enable>1</enable>
|
@@ -61,26 +69,26 @@
|
|
61 |
<label>Advanced configuration</label>
|
62 |
<frontend_type>text</frontend_type>
|
63 |
<sort_order>3</sort_order>
|
64 |
-
<show_in_default>
|
65 |
<show_in_website>1</show_in_website>
|
66 |
-
<show_in_store>
|
67 |
<fields>
|
68 |
<heading>
|
69 |
<label><![CDATA[<strong>To secure the access to the recommendations, please indicate the servers that are allowed to query these recommendations</strong>]]></label>
|
70 |
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
71 |
<sort_order>5</sort_order>
|
72 |
-
<show_in_default>
|
73 |
<show_in_website>1</show_in_website>
|
74 |
-
<show_in_store>
|
75 |
</heading>
|
76 |
<server_ip>
|
77 |
<label>Server access</label>
|
78 |
<frontend_model>affinityitems/renderer_config_serverlist</frontend_model>
|
79 |
<backend_model>adminhtml/system_config_backend_serialized</backend_model>
|
80 |
<sort_order>10</sort_order>
|
81 |
-
<show_in_default>
|
82 |
<show_in_website>1</show_in_website>
|
83 |
-
<show_in_store>
|
84 |
<can_be_empty>1</can_be_empty>
|
85 |
<comment><![CDATA[IP list]]></comment>
|
86 |
</server_ip>
|
@@ -89,9 +97,9 @@
|
|
89 |
<frontend_type>select</frontend_type>
|
90 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
91 |
<sort_order>30</sort_order>
|
92 |
-
<show_in_default>
|
93 |
<show_in_website>1</show_in_website>
|
94 |
-
<show_in_store>
|
95 |
<comment><![CDATA[If this box is set to YES, we will delete yours personal data on our platform after the uninstall]]></comment>
|
96 |
<tooltip><![CDATA[
|
97 |
This option allows you to avoid the resynchronization step when installing a new version of the module.]]></tooltip>
|
@@ -100,9 +108,9 @@
|
|
100 |
<label>Number of elements to be synced</label>
|
101 |
<frontend_type>text</frontend_type>
|
102 |
<sort_order>50</sort_order>
|
103 |
-
<show_in_default>
|
104 |
<show_in_website>1</show_in_website>
|
105 |
-
<show_in_store>
|
106 |
<comment><![CDATA[default value is 300]]></comment>
|
107 |
<validate>validate-number</validate>
|
108 |
<tooltip><![CDATA[
|
@@ -112,9 +120,9 @@
|
|
112 |
<label><![CDATA[<strong>Additional CSS</strong>]]></label>
|
113 |
<frontend_type>textarea</frontend_type>
|
114 |
<sort_order>60</sort_order>
|
115 |
-
<show_in_default>
|
116 |
<show_in_website>1</show_in_website>
|
117 |
-
<show_in_store>
|
118 |
</ae_css>
|
119 |
</fields>
|
120 |
</advanced>
|
@@ -123,8 +131,8 @@
|
|
123 |
<frontend_type>text</frontend_type>
|
124 |
<sort_order>4</sort_order>
|
125 |
<show_in_default>1</show_in_default>
|
126 |
-
<show_in_website>
|
127 |
-
<show_in_store>
|
128 |
<fields>
|
129 |
<log_level translate="label">
|
130 |
<label>Log Level</label>
|
@@ -132,8 +140,9 @@
|
|
132 |
<source_model>affinityitems/source_loglevel</source_model>
|
133 |
<sort_order>0</sort_order>
|
134 |
<show_in_default>1</show_in_default>
|
135 |
-
<show_in_website>
|
136 |
-
<show_in_store>
|
|
|
137 |
</log_level>
|
138 |
</fields>
|
139 |
</developer>
|
@@ -141,9 +150,9 @@
|
|
141 |
<label>Image size</label>
|
142 |
<frontend_type>text</frontend_type>
|
143 |
<sort_order>5</sort_order>
|
144 |
-
<show_in_default>
|
145 |
<show_in_website>1</show_in_website>
|
146 |
-
<show_in_store>
|
147 |
<comment><![CDATA[<strong>Width x Height, in pixels</strong>]]></comment>
|
148 |
<fields>
|
149 |
<default translate="label">
|
@@ -151,9 +160,9 @@
|
|
151 |
<frontend_type>text</frontend_type>
|
152 |
<frontend_model>affinityitems/renderer_config_imagesize</frontend_model>
|
153 |
<sort_order>100</sort_order>
|
154 |
-
<show_in_default>
|
155 |
<show_in_website>1</show_in_website>
|
156 |
-
<show_in_store>
|
157 |
<validate>validate-number</validate>
|
158 |
</default>
|
159 |
<large translate="label">
|
@@ -161,9 +170,9 @@
|
|
161 |
<frontend_type>text</frontend_type>
|
162 |
<frontend_model>affinityitems/renderer_config_imagesize</frontend_model>
|
163 |
<sort_order>120</sort_order>
|
164 |
-
<show_in_default>
|
165 |
<show_in_website>1</show_in_website>
|
166 |
-
<show_in_store>
|
167 |
<validate>validate-number</validate>
|
168 |
</large>
|
169 |
<medium translate="label">
|
@@ -171,9 +180,9 @@
|
|
171 |
<frontend_type>text</frontend_type>
|
172 |
<frontend_model>affinityitems/renderer_config_imagesize</frontend_model>
|
173 |
<sort_order>140</sort_order>
|
174 |
-
<show_in_default>
|
175 |
<show_in_website>1</show_in_website>
|
176 |
-
<show_in_store>
|
177 |
<validate>validate-number</validate>
|
178 |
</medium>
|
179 |
<small translate="label">
|
@@ -181,9 +190,9 @@
|
|
181 |
<frontend_type>text</frontend_type>
|
182 |
<frontend_model>affinityitems/renderer_config_imagesize</frontend_model>
|
183 |
<sort_order>160</sort_order>
|
184 |
-
<show_in_default>
|
185 |
<show_in_website>1</show_in_website>
|
186 |
-
<show_in_store>
|
187 |
<validate>validate-number</validate>
|
188 |
</small>
|
189 |
</fields>
|
@@ -193,26 +202,26 @@
|
|
193 |
<label>Home page</label>
|
194 |
<frontend_type>text</frontend_type>
|
195 |
<sort_order>10</sort_order>
|
196 |
-
<show_in_default>
|
197 |
<show_in_website>1</show_in_website>
|
198 |
-
<show_in_store>
|
199 |
<fields>
|
200 |
<enable translate="label">
|
201 |
<label>Enable</label>
|
202 |
<frontend_type>select</frontend_type>
|
203 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
204 |
<sort_order>0</sort_order>
|
205 |
-
<show_in_default>
|
206 |
<show_in_website>1</show_in_website>
|
207 |
-
<show_in_store>
|
208 |
</enable>
|
209 |
<recommendation_label translate="label">
|
210 |
<label>Recommendation area label</label>
|
211 |
<frontend_type>text</frontend_type>
|
212 |
<sort_order>5</sort_order>
|
213 |
-
<show_in_default>
|
214 |
<show_in_website>1</show_in_website>
|
215 |
-
<show_in_store>
|
216 |
<depends>
|
217 |
<enable>1</enable>
|
218 |
</depends>
|
@@ -222,9 +231,9 @@
|
|
222 |
<frontend_type>select</frontend_type>
|
223 |
<source_model>affinityitems/source_recoconfig::home</source_model>
|
224 |
<sort_order>12</sort_order>
|
225 |
-
<show_in_default>
|
226 |
<show_in_website>1</show_in_website>
|
227 |
-
<show_in_store>
|
228 |
<depends>
|
229 |
<enable>1</enable>
|
230 |
</depends>
|
@@ -233,9 +242,9 @@
|
|
233 |
<label>Number of displayed products</label>
|
234 |
<frontend_type>text</frontend_type>
|
235 |
<sort_order>10</sort_order>
|
236 |
-
<show_in_default>
|
237 |
<show_in_website>1</show_in_website>
|
238 |
-
<show_in_store>
|
239 |
<depends>
|
240 |
<enable>1</enable>
|
241 |
</depends>
|
@@ -244,9 +253,9 @@
|
|
244 |
<label>Number of displayed products per line</label>
|
245 |
<frontend_type>text</frontend_type>
|
246 |
<sort_order>12</sort_order>
|
247 |
-
<show_in_default>
|
248 |
<show_in_website>1</show_in_website>
|
249 |
-
<show_in_store>
|
250 |
<depends>
|
251 |
<enable>1</enable>
|
252 |
</depends>
|
@@ -256,9 +265,9 @@
|
|
256 |
<frontend_type>select</frontend_type>
|
257 |
<source_model>affinityitems/source_imagesize</source_model>
|
258 |
<sort_order>15</sort_order>
|
259 |
-
<show_in_default>
|
260 |
<show_in_website>1</show_in_website>
|
261 |
-
<show_in_store>
|
262 |
<depends>
|
263 |
<enable>1</enable>
|
264 |
</depends>
|
@@ -267,9 +276,9 @@
|
|
267 |
<label><![CDATA[<strong>Display settings</strong>]]></label>
|
268 |
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
269 |
<sort_order>60</sort_order>
|
270 |
-
<show_in_default>
|
271 |
<show_in_website>1</show_in_website>
|
272 |
-
<show_in_store>
|
273 |
<depends>
|
274 |
<enable>1</enable>
|
275 |
</depends>
|
@@ -279,9 +288,9 @@
|
|
279 |
<frontend_type>text</frontend_type>
|
280 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
281 |
<sort_order>65</sort_order>
|
282 |
-
<show_in_default>
|
283 |
<show_in_website>1</show_in_website>
|
284 |
-
<show_in_store>
|
285 |
<depends>
|
286 |
<enable>1</enable>
|
287 |
</depends>
|
@@ -290,9 +299,9 @@
|
|
290 |
<label><![CDATA[ Title <strong>class</strong>]]></label>
|
291 |
<frontend_type>text</frontend_type>
|
292 |
<sort_order>70</sort_order>
|
293 |
-
<show_in_default>
|
294 |
<show_in_website>1</show_in_website>
|
295 |
-
<show_in_store>
|
296 |
<depends>
|
297 |
<enable>1</enable>
|
298 |
</depends>
|
@@ -302,9 +311,9 @@
|
|
302 |
<frontend_type>text</frontend_type>
|
303 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
304 |
<sort_order>75</sort_order>
|
305 |
-
<show_in_default>
|
306 |
<show_in_website>1</show_in_website>
|
307 |
-
<show_in_store>
|
308 |
<depends>
|
309 |
<enable>1</enable>
|
310 |
</depends>
|
@@ -314,9 +323,9 @@
|
|
314 |
<frontend_type>text</frontend_type>
|
315 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
316 |
<sort_order>80</sort_order>
|
317 |
-
<show_in_default>
|
318 |
<show_in_website>1</show_in_website>
|
319 |
-
<show_in_store>
|
320 |
<depends>
|
321 |
<enable>1</enable>
|
322 |
</depends>
|
@@ -326,9 +335,9 @@
|
|
326 |
<frontend_type>text</frontend_type>
|
327 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
328 |
<sort_order>85</sort_order>
|
329 |
-
<show_in_default>
|
330 |
<show_in_website>1</show_in_website>
|
331 |
-
<show_in_store>
|
332 |
<depends>
|
333 |
<enable>1</enable>
|
334 |
</depends>
|
@@ -337,9 +346,9 @@
|
|
337 |
<label><![CDATA[ Product image class]]></label>
|
338 |
<frontend_type>text</frontend_type>
|
339 |
<sort_order>90</sort_order>
|
340 |
-
<show_in_default>
|
341 |
<show_in_website>1</show_in_website>
|
342 |
-
<show_in_store>
|
343 |
<depends>
|
344 |
<enable>1</enable>
|
345 |
</depends>
|
@@ -348,9 +357,9 @@
|
|
348 |
<label><![CDATA[ Product name class]]></label>
|
349 |
<frontend_type>text</frontend_type>
|
350 |
<sort_order>95</sort_order>
|
351 |
-
<show_in_default>
|
352 |
<show_in_website>1</show_in_website>
|
353 |
-
<show_in_store>
|
354 |
<depends>
|
355 |
<enable>1</enable>
|
356 |
</depends>
|
@@ -359,9 +368,9 @@
|
|
359 |
<label><![CDATA[ Product description class]]></label>
|
360 |
<frontend_type>text</frontend_type>
|
361 |
<sort_order>100</sort_order>
|
362 |
-
<show_in_default>
|
363 |
<show_in_website>1</show_in_website>
|
364 |
-
<show_in_store>
|
365 |
<depends>
|
366 |
<enable>1</enable>
|
367 |
</depends>
|
@@ -370,9 +379,9 @@
|
|
370 |
<label><![CDATA[ Price container class]]></label>
|
371 |
<frontend_type>text</frontend_type>
|
372 |
<sort_order>105</sort_order>
|
373 |
-
<show_in_default>
|
374 |
<show_in_website>1</show_in_website>
|
375 |
-
<show_in_store>
|
376 |
<depends>
|
377 |
<enable>1</enable>
|
378 |
</depends>
|
@@ -381,9 +390,9 @@
|
|
381 |
<label><![CDATA[ Price class]]></label>
|
382 |
<frontend_type>text</frontend_type>
|
383 |
<sort_order>110</sort_order>
|
384 |
-
<show_in_default>
|
385 |
<show_in_website>1</show_in_website>
|
386 |
-
<show_in_store>
|
387 |
<depends>
|
388 |
<enable>1</enable>
|
389 |
</depends>
|
@@ -395,26 +404,26 @@
|
|
395 |
<label>Left column</label>
|
396 |
<frontend_type>text</frontend_type>
|
397 |
<sort_order>20</sort_order>
|
398 |
-
<show_in_default>
|
399 |
<show_in_website>1</show_in_website>
|
400 |
-
<show_in_store>
|
401 |
<fields>
|
402 |
<enable translate="label">
|
403 |
<label>Enable</label>
|
404 |
<frontend_type>select</frontend_type>
|
405 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
406 |
<sort_order>0</sort_order>
|
407 |
-
<show_in_default>
|
408 |
<show_in_website>1</show_in_website>
|
409 |
-
<show_in_store>
|
410 |
</enable>
|
411 |
<recommendation_label translate="label">
|
412 |
<label>Recommendation area label</label>
|
413 |
<frontend_type>text</frontend_type>
|
414 |
<sort_order>5</sort_order>
|
415 |
-
<show_in_default>
|
416 |
<show_in_website>1</show_in_website>
|
417 |
-
<show_in_store>
|
418 |
<depends>
|
419 |
<enable>1</enable>
|
420 |
</depends>
|
@@ -424,9 +433,9 @@
|
|
424 |
<frontend_type>select</frontend_type>
|
425 |
<source_model>affinityitems/source_recoconfig::left</source_model>
|
426 |
<sort_order>12</sort_order>
|
427 |
-
<show_in_default>
|
428 |
<show_in_website>1</show_in_website>
|
429 |
-
<show_in_store>
|
430 |
<depends>
|
431 |
<enable>1</enable>
|
432 |
</depends>
|
@@ -435,9 +444,9 @@
|
|
435 |
<label>Number of displayed products</label>
|
436 |
<frontend_type>text</frontend_type>
|
437 |
<sort_order>10</sort_order>
|
438 |
-
<show_in_default>
|
439 |
<show_in_website>1</show_in_website>
|
440 |
-
<show_in_store>
|
441 |
<depends>
|
442 |
<enable>1</enable>
|
443 |
</depends>
|
@@ -446,9 +455,9 @@
|
|
446 |
<label>Number of displayed products per line</label>
|
447 |
<frontend_type>text</frontend_type>
|
448 |
<sort_order>12</sort_order>
|
449 |
-
<show_in_default>
|
450 |
<show_in_website>1</show_in_website>
|
451 |
-
<show_in_store>
|
452 |
<depends>
|
453 |
<enable>1</enable>
|
454 |
</depends>
|
@@ -458,9 +467,9 @@
|
|
458 |
<frontend_type>select</frontend_type>
|
459 |
<source_model>affinityitems/source_imagesize</source_model>
|
460 |
<sort_order>15</sort_order>
|
461 |
-
<show_in_default>
|
462 |
<show_in_website>1</show_in_website>
|
463 |
-
<show_in_store>
|
464 |
<depends>
|
465 |
<enable>1</enable>
|
466 |
</depends>
|
@@ -469,9 +478,9 @@
|
|
469 |
<label><![CDATA[<strong>Display settings</strong>]]></label>
|
470 |
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
471 |
<sort_order>60</sort_order>
|
472 |
-
<show_in_default>
|
473 |
<show_in_website>1</show_in_website>
|
474 |
-
<show_in_store>
|
475 |
<depends>
|
476 |
<enable>1</enable>
|
477 |
</depends>
|
@@ -481,9 +490,9 @@
|
|
481 |
<frontend_type>text</frontend_type>
|
482 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
483 |
<sort_order>65</sort_order>
|
484 |
-
<show_in_default>
|
485 |
<show_in_website>1</show_in_website>
|
486 |
-
<show_in_store>
|
487 |
<depends>
|
488 |
<enable>1</enable>
|
489 |
</depends>
|
@@ -492,9 +501,9 @@
|
|
492 |
<label><![CDATA[ Title <strong>class</strong>]]></label>
|
493 |
<frontend_type>text</frontend_type>
|
494 |
<sort_order>70</sort_order>
|
495 |
-
<show_in_default>
|
496 |
<show_in_website>1</show_in_website>
|
497 |
-
<show_in_store>
|
498 |
<depends>
|
499 |
<enable>1</enable>
|
500 |
</depends>
|
@@ -504,9 +513,9 @@
|
|
504 |
<frontend_type>text</frontend_type>
|
505 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
506 |
<sort_order>75</sort_order>
|
507 |
-
<show_in_default>
|
508 |
<show_in_website>1</show_in_website>
|
509 |
-
<show_in_store>
|
510 |
<depends>
|
511 |
<enable>1</enable>
|
512 |
</depends>
|
@@ -516,9 +525,9 @@
|
|
516 |
<frontend_type>text</frontend_type>
|
517 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
518 |
<sort_order>80</sort_order>
|
519 |
-
<show_in_default>
|
520 |
<show_in_website>1</show_in_website>
|
521 |
-
<show_in_store>
|
522 |
<depends>
|
523 |
<enable>1</enable>
|
524 |
</depends>
|
@@ -528,9 +537,9 @@
|
|
528 |
<frontend_type>text</frontend_type>
|
529 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
530 |
<sort_order>85</sort_order>
|
531 |
-
<show_in_default>
|
532 |
<show_in_website>1</show_in_website>
|
533 |
-
<show_in_store>
|
534 |
<depends>
|
535 |
<enable>1</enable>
|
536 |
</depends>
|
@@ -539,9 +548,9 @@
|
|
539 |
<label><![CDATA[ Product image class]]></label>
|
540 |
<frontend_type>text</frontend_type>
|
541 |
<sort_order>90</sort_order>
|
542 |
-
<show_in_default>
|
543 |
<show_in_website>1</show_in_website>
|
544 |
-
<show_in_store>
|
545 |
<depends>
|
546 |
<enable>1</enable>
|
547 |
</depends>
|
@@ -550,9 +559,9 @@
|
|
550 |
<label><![CDATA[ Product name class]]></label>
|
551 |
<frontend_type>text</frontend_type>
|
552 |
<sort_order>95</sort_order>
|
553 |
-
<show_in_default>
|
554 |
<show_in_website>1</show_in_website>
|
555 |
-
<show_in_store>
|
556 |
<depends>
|
557 |
<enable>1</enable>
|
558 |
</depends>
|
@@ -561,9 +570,9 @@
|
|
561 |
<label><![CDATA[ Product description class]]></label>
|
562 |
<frontend_type>text</frontend_type>
|
563 |
<sort_order>100</sort_order>
|
564 |
-
<show_in_default>
|
565 |
<show_in_website>1</show_in_website>
|
566 |
-
<show_in_store>
|
567 |
<depends>
|
568 |
<enable>1</enable>
|
569 |
</depends>
|
@@ -572,9 +581,9 @@
|
|
572 |
<label><![CDATA[ Price container class]]></label>
|
573 |
<frontend_type>text</frontend_type>
|
574 |
<sort_order>105</sort_order>
|
575 |
-
<show_in_default>
|
576 |
<show_in_website>1</show_in_website>
|
577 |
-
<show_in_store>
|
578 |
<depends>
|
579 |
<enable>1</enable>
|
580 |
</depends>
|
@@ -583,9 +592,9 @@
|
|
583 |
<label><![CDATA[ Price class]]></label>
|
584 |
<frontend_type>text</frontend_type>
|
585 |
<sort_order>110</sort_order>
|
586 |
-
<show_in_default>
|
587 |
<show_in_website>1</show_in_website>
|
588 |
-
<show_in_store>
|
589 |
<depends>
|
590 |
<enable>1</enable>
|
591 |
</depends>
|
@@ -597,26 +606,26 @@
|
|
597 |
<label>Right column</label>
|
598 |
<frontend_type>text</frontend_type>
|
599 |
<sort_order>30</sort_order>
|
600 |
-
<show_in_default>
|
601 |
<show_in_website>1</show_in_website>
|
602 |
-
<show_in_store>
|
603 |
<fields>
|
604 |
<enable translate="label">
|
605 |
<label>Enable</label>
|
606 |
<frontend_type>select</frontend_type>
|
607 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
608 |
<sort_order>0</sort_order>
|
609 |
-
<show_in_default>
|
610 |
<show_in_website>1</show_in_website>
|
611 |
-
<show_in_store>
|
612 |
</enable>
|
613 |
<recommendation_label translate="label">
|
614 |
<label>Recommendation area label</label>
|
615 |
<frontend_type>text</frontend_type>
|
616 |
<sort_order>5</sort_order>
|
617 |
-
<show_in_default>
|
618 |
<show_in_website>1</show_in_website>
|
619 |
-
<show_in_store>
|
620 |
<depends>
|
621 |
<enable>1</enable>
|
622 |
</depends>
|
@@ -626,9 +635,9 @@
|
|
626 |
<frontend_type>select</frontend_type>
|
627 |
<source_model>affinityitems/source_recoconfig::right</source_model>
|
628 |
<sort_order>12</sort_order>
|
629 |
-
<show_in_default>
|
630 |
<show_in_website>1</show_in_website>
|
631 |
-
<show_in_store>
|
632 |
<depends>
|
633 |
<enable>1</enable>
|
634 |
</depends>
|
@@ -637,9 +646,9 @@
|
|
637 |
<label>Number of displayed products</label>
|
638 |
<frontend_type>text</frontend_type>
|
639 |
<sort_order>10</sort_order>
|
640 |
-
<show_in_default>
|
641 |
<show_in_website>1</show_in_website>
|
642 |
-
<show_in_store>
|
643 |
<depends>
|
644 |
<enable>1</enable>
|
645 |
</depends>
|
@@ -648,9 +657,9 @@
|
|
648 |
<label>Number of displayed products per line</label>
|
649 |
<frontend_type>text</frontend_type>
|
650 |
<sort_order>12</sort_order>
|
651 |
-
<show_in_default>
|
652 |
<show_in_website>1</show_in_website>
|
653 |
-
<show_in_store>
|
654 |
<depends>
|
655 |
<enable>1</enable>
|
656 |
</depends>
|
@@ -660,9 +669,9 @@
|
|
660 |
<frontend_type>select</frontend_type>
|
661 |
<source_model>affinityitems/source_imagesize</source_model>
|
662 |
<sort_order>15</sort_order>
|
663 |
-
<show_in_default>
|
664 |
<show_in_website>1</show_in_website>
|
665 |
-
<show_in_store>
|
666 |
<depends>
|
667 |
<enable>1</enable>
|
668 |
</depends>
|
@@ -671,9 +680,9 @@
|
|
671 |
<label><![CDATA[<strong>Display settings</strong>]]></label>
|
672 |
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
673 |
<sort_order>60</sort_order>
|
674 |
-
<show_in_default>
|
675 |
<show_in_website>1</show_in_website>
|
676 |
-
<show_in_store>
|
677 |
<depends>
|
678 |
<enable>1</enable>
|
679 |
</depends>
|
@@ -683,9 +692,9 @@
|
|
683 |
<frontend_type>text</frontend_type>
|
684 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
685 |
<sort_order>65</sort_order>
|
686 |
-
<show_in_default>
|
687 |
<show_in_website>1</show_in_website>
|
688 |
-
<show_in_store>
|
689 |
<depends>
|
690 |
<enable>1</enable>
|
691 |
</depends>
|
@@ -694,9 +703,9 @@
|
|
694 |
<label><![CDATA[ Title <strong>class</strong>]]></label>
|
695 |
<frontend_type>text</frontend_type>
|
696 |
<sort_order>70</sort_order>
|
697 |
-
<show_in_default>
|
698 |
<show_in_website>1</show_in_website>
|
699 |
-
<show_in_store>
|
700 |
<depends>
|
701 |
<enable>1</enable>
|
702 |
</depends>
|
@@ -706,9 +715,9 @@
|
|
706 |
<frontend_type>text</frontend_type>
|
707 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
708 |
<sort_order>75</sort_order>
|
709 |
-
<show_in_default>
|
710 |
<show_in_website>1</show_in_website>
|
711 |
-
<show_in_store>
|
712 |
<depends>
|
713 |
<enable>1</enable>
|
714 |
</depends>
|
@@ -718,9 +727,9 @@
|
|
718 |
<frontend_type>text</frontend_type>
|
719 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
720 |
<sort_order>80</sort_order>
|
721 |
-
<show_in_default>
|
722 |
<show_in_website>1</show_in_website>
|
723 |
-
<show_in_store>
|
724 |
<depends>
|
725 |
<enable>1</enable>
|
726 |
</depends>
|
@@ -730,9 +739,9 @@
|
|
730 |
<frontend_type>text</frontend_type>
|
731 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
732 |
<sort_order>85</sort_order>
|
733 |
-
<show_in_default>
|
734 |
<show_in_website>1</show_in_website>
|
735 |
-
<show_in_store>
|
736 |
<depends>
|
737 |
<enable>1</enable>
|
738 |
</depends>
|
@@ -741,9 +750,9 @@
|
|
741 |
<label><![CDATA[ Product image class]]></label>
|
742 |
<frontend_type>text</frontend_type>
|
743 |
<sort_order>90</sort_order>
|
744 |
-
<show_in_default>
|
745 |
<show_in_website>1</show_in_website>
|
746 |
-
<show_in_store>
|
747 |
<depends>
|
748 |
<enable>1</enable>
|
749 |
</depends>
|
@@ -752,9 +761,9 @@
|
|
752 |
<label><![CDATA[ Product name class]]></label>
|
753 |
<frontend_type>text</frontend_type>
|
754 |
<sort_order>95</sort_order>
|
755 |
-
<show_in_default>
|
756 |
<show_in_website>1</show_in_website>
|
757 |
-
<show_in_store>
|
758 |
<depends>
|
759 |
<enable>1</enable>
|
760 |
</depends>
|
@@ -763,9 +772,9 @@
|
|
763 |
<label><![CDATA[ Product description class]]></label>
|
764 |
<frontend_type>text</frontend_type>
|
765 |
<sort_order>100</sort_order>
|
766 |
-
<show_in_default>
|
767 |
<show_in_website>1</show_in_website>
|
768 |
-
<show_in_store>
|
769 |
<depends>
|
770 |
<enable>1</enable>
|
771 |
</depends>
|
@@ -774,9 +783,9 @@
|
|
774 |
<label><![CDATA[ Price container class]]></label>
|
775 |
<frontend_type>text</frontend_type>
|
776 |
<sort_order>105</sort_order>
|
777 |
-
<show_in_default>
|
778 |
<show_in_website>1</show_in_website>
|
779 |
-
<show_in_store>
|
780 |
<depends>
|
781 |
<enable>1</enable>
|
782 |
</depends>
|
@@ -785,9 +794,9 @@
|
|
785 |
<label><![CDATA[ Price class]]></label>
|
786 |
<frontend_type>text</frontend_type>
|
787 |
<sort_order>110</sort_order>
|
788 |
-
<show_in_default>
|
789 |
<show_in_website>1</show_in_website>
|
790 |
-
<show_in_store>
|
791 |
<depends>
|
792 |
<enable>1</enable>
|
793 |
</depends>
|
@@ -799,26 +808,26 @@
|
|
799 |
<label>Cart page</label>
|
800 |
<frontend_type>text</frontend_type>
|
801 |
<sort_order>40</sort_order>
|
802 |
-
<show_in_default>
|
803 |
<show_in_website>1</show_in_website>
|
804 |
-
<show_in_store>
|
805 |
<fields>
|
806 |
<enable translate="label">
|
807 |
<label>Enable</label>
|
808 |
<frontend_type>select</frontend_type>
|
809 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
810 |
<sort_order>0</sort_order>
|
811 |
-
<show_in_default>
|
812 |
<show_in_website>1</show_in_website>
|
813 |
-
<show_in_store>
|
814 |
</enable>
|
815 |
<recommendation_label translate="label">
|
816 |
<label>Recommendation area label</label>
|
817 |
<frontend_type>text</frontend_type>
|
818 |
<sort_order>5</sort_order>
|
819 |
-
<show_in_default>
|
820 |
<show_in_website>1</show_in_website>
|
821 |
-
<show_in_store>
|
822 |
<depends>
|
823 |
<enable>1</enable>
|
824 |
</depends>
|
@@ -828,9 +837,9 @@
|
|
828 |
<frontend_type>select</frontend_type>
|
829 |
<source_model>affinityitems/source_recoconfig::cart</source_model>
|
830 |
<sort_order>12</sort_order>
|
831 |
-
<show_in_default>
|
832 |
<show_in_website>1</show_in_website>
|
833 |
-
<show_in_store>
|
834 |
<depends>
|
835 |
<enable>1</enable>
|
836 |
</depends>
|
@@ -839,9 +848,9 @@
|
|
839 |
<label>Number of displayed products</label>
|
840 |
<frontend_type>text</frontend_type>
|
841 |
<sort_order>10</sort_order>
|
842 |
-
<show_in_default>
|
843 |
<show_in_website>1</show_in_website>
|
844 |
-
<show_in_store>
|
845 |
<depends>
|
846 |
<enable>1</enable>
|
847 |
</depends>
|
@@ -850,9 +859,9 @@
|
|
850 |
<label>Number of displayed products per line</label>
|
851 |
<frontend_type>text</frontend_type>
|
852 |
<sort_order>12</sort_order>
|
853 |
-
<show_in_default>
|
854 |
<show_in_website>1</show_in_website>
|
855 |
-
<show_in_store>
|
856 |
<depends>
|
857 |
<enable>1</enable>
|
858 |
</depends>
|
@@ -862,9 +871,9 @@
|
|
862 |
<frontend_type>select</frontend_type>
|
863 |
<source_model>affinityitems/source_imagesize</source_model>
|
864 |
<sort_order>15</sort_order>
|
865 |
-
<show_in_default>
|
866 |
<show_in_website>1</show_in_website>
|
867 |
-
<show_in_store>
|
868 |
<depends>
|
869 |
<enable>1</enable>
|
870 |
</depends>
|
@@ -873,9 +882,9 @@
|
|
873 |
<label><![CDATA[<strong>Display settings</strong>]]></label>
|
874 |
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
875 |
<sort_order>60</sort_order>
|
876 |
-
<show_in_default>
|
877 |
<show_in_website>1</show_in_website>
|
878 |
-
<show_in_store>
|
879 |
<depends>
|
880 |
<enable>1</enable>
|
881 |
</depends>
|
@@ -885,9 +894,9 @@
|
|
885 |
<frontend_type>text</frontend_type>
|
886 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
887 |
<sort_order>65</sort_order>
|
888 |
-
<show_in_default>
|
889 |
<show_in_website>1</show_in_website>
|
890 |
-
<show_in_store>
|
891 |
<depends>
|
892 |
<enable>1</enable>
|
893 |
</depends>
|
@@ -896,9 +905,9 @@
|
|
896 |
<label><![CDATA[ Title <strong>class</strong>]]></label>
|
897 |
<frontend_type>text</frontend_type>
|
898 |
<sort_order>70</sort_order>
|
899 |
-
<show_in_default>
|
900 |
<show_in_website>1</show_in_website>
|
901 |
-
<show_in_store>
|
902 |
<depends>
|
903 |
<enable>1</enable>
|
904 |
</depends>
|
@@ -908,9 +917,9 @@
|
|
908 |
<frontend_type>text</frontend_type>
|
909 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
910 |
<sort_order>75</sort_order>
|
911 |
-
<show_in_default>
|
912 |
<show_in_website>1</show_in_website>
|
913 |
-
<show_in_store>
|
914 |
<depends>
|
915 |
<enable>1</enable>
|
916 |
</depends>
|
@@ -920,9 +929,9 @@
|
|
920 |
<frontend_type>text</frontend_type>
|
921 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
922 |
<sort_order>80</sort_order>
|
923 |
-
<show_in_default>
|
924 |
<show_in_website>1</show_in_website>
|
925 |
-
<show_in_store>
|
926 |
<depends>
|
927 |
<enable>1</enable>
|
928 |
</depends>
|
@@ -932,9 +941,9 @@
|
|
932 |
<frontend_type>text</frontend_type>
|
933 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
934 |
<sort_order>85</sort_order>
|
935 |
-
<show_in_default>
|
936 |
<show_in_website>1</show_in_website>
|
937 |
-
<show_in_store>
|
938 |
<depends>
|
939 |
<enable>1</enable>
|
940 |
</depends>
|
@@ -943,9 +952,9 @@
|
|
943 |
<label><![CDATA[ Product image class]]></label>
|
944 |
<frontend_type>text</frontend_type>
|
945 |
<sort_order>90</sort_order>
|
946 |
-
<show_in_default>
|
947 |
<show_in_website>1</show_in_website>
|
948 |
-
<show_in_store>
|
949 |
<depends>
|
950 |
<enable>1</enable>
|
951 |
</depends>
|
@@ -954,9 +963,9 @@
|
|
954 |
<label><![CDATA[ Product name class]]></label>
|
955 |
<frontend_type>text</frontend_type>
|
956 |
<sort_order>95</sort_order>
|
957 |
-
<show_in_default>
|
958 |
<show_in_website>1</show_in_website>
|
959 |
-
<show_in_store>
|
960 |
<depends>
|
961 |
<enable>1</enable>
|
962 |
</depends>
|
@@ -965,9 +974,9 @@
|
|
965 |
<label><![CDATA[ Product description class]]></label>
|
966 |
<frontend_type>text</frontend_type>
|
967 |
<sort_order>100</sort_order>
|
968 |
-
<show_in_default>
|
969 |
<show_in_website>1</show_in_website>
|
970 |
-
<show_in_store>
|
971 |
<depends>
|
972 |
<enable>1</enable>
|
973 |
</depends>
|
@@ -976,9 +985,9 @@
|
|
976 |
<label><![CDATA[ Price container class]]></label>
|
977 |
<frontend_type>text</frontend_type>
|
978 |
<sort_order>105</sort_order>
|
979 |
-
<show_in_default>
|
980 |
<show_in_website>1</show_in_website>
|
981 |
-
<show_in_store>
|
982 |
<depends>
|
983 |
<enable>1</enable>
|
984 |
</depends>
|
@@ -987,9 +996,9 @@
|
|
987 |
<label><![CDATA[ Price class]]></label>
|
988 |
<frontend_type>text</frontend_type>
|
989 |
<sort_order>110</sort_order>
|
990 |
-
<show_in_default>
|
991 |
<show_in_website>1</show_in_website>
|
992 |
-
<show_in_store>
|
993 |
<depends>
|
994 |
<enable>1</enable>
|
995 |
</depends>
|
@@ -1001,26 +1010,26 @@
|
|
1001 |
<label>Product page</label>
|
1002 |
<frontend_type>text</frontend_type>
|
1003 |
<sort_order>50</sort_order>
|
1004 |
-
<show_in_default>
|
1005 |
<show_in_website>1</show_in_website>
|
1006 |
-
<show_in_store>
|
1007 |
<fields>
|
1008 |
<enable translate="label">
|
1009 |
<label>Enable</label>
|
1010 |
<frontend_type>select</frontend_type>
|
1011 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
1012 |
<sort_order>0</sort_order>
|
1013 |
-
<show_in_default>
|
1014 |
<show_in_website>1</show_in_website>
|
1015 |
-
<show_in_store>
|
1016 |
</enable>
|
1017 |
<recommendation_label translate="label">
|
1018 |
<label>Recommendation area label</label>
|
1019 |
<frontend_type>text</frontend_type>
|
1020 |
<sort_order>5</sort_order>
|
1021 |
-
<show_in_default>
|
1022 |
<show_in_website>1</show_in_website>
|
1023 |
-
<show_in_store>
|
1024 |
<depends>
|
1025 |
<enable>1</enable>
|
1026 |
</depends>
|
@@ -1030,9 +1039,9 @@
|
|
1030 |
<frontend_type>select</frontend_type>
|
1031 |
<source_model>affinityitems/source_recoconfig::product</source_model>
|
1032 |
<sort_order>12</sort_order>
|
1033 |
-
<show_in_default>
|
1034 |
<show_in_website>1</show_in_website>
|
1035 |
-
<show_in_store>
|
1036 |
<depends>
|
1037 |
<enable>1</enable>
|
1038 |
</depends>
|
@@ -1041,9 +1050,9 @@
|
|
1041 |
<label>Number of displayed products</label>
|
1042 |
<frontend_type>text</frontend_type>
|
1043 |
<sort_order>10</sort_order>
|
1044 |
-
<show_in_default>
|
1045 |
<show_in_website>1</show_in_website>
|
1046 |
-
<show_in_store>
|
1047 |
<depends>
|
1048 |
<enable>1</enable>
|
1049 |
</depends>
|
@@ -1052,9 +1061,9 @@
|
|
1052 |
<label>Number of displayed products per line</label>
|
1053 |
<frontend_type>text</frontend_type>
|
1054 |
<sort_order>12</sort_order>
|
1055 |
-
<show_in_default>
|
1056 |
<show_in_website>1</show_in_website>
|
1057 |
-
<show_in_store>
|
1058 |
<depends>
|
1059 |
<enable>1</enable>
|
1060 |
</depends>
|
@@ -1064,9 +1073,9 @@
|
|
1064 |
<frontend_type>select</frontend_type>
|
1065 |
<source_model>affinityitems/source_imagesize</source_model>
|
1066 |
<sort_order>15</sort_order>
|
1067 |
-
<show_in_default>
|
1068 |
<show_in_website>1</show_in_website>
|
1069 |
-
<show_in_store>
|
1070 |
<depends>
|
1071 |
<enable>1</enable>
|
1072 |
</depends>
|
@@ -1075,9 +1084,9 @@
|
|
1075 |
<label><![CDATA[<strong>Display settings</strong>]]></label>
|
1076 |
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
1077 |
<sort_order>60</sort_order>
|
1078 |
-
<show_in_default>
|
1079 |
<show_in_website>1</show_in_website>
|
1080 |
-
<show_in_store>
|
1081 |
<depends>
|
1082 |
<enable>1</enable>
|
1083 |
</depends>
|
@@ -1087,9 +1096,9 @@
|
|
1087 |
<frontend_type>text</frontend_type>
|
1088 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
1089 |
<sort_order>65</sort_order>
|
1090 |
-
<show_in_default>
|
1091 |
<show_in_website>1</show_in_website>
|
1092 |
-
<show_in_store>
|
1093 |
<depends>
|
1094 |
<enable>1</enable>
|
1095 |
</depends>
|
@@ -1098,9 +1107,9 @@
|
|
1098 |
<label><![CDATA[ Title <strong>class</strong>]]></label>
|
1099 |
<frontend_type>text</frontend_type>
|
1100 |
<sort_order>70</sort_order>
|
1101 |
-
<show_in_default>
|
1102 |
<show_in_website>1</show_in_website>
|
1103 |
-
<show_in_store>
|
1104 |
<depends>
|
1105 |
<enable>1</enable>
|
1106 |
</depends>
|
@@ -1110,9 +1119,9 @@
|
|
1110 |
<frontend_type>text</frontend_type>
|
1111 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
1112 |
<sort_order>75</sort_order>
|
1113 |
-
<show_in_default>
|
1114 |
<show_in_website>1</show_in_website>
|
1115 |
-
<show_in_store>
|
1116 |
<depends>
|
1117 |
<enable>1</enable>
|
1118 |
</depends>
|
@@ -1122,9 +1131,9 @@
|
|
1122 |
<frontend_type>text</frontend_type>
|
1123 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
1124 |
<sort_order>80</sort_order>
|
1125 |
-
<show_in_default>
|
1126 |
<show_in_website>1</show_in_website>
|
1127 |
-
<show_in_store>
|
1128 |
<depends>
|
1129 |
<enable>1</enable>
|
1130 |
</depends>
|
@@ -1134,9 +1143,9 @@
|
|
1134 |
<frontend_type>text</frontend_type>
|
1135 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
1136 |
<sort_order>85</sort_order>
|
1137 |
-
<show_in_default>
|
1138 |
<show_in_website>1</show_in_website>
|
1139 |
-
<show_in_store>
|
1140 |
<depends>
|
1141 |
<enable>1</enable>
|
1142 |
</depends>
|
@@ -1145,9 +1154,9 @@
|
|
1145 |
<label><![CDATA[ Product image class]]></label>
|
1146 |
<frontend_type>text</frontend_type>
|
1147 |
<sort_order>90</sort_order>
|
1148 |
-
<show_in_default>
|
1149 |
<show_in_website>1</show_in_website>
|
1150 |
-
<show_in_store>
|
1151 |
<depends>
|
1152 |
<enable>1</enable>
|
1153 |
</depends>
|
@@ -1156,9 +1165,9 @@
|
|
1156 |
<label><![CDATA[ Product name class]]></label>
|
1157 |
<frontend_type>text</frontend_type>
|
1158 |
<sort_order>95</sort_order>
|
1159 |
-
<show_in_default>
|
1160 |
<show_in_website>1</show_in_website>
|
1161 |
-
<show_in_store>
|
1162 |
<depends>
|
1163 |
<enable>1</enable>
|
1164 |
</depends>
|
@@ -1167,9 +1176,9 @@
|
|
1167 |
<label><![CDATA[ Product description class]]></label>
|
1168 |
<frontend_type>text</frontend_type>
|
1169 |
<sort_order>100</sort_order>
|
1170 |
-
<show_in_default>
|
1171 |
<show_in_website>1</show_in_website>
|
1172 |
-
<show_in_store>
|
1173 |
<depends>
|
1174 |
<enable>1</enable>
|
1175 |
</depends>
|
@@ -1178,9 +1187,9 @@
|
|
1178 |
<label><![CDATA[ Price container class]]></label>
|
1179 |
<frontend_type>text</frontend_type>
|
1180 |
<sort_order>105</sort_order>
|
1181 |
-
<show_in_default>
|
1182 |
<show_in_website>1</show_in_website>
|
1183 |
-
<show_in_store>
|
1184 |
<depends>
|
1185 |
<enable>1</enable>
|
1186 |
</depends>
|
@@ -1189,9 +1198,9 @@
|
|
1189 |
<label><![CDATA[ Price class]]></label>
|
1190 |
<frontend_type>text</frontend_type>
|
1191 |
<sort_order>110</sort_order>
|
1192 |
-
<show_in_default>
|
1193 |
<show_in_website>1</show_in_website>
|
1194 |
-
<show_in_store>
|
1195 |
<depends>
|
1196 |
<enable>1</enable>
|
1197 |
</depends>
|
@@ -1203,26 +1212,26 @@
|
|
1203 |
<label>Search page</label>
|
1204 |
<frontend_type>text</frontend_type>
|
1205 |
<sort_order>60</sort_order>
|
1206 |
-
<show_in_default>
|
1207 |
<show_in_website>1</show_in_website>
|
1208 |
-
<show_in_store>
|
1209 |
<fields>
|
1210 |
<enable translate="label">
|
1211 |
<label>Enable</label>
|
1212 |
<frontend_type>select</frontend_type>
|
1213 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
1214 |
<sort_order>0</sort_order>
|
1215 |
-
<show_in_default>
|
1216 |
<show_in_website>1</show_in_website>
|
1217 |
-
<show_in_store>
|
1218 |
</enable>
|
1219 |
<recommendation_label translate="label">
|
1220 |
<label>Recommendation area label</label>
|
1221 |
<frontend_type>text</frontend_type>
|
1222 |
<sort_order>5</sort_order>
|
1223 |
-
<show_in_default>
|
1224 |
<show_in_website>1</show_in_website>
|
1225 |
-
<show_in_store>
|
1226 |
<depends>
|
1227 |
<enable>1</enable>
|
1228 |
</depends>
|
@@ -1232,9 +1241,9 @@
|
|
1232 |
<frontend_type>select</frontend_type>
|
1233 |
<source_model>affinityitems/source_recoconfig::search</source_model>
|
1234 |
<sort_order>12</sort_order>
|
1235 |
-
<show_in_default>
|
1236 |
<show_in_website>1</show_in_website>
|
1237 |
-
<show_in_store>
|
1238 |
<depends>
|
1239 |
<enable>1</enable>
|
1240 |
</depends>
|
@@ -1243,9 +1252,9 @@
|
|
1243 |
<label>Number of displayed products</label>
|
1244 |
<frontend_type>text</frontend_type>
|
1245 |
<sort_order>10</sort_order>
|
1246 |
-
<show_in_default>
|
1247 |
<show_in_website>1</show_in_website>
|
1248 |
-
<show_in_store>
|
1249 |
<depends>
|
1250 |
<enable>1</enable>
|
1251 |
</depends>
|
@@ -1254,9 +1263,9 @@
|
|
1254 |
<label>Number of displayed products per line</label>
|
1255 |
<frontend_type>text</frontend_type>
|
1256 |
<sort_order>12</sort_order>
|
1257 |
-
<show_in_default>
|
1258 |
<show_in_website>1</show_in_website>
|
1259 |
-
<show_in_store>
|
1260 |
<depends>
|
1261 |
<enable>1</enable>
|
1262 |
</depends>
|
@@ -1266,9 +1275,9 @@
|
|
1266 |
<frontend_type>select</frontend_type>
|
1267 |
<source_model>affinityitems/source_imagesize</source_model>
|
1268 |
<sort_order>15</sort_order>
|
1269 |
-
<show_in_default>
|
1270 |
<show_in_website>1</show_in_website>
|
1271 |
-
<show_in_store>
|
1272 |
<depends>
|
1273 |
<enable>1</enable>
|
1274 |
</depends>
|
@@ -1277,9 +1286,9 @@
|
|
1277 |
<label><![CDATA[<strong>Display settings</strong>]]></label>
|
1278 |
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
1279 |
<sort_order>60</sort_order>
|
1280 |
-
<show_in_default>
|
1281 |
<show_in_website>1</show_in_website>
|
1282 |
-
<show_in_store>
|
1283 |
<depends>
|
1284 |
<enable>1</enable>
|
1285 |
</depends>
|
@@ -1289,9 +1298,9 @@
|
|
1289 |
<frontend_type>text</frontend_type>
|
1290 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
1291 |
<sort_order>65</sort_order>
|
1292 |
-
<show_in_default>
|
1293 |
<show_in_website>1</show_in_website>
|
1294 |
-
<show_in_store>
|
1295 |
<depends>
|
1296 |
<enable>1</enable>
|
1297 |
</depends>
|
@@ -1300,9 +1309,9 @@
|
|
1300 |
<label><![CDATA[ Title <strong>class</strong>]]></label>
|
1301 |
<frontend_type>text</frontend_type>
|
1302 |
<sort_order>70</sort_order>
|
1303 |
-
<show_in_default>
|
1304 |
<show_in_website>1</show_in_website>
|
1305 |
-
<show_in_store>
|
1306 |
<depends>
|
1307 |
<enable>1</enable>
|
1308 |
</depends>
|
@@ -1312,9 +1321,9 @@
|
|
1312 |
<frontend_type>text</frontend_type>
|
1313 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
1314 |
<sort_order>75</sort_order>
|
1315 |
-
<show_in_default>
|
1316 |
<show_in_website>1</show_in_website>
|
1317 |
-
<show_in_store>
|
1318 |
<depends>
|
1319 |
<enable>1</enable>
|
1320 |
</depends>
|
@@ -1324,9 +1333,9 @@
|
|
1324 |
<frontend_type>text</frontend_type>
|
1325 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
1326 |
<sort_order>80</sort_order>
|
1327 |
-
<show_in_default>
|
1328 |
<show_in_website>1</show_in_website>
|
1329 |
-
<show_in_store>
|
1330 |
<depends>
|
1331 |
<enable>1</enable>
|
1332 |
</depends>
|
@@ -1336,9 +1345,9 @@
|
|
1336 |
<frontend_type>text</frontend_type>
|
1337 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
1338 |
<sort_order>85</sort_order>
|
1339 |
-
<show_in_default>
|
1340 |
<show_in_website>1</show_in_website>
|
1341 |
-
<show_in_store>
|
1342 |
<depends>
|
1343 |
<enable>1</enable>
|
1344 |
</depends>
|
@@ -1347,9 +1356,9 @@
|
|
1347 |
<label><![CDATA[ Product image class]]></label>
|
1348 |
<frontend_type>text</frontend_type>
|
1349 |
<sort_order>90</sort_order>
|
1350 |
-
<show_in_default>
|
1351 |
<show_in_website>1</show_in_website>
|
1352 |
-
<show_in_store>
|
1353 |
<depends>
|
1354 |
<enable>1</enable>
|
1355 |
</depends>
|
@@ -1358,9 +1367,9 @@
|
|
1358 |
<label><![CDATA[ Product name class]]></label>
|
1359 |
<frontend_type>text</frontend_type>
|
1360 |
<sort_order>95</sort_order>
|
1361 |
-
<show_in_default>
|
1362 |
<show_in_website>1</show_in_website>
|
1363 |
-
<show_in_store>
|
1364 |
<depends>
|
1365 |
<enable>1</enable>
|
1366 |
</depends>
|
@@ -1369,9 +1378,9 @@
|
|
1369 |
<label><![CDATA[ Product description class]]></label>
|
1370 |
<frontend_type>text</frontend_type>
|
1371 |
<sort_order>100</sort_order>
|
1372 |
-
<show_in_default>
|
1373 |
<show_in_website>1</show_in_website>
|
1374 |
-
<show_in_store>
|
1375 |
<depends>
|
1376 |
<enable>1</enable>
|
1377 |
</depends>
|
@@ -1380,9 +1389,9 @@
|
|
1380 |
<label><![CDATA[ Price container class]]></label>
|
1381 |
<frontend_type>text</frontend_type>
|
1382 |
<sort_order>105</sort_order>
|
1383 |
-
<show_in_default>
|
1384 |
<show_in_website>1</show_in_website>
|
1385 |
-
<show_in_store>
|
1386 |
<depends>
|
1387 |
<enable>1</enable>
|
1388 |
</depends>
|
@@ -1391,9 +1400,9 @@
|
|
1391 |
<label><![CDATA[ Price class]]></label>
|
1392 |
<frontend_type>text</frontend_type>
|
1393 |
<sort_order>110</sort_order>
|
1394 |
-
<show_in_default>
|
1395 |
<show_in_website>1</show_in_website>
|
1396 |
-
<show_in_store>
|
1397 |
<depends>
|
1398 |
<enable>1</enable>
|
1399 |
</depends>
|
@@ -1405,26 +1414,26 @@
|
|
1405 |
<label>Category page</label>
|
1406 |
<frontend_type>text</frontend_type>
|
1407 |
<sort_order>70</sort_order>
|
1408 |
-
<show_in_default>
|
1409 |
<show_in_website>1</show_in_website>
|
1410 |
-
<show_in_store>
|
1411 |
<fields>
|
1412 |
<enable translate="label">
|
1413 |
<label>Enable</label>
|
1414 |
<frontend_type>select</frontend_type>
|
1415 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
1416 |
<sort_order>0</sort_order>
|
1417 |
-
<show_in_default>
|
1418 |
<show_in_website>1</show_in_website>
|
1419 |
-
<show_in_store>
|
1420 |
</enable>
|
1421 |
<recommendation_label translate="label">
|
1422 |
<label>Recommendation area label</label>
|
1423 |
<frontend_type>text</frontend_type>
|
1424 |
<sort_order>5</sort_order>
|
1425 |
-
<show_in_default>
|
1426 |
<show_in_website>1</show_in_website>
|
1427 |
-
<show_in_store>
|
1428 |
<depends>
|
1429 |
<enable>1</enable>
|
1430 |
</depends>
|
@@ -1434,9 +1443,9 @@
|
|
1434 |
<frontend_type>select</frontend_type>
|
1435 |
<source_model>affinityitems/source_recoconfig::category</source_model>
|
1436 |
<sort_order>12</sort_order>
|
1437 |
-
<show_in_default>
|
1438 |
<show_in_website>1</show_in_website>
|
1439 |
-
<show_in_store>
|
1440 |
<depends>
|
1441 |
<enable>1</enable>
|
1442 |
</depends>
|
@@ -1445,9 +1454,9 @@
|
|
1445 |
<label>Number of displayed products</label>
|
1446 |
<frontend_type>text</frontend_type>
|
1447 |
<sort_order>10</sort_order>
|
1448 |
-
<show_in_default>
|
1449 |
<show_in_website>1</show_in_website>
|
1450 |
-
<show_in_store>
|
1451 |
<depends>
|
1452 |
<enable>1</enable>
|
1453 |
</depends>
|
@@ -1456,9 +1465,9 @@
|
|
1456 |
<label>Number of displayed products per line</label>
|
1457 |
<frontend_type>text</frontend_type>
|
1458 |
<sort_order>12</sort_order>
|
1459 |
-
<show_in_default>
|
1460 |
<show_in_website>1</show_in_website>
|
1461 |
-
<show_in_store>
|
1462 |
<depends>
|
1463 |
<enable>1</enable>
|
1464 |
</depends>
|
@@ -1468,9 +1477,9 @@
|
|
1468 |
<frontend_type>select</frontend_type>
|
1469 |
<source_model>affinityitems/source_imagesize</source_model>
|
1470 |
<sort_order>15</sort_order>
|
1471 |
-
<show_in_default>
|
1472 |
<show_in_website>1</show_in_website>
|
1473 |
-
<show_in_store>
|
1474 |
<depends>
|
1475 |
<enable>1</enable>
|
1476 |
</depends>
|
@@ -1479,9 +1488,9 @@
|
|
1479 |
<label><![CDATA[<strong>Display settings</strong>]]></label>
|
1480 |
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
1481 |
<sort_order>60</sort_order>
|
1482 |
-
<show_in_default>
|
1483 |
<show_in_website>1</show_in_website>
|
1484 |
-
<show_in_store>
|
1485 |
<depends>
|
1486 |
<enable>1</enable>
|
1487 |
</depends>
|
@@ -1491,9 +1500,9 @@
|
|
1491 |
<frontend_type>text</frontend_type>
|
1492 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
1493 |
<sort_order>65</sort_order>
|
1494 |
-
<show_in_default>
|
1495 |
<show_in_website>1</show_in_website>
|
1496 |
-
<show_in_store>
|
1497 |
<depends>
|
1498 |
<enable>1</enable>
|
1499 |
</depends>
|
@@ -1502,9 +1511,9 @@
|
|
1502 |
<label><![CDATA[ Title <strong>class</strong>]]></label>
|
1503 |
<frontend_type>text</frontend_type>
|
1504 |
<sort_order>70</sort_order>
|
1505 |
-
<show_in_default>
|
1506 |
<show_in_website>1</show_in_website>
|
1507 |
-
<show_in_store>
|
1508 |
<depends>
|
1509 |
<enable>1</enable>
|
1510 |
</depends>
|
@@ -1514,9 +1523,9 @@
|
|
1514 |
<frontend_type>text</frontend_type>
|
1515 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
1516 |
<sort_order>75</sort_order>
|
1517 |
-
<show_in_default>
|
1518 |
<show_in_website>1</show_in_website>
|
1519 |
-
<show_in_store>
|
1520 |
<depends>
|
1521 |
<enable>1</enable>
|
1522 |
</depends>
|
@@ -1526,9 +1535,9 @@
|
|
1526 |
<frontend_type>text</frontend_type>
|
1527 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
1528 |
<sort_order>80</sort_order>
|
1529 |
-
<show_in_default>
|
1530 |
<show_in_website>1</show_in_website>
|
1531 |
-
<show_in_store>
|
1532 |
<depends>
|
1533 |
<enable>1</enable>
|
1534 |
</depends>
|
@@ -1538,9 +1547,9 @@
|
|
1538 |
<frontend_type>text</frontend_type>
|
1539 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
1540 |
<sort_order>85</sort_order>
|
1541 |
-
<show_in_default>
|
1542 |
<show_in_website>1</show_in_website>
|
1543 |
-
<show_in_store>
|
1544 |
<depends>
|
1545 |
<enable>1</enable>
|
1546 |
</depends>
|
@@ -1549,9 +1558,9 @@
|
|
1549 |
<label><![CDATA[ Product image class]]></label>
|
1550 |
<frontend_type>text</frontend_type>
|
1551 |
<sort_order>90</sort_order>
|
1552 |
-
<show_in_default>
|
1553 |
<show_in_website>1</show_in_website>
|
1554 |
-
<show_in_store>
|
1555 |
<depends>
|
1556 |
<enable>1</enable>
|
1557 |
</depends>
|
@@ -1560,9 +1569,9 @@
|
|
1560 |
<label><![CDATA[ Product name class]]></label>
|
1561 |
<frontend_type>text</frontend_type>
|
1562 |
<sort_order>95</sort_order>
|
1563 |
-
<show_in_default>
|
1564 |
<show_in_website>1</show_in_website>
|
1565 |
-
<show_in_store>
|
1566 |
<depends>
|
1567 |
<enable>1</enable>
|
1568 |
</depends>
|
@@ -1571,9 +1580,9 @@
|
|
1571 |
<label><![CDATA[ Product description class]]></label>
|
1572 |
<frontend_type>text</frontend_type>
|
1573 |
<sort_order>100</sort_order>
|
1574 |
-
<show_in_default>
|
1575 |
<show_in_website>1</show_in_website>
|
1576 |
-
<show_in_store>
|
1577 |
<depends>
|
1578 |
<enable>1</enable>
|
1579 |
</depends>
|
@@ -1582,9 +1591,9 @@
|
|
1582 |
<label><![CDATA[ Price container class]]></label>
|
1583 |
<frontend_type>text</frontend_type>
|
1584 |
<sort_order>105</sort_order>
|
1585 |
-
<show_in_default>
|
1586 |
<show_in_website>1</show_in_website>
|
1587 |
-
<show_in_store>
|
1588 |
<depends>
|
1589 |
<enable>1</enable>
|
1590 |
</depends>
|
@@ -1593,9 +1602,9 @@
|
|
1593 |
<label><![CDATA[ Price class]]></label>
|
1594 |
<frontend_type>text</frontend_type>
|
1595 |
<sort_order>110</sort_order>
|
1596 |
-
<show_in_default>
|
1597 |
<show_in_website>1</show_in_website>
|
1598 |
-
<show_in_store>
|
1599 |
<depends>
|
1600 |
<enable>1</enable>
|
1601 |
</depends>
|
24 |
<show_in_website>1</show_in_website>
|
25 |
<show_in_store>1</show_in_store>
|
26 |
<fields>
|
27 |
+
<heading>
|
28 |
+
<label><![CDATA[<strong>Please select website!</strong>]]></label>
|
29 |
+
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
30 |
+
<sort_order>0</sort_order>
|
31 |
+
<show_in_default>1</show_in_default>
|
32 |
+
<show_in_website>0</show_in_website>
|
33 |
+
<show_in_store>1</show_in_store>
|
34 |
+
</heading>
|
35 |
<enable translate="label">
|
36 |
<label>Activation</label>
|
37 |
<frontend_type>select</frontend_type>
|
38 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
39 |
<sort_order>0</sort_order>
|
40 |
+
<show_in_default>0</show_in_default>
|
41 |
<show_in_website>1</show_in_website>
|
42 |
+
<show_in_store>0</show_in_store>
|
43 |
</enable>
|
44 |
<dev_prod translate="label">
|
45 |
<label>Enviroment</label>
|
46 |
<frontend_type>select</frontend_type>
|
47 |
<source_model>affinityitems/source_enviroment</source_model>
|
48 |
<sort_order>3</sort_order>
|
49 |
+
<show_in_default>0</show_in_default>
|
50 |
<show_in_website>1</show_in_website>
|
51 |
+
<show_in_store>0</show_in_store>
|
52 |
<comment><![CDATA[You will be logged out from affinity server on change]]></comment>
|
53 |
</dev_prod>
|
54 |
<version translate="label">
|
56 |
<frontend_type>text</frontend_type>
|
57 |
<frontend_model>affinityitems/renderer_config_version</frontend_model>
|
58 |
<sort_order>20</sort_order>
|
59 |
+
<show_in_default>0</show_in_default>
|
60 |
+
<show_in_website>1</show_in_website>
|
61 |
<show_in_store>0</show_in_store>
|
62 |
<depends>
|
63 |
<enable>1</enable>
|
69 |
<label>Advanced configuration</label>
|
70 |
<frontend_type>text</frontend_type>
|
71 |
<sort_order>3</sort_order>
|
72 |
+
<show_in_default>0</show_in_default>
|
73 |
<show_in_website>1</show_in_website>
|
74 |
+
<show_in_store>0</show_in_store>
|
75 |
<fields>
|
76 |
<heading>
|
77 |
<label><![CDATA[<strong>To secure the access to the recommendations, please indicate the servers that are allowed to query these recommendations</strong>]]></label>
|
78 |
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
79 |
<sort_order>5</sort_order>
|
80 |
+
<show_in_default>0</show_in_default>
|
81 |
<show_in_website>1</show_in_website>
|
82 |
+
<show_in_store>0</show_in_store>
|
83 |
</heading>
|
84 |
<server_ip>
|
85 |
<label>Server access</label>
|
86 |
<frontend_model>affinityitems/renderer_config_serverlist</frontend_model>
|
87 |
<backend_model>adminhtml/system_config_backend_serialized</backend_model>
|
88 |
<sort_order>10</sort_order>
|
89 |
+
<show_in_default>0</show_in_default>
|
90 |
<show_in_website>1</show_in_website>
|
91 |
+
<show_in_store>0</show_in_store>
|
92 |
<can_be_empty>1</can_be_empty>
|
93 |
<comment><![CDATA[IP list]]></comment>
|
94 |
</server_ip>
|
97 |
<frontend_type>select</frontend_type>
|
98 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
99 |
<sort_order>30</sort_order>
|
100 |
+
<show_in_default>0</show_in_default>
|
101 |
<show_in_website>1</show_in_website>
|
102 |
+
<show_in_store>0</show_in_store>
|
103 |
<comment><![CDATA[If this box is set to YES, we will delete yours personal data on our platform after the uninstall]]></comment>
|
104 |
<tooltip><![CDATA[
|
105 |
This option allows you to avoid the resynchronization step when installing a new version of the module.]]></tooltip>
|
108 |
<label>Number of elements to be synced</label>
|
109 |
<frontend_type>text</frontend_type>
|
110 |
<sort_order>50</sort_order>
|
111 |
+
<show_in_default>0</show_in_default>
|
112 |
<show_in_website>1</show_in_website>
|
113 |
+
<show_in_store>0</show_in_store>
|
114 |
<comment><![CDATA[default value is 300]]></comment>
|
115 |
<validate>validate-number</validate>
|
116 |
<tooltip><![CDATA[
|
120 |
<label><![CDATA[<strong>Additional CSS</strong>]]></label>
|
121 |
<frontend_type>textarea</frontend_type>
|
122 |
<sort_order>60</sort_order>
|
123 |
+
<show_in_default>0</show_in_default>
|
124 |
<show_in_website>1</show_in_website>
|
125 |
+
<show_in_store>0</show_in_store>
|
126 |
</ae_css>
|
127 |
</fields>
|
128 |
</advanced>
|
131 |
<frontend_type>text</frontend_type>
|
132 |
<sort_order>4</sort_order>
|
133 |
<show_in_default>1</show_in_default>
|
134 |
+
<show_in_website>0</show_in_website>
|
135 |
+
<show_in_store>0</show_in_store>
|
136 |
<fields>
|
137 |
<log_level translate="label">
|
138 |
<label>Log Level</label>
|
140 |
<source_model>affinityitems/source_loglevel</source_model>
|
141 |
<sort_order>0</sort_order>
|
142 |
<show_in_default>1</show_in_default>
|
143 |
+
<show_in_website>0</show_in_website>
|
144 |
+
<show_in_store>0</show_in_store>
|
145 |
+
<comment><![CDATA[when DEBUG is selected, all log information is saved into <b>var/log/AffinityDebug.log</b><br />info: log file can grow up to 2Gb !!!]]></comment>
|
146 |
</log_level>
|
147 |
</fields>
|
148 |
</developer>
|
150 |
<label>Image size</label>
|
151 |
<frontend_type>text</frontend_type>
|
152 |
<sort_order>5</sort_order>
|
153 |
+
<show_in_default>0</show_in_default>
|
154 |
<show_in_website>1</show_in_website>
|
155 |
+
<show_in_store>0</show_in_store>
|
156 |
<comment><![CDATA[<strong>Width x Height, in pixels</strong>]]></comment>
|
157 |
<fields>
|
158 |
<default translate="label">
|
160 |
<frontend_type>text</frontend_type>
|
161 |
<frontend_model>affinityitems/renderer_config_imagesize</frontend_model>
|
162 |
<sort_order>100</sort_order>
|
163 |
+
<show_in_default>0</show_in_default>
|
164 |
<show_in_website>1</show_in_website>
|
165 |
+
<show_in_store>0</show_in_store>
|
166 |
<validate>validate-number</validate>
|
167 |
</default>
|
168 |
<large translate="label">
|
170 |
<frontend_type>text</frontend_type>
|
171 |
<frontend_model>affinityitems/renderer_config_imagesize</frontend_model>
|
172 |
<sort_order>120</sort_order>
|
173 |
+
<show_in_default>0</show_in_default>
|
174 |
<show_in_website>1</show_in_website>
|
175 |
+
<show_in_store>0</show_in_store>
|
176 |
<validate>validate-number</validate>
|
177 |
</large>
|
178 |
<medium translate="label">
|
180 |
<frontend_type>text</frontend_type>
|
181 |
<frontend_model>affinityitems/renderer_config_imagesize</frontend_model>
|
182 |
<sort_order>140</sort_order>
|
183 |
+
<show_in_default>0</show_in_default>
|
184 |
<show_in_website>1</show_in_website>
|
185 |
+
<show_in_store>0</show_in_store>
|
186 |
<validate>validate-number</validate>
|
187 |
</medium>
|
188 |
<small translate="label">
|
190 |
<frontend_type>text</frontend_type>
|
191 |
<frontend_model>affinityitems/renderer_config_imagesize</frontend_model>
|
192 |
<sort_order>160</sort_order>
|
193 |
+
<show_in_default>0</show_in_default>
|
194 |
<show_in_website>1</show_in_website>
|
195 |
+
<show_in_store>0</show_in_store>
|
196 |
<validate>validate-number</validate>
|
197 |
</small>
|
198 |
</fields>
|
202 |
<label>Home page</label>
|
203 |
<frontend_type>text</frontend_type>
|
204 |
<sort_order>10</sort_order>
|
205 |
+
<show_in_default>0</show_in_default>
|
206 |
<show_in_website>1</show_in_website>
|
207 |
+
<show_in_store>0</show_in_store>
|
208 |
<fields>
|
209 |
<enable translate="label">
|
210 |
<label>Enable</label>
|
211 |
<frontend_type>select</frontend_type>
|
212 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
213 |
<sort_order>0</sort_order>
|
214 |
+
<show_in_default>0</show_in_default>
|
215 |
<show_in_website>1</show_in_website>
|
216 |
+
<show_in_store>0</show_in_store>
|
217 |
</enable>
|
218 |
<recommendation_label translate="label">
|
219 |
<label>Recommendation area label</label>
|
220 |
<frontend_type>text</frontend_type>
|
221 |
<sort_order>5</sort_order>
|
222 |
+
<show_in_default>0</show_in_default>
|
223 |
<show_in_website>1</show_in_website>
|
224 |
+
<show_in_store>0</show_in_store>
|
225 |
<depends>
|
226 |
<enable>1</enable>
|
227 |
</depends>
|
231 |
<frontend_type>select</frontend_type>
|
232 |
<source_model>affinityitems/source_recoconfig::home</source_model>
|
233 |
<sort_order>12</sort_order>
|
234 |
+
<show_in_default>0</show_in_default>
|
235 |
<show_in_website>1</show_in_website>
|
236 |
+
<show_in_store>0</show_in_store>
|
237 |
<depends>
|
238 |
<enable>1</enable>
|
239 |
</depends>
|
242 |
<label>Number of displayed products</label>
|
243 |
<frontend_type>text</frontend_type>
|
244 |
<sort_order>10</sort_order>
|
245 |
+
<show_in_default>0</show_in_default>
|
246 |
<show_in_website>1</show_in_website>
|
247 |
+
<show_in_store>0</show_in_store>
|
248 |
<depends>
|
249 |
<enable>1</enable>
|
250 |
</depends>
|
253 |
<label>Number of displayed products per line</label>
|
254 |
<frontend_type>text</frontend_type>
|
255 |
<sort_order>12</sort_order>
|
256 |
+
<show_in_default>0</show_in_default>
|
257 |
<show_in_website>1</show_in_website>
|
258 |
+
<show_in_store>0</show_in_store>
|
259 |
<depends>
|
260 |
<enable>1</enable>
|
261 |
</depends>
|
265 |
<frontend_type>select</frontend_type>
|
266 |
<source_model>affinityitems/source_imagesize</source_model>
|
267 |
<sort_order>15</sort_order>
|
268 |
+
<show_in_default>0</show_in_default>
|
269 |
<show_in_website>1</show_in_website>
|
270 |
+
<show_in_store>0</show_in_store>
|
271 |
<depends>
|
272 |
<enable>1</enable>
|
273 |
</depends>
|
276 |
<label><![CDATA[<strong>Display settings</strong>]]></label>
|
277 |
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
278 |
<sort_order>60</sort_order>
|
279 |
+
<show_in_default>0</show_in_default>
|
280 |
<show_in_website>1</show_in_website>
|
281 |
+
<show_in_store>0</show_in_store>
|
282 |
<depends>
|
283 |
<enable>1</enable>
|
284 |
</depends>
|
288 |
<frontend_type>text</frontend_type>
|
289 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
290 |
<sort_order>65</sort_order>
|
291 |
+
<show_in_default>0</show_in_default>
|
292 |
<show_in_website>1</show_in_website>
|
293 |
+
<show_in_store>0</show_in_store>
|
294 |
<depends>
|
295 |
<enable>1</enable>
|
296 |
</depends>
|
299 |
<label><![CDATA[ Title <strong>class</strong>]]></label>
|
300 |
<frontend_type>text</frontend_type>
|
301 |
<sort_order>70</sort_order>
|
302 |
+
<show_in_default>0</show_in_default>
|
303 |
<show_in_website>1</show_in_website>
|
304 |
+
<show_in_store>0</show_in_store>
|
305 |
<depends>
|
306 |
<enable>1</enable>
|
307 |
</depends>
|
311 |
<frontend_type>text</frontend_type>
|
312 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
313 |
<sort_order>75</sort_order>
|
314 |
+
<show_in_default>0</show_in_default>
|
315 |
<show_in_website>1</show_in_website>
|
316 |
+
<show_in_store>0</show_in_store>
|
317 |
<depends>
|
318 |
<enable>1</enable>
|
319 |
</depends>
|
323 |
<frontend_type>text</frontend_type>
|
324 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
325 |
<sort_order>80</sort_order>
|
326 |
+
<show_in_default>0</show_in_default>
|
327 |
<show_in_website>1</show_in_website>
|
328 |
+
<show_in_store>0</show_in_store>
|
329 |
<depends>
|
330 |
<enable>1</enable>
|
331 |
</depends>
|
335 |
<frontend_type>text</frontend_type>
|
336 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
337 |
<sort_order>85</sort_order>
|
338 |
+
<show_in_default>0</show_in_default>
|
339 |
<show_in_website>1</show_in_website>
|
340 |
+
<show_in_store>0</show_in_store>
|
341 |
<depends>
|
342 |
<enable>1</enable>
|
343 |
</depends>
|
346 |
<label><![CDATA[ Product image class]]></label>
|
347 |
<frontend_type>text</frontend_type>
|
348 |
<sort_order>90</sort_order>
|
349 |
+
<show_in_default>0</show_in_default>
|
350 |
<show_in_website>1</show_in_website>
|
351 |
+
<show_in_store>0</show_in_store>
|
352 |
<depends>
|
353 |
<enable>1</enable>
|
354 |
</depends>
|
357 |
<label><![CDATA[ Product name class]]></label>
|
358 |
<frontend_type>text</frontend_type>
|
359 |
<sort_order>95</sort_order>
|
360 |
+
<show_in_default>0</show_in_default>
|
361 |
<show_in_website>1</show_in_website>
|
362 |
+
<show_in_store>0</show_in_store>
|
363 |
<depends>
|
364 |
<enable>1</enable>
|
365 |
</depends>
|
368 |
<label><![CDATA[ Product description class]]></label>
|
369 |
<frontend_type>text</frontend_type>
|
370 |
<sort_order>100</sort_order>
|
371 |
+
<show_in_default>0</show_in_default>
|
372 |
<show_in_website>1</show_in_website>
|
373 |
+
<show_in_store>0</show_in_store>
|
374 |
<depends>
|
375 |
<enable>1</enable>
|
376 |
</depends>
|
379 |
<label><![CDATA[ Price container class]]></label>
|
380 |
<frontend_type>text</frontend_type>
|
381 |
<sort_order>105</sort_order>
|
382 |
+
<show_in_default>0</show_in_default>
|
383 |
<show_in_website>1</show_in_website>
|
384 |
+
<show_in_store>0</show_in_store>
|
385 |
<depends>
|
386 |
<enable>1</enable>
|
387 |
</depends>
|
390 |
<label><![CDATA[ Price class]]></label>
|
391 |
<frontend_type>text</frontend_type>
|
392 |
<sort_order>110</sort_order>
|
393 |
+
<show_in_default>0</show_in_default>
|
394 |
<show_in_website>1</show_in_website>
|
395 |
+
<show_in_store>0</show_in_store>
|
396 |
<depends>
|
397 |
<enable>1</enable>
|
398 |
</depends>
|
404 |
<label>Left column</label>
|
405 |
<frontend_type>text</frontend_type>
|
406 |
<sort_order>20</sort_order>
|
407 |
+
<show_in_default>0</show_in_default>
|
408 |
<show_in_website>1</show_in_website>
|
409 |
+
<show_in_store>0</show_in_store>
|
410 |
<fields>
|
411 |
<enable translate="label">
|
412 |
<label>Enable</label>
|
413 |
<frontend_type>select</frontend_type>
|
414 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
415 |
<sort_order>0</sort_order>
|
416 |
+
<show_in_default>0</show_in_default>
|
417 |
<show_in_website>1</show_in_website>
|
418 |
+
<show_in_store>0</show_in_store>
|
419 |
</enable>
|
420 |
<recommendation_label translate="label">
|
421 |
<label>Recommendation area label</label>
|
422 |
<frontend_type>text</frontend_type>
|
423 |
<sort_order>5</sort_order>
|
424 |
+
<show_in_default>0</show_in_default>
|
425 |
<show_in_website>1</show_in_website>
|
426 |
+
<show_in_store>0</show_in_store>
|
427 |
<depends>
|
428 |
<enable>1</enable>
|
429 |
</depends>
|
433 |
<frontend_type>select</frontend_type>
|
434 |
<source_model>affinityitems/source_recoconfig::left</source_model>
|
435 |
<sort_order>12</sort_order>
|
436 |
+
<show_in_default>0</show_in_default>
|
437 |
<show_in_website>1</show_in_website>
|
438 |
+
<show_in_store>0</show_in_store>
|
439 |
<depends>
|
440 |
<enable>1</enable>
|
441 |
</depends>
|
444 |
<label>Number of displayed products</label>
|
445 |
<frontend_type>text</frontend_type>
|
446 |
<sort_order>10</sort_order>
|
447 |
+
<show_in_default>0</show_in_default>
|
448 |
<show_in_website>1</show_in_website>
|
449 |
+
<show_in_store>0</show_in_store>
|
450 |
<depends>
|
451 |
<enable>1</enable>
|
452 |
</depends>
|
455 |
<label>Number of displayed products per line</label>
|
456 |
<frontend_type>text</frontend_type>
|
457 |
<sort_order>12</sort_order>
|
458 |
+
<show_in_default>0</show_in_default>
|
459 |
<show_in_website>1</show_in_website>
|
460 |
+
<show_in_store>0</show_in_store>
|
461 |
<depends>
|
462 |
<enable>1</enable>
|
463 |
</depends>
|
467 |
<frontend_type>select</frontend_type>
|
468 |
<source_model>affinityitems/source_imagesize</source_model>
|
469 |
<sort_order>15</sort_order>
|
470 |
+
<show_in_default>0</show_in_default>
|
471 |
<show_in_website>1</show_in_website>
|
472 |
+
<show_in_store>0</show_in_store>
|
473 |
<depends>
|
474 |
<enable>1</enable>
|
475 |
</depends>
|
478 |
<label><![CDATA[<strong>Display settings</strong>]]></label>
|
479 |
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
480 |
<sort_order>60</sort_order>
|
481 |
+
<show_in_default>0</show_in_default>
|
482 |
<show_in_website>1</show_in_website>
|
483 |
+
<show_in_store>0</show_in_store>
|
484 |
<depends>
|
485 |
<enable>1</enable>
|
486 |
</depends>
|
490 |
<frontend_type>text</frontend_type>
|
491 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
492 |
<sort_order>65</sort_order>
|
493 |
+
<show_in_default>0</show_in_default>
|
494 |
<show_in_website>1</show_in_website>
|
495 |
+
<show_in_store>0</show_in_store>
|
496 |
<depends>
|
497 |
<enable>1</enable>
|
498 |
</depends>
|
501 |
<label><![CDATA[ Title <strong>class</strong>]]></label>
|
502 |
<frontend_type>text</frontend_type>
|
503 |
<sort_order>70</sort_order>
|
504 |
+
<show_in_default>0</show_in_default>
|
505 |
<show_in_website>1</show_in_website>
|
506 |
+
<show_in_store>0</show_in_store>
|
507 |
<depends>
|
508 |
<enable>1</enable>
|
509 |
</depends>
|
513 |
<frontend_type>text</frontend_type>
|
514 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
515 |
<sort_order>75</sort_order>
|
516 |
+
<show_in_default>0</show_in_default>
|
517 |
<show_in_website>1</show_in_website>
|
518 |
+
<show_in_store>0</show_in_store>
|
519 |
<depends>
|
520 |
<enable>1</enable>
|
521 |
</depends>
|
525 |
<frontend_type>text</frontend_type>
|
526 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
527 |
<sort_order>80</sort_order>
|
528 |
+
<show_in_default>0</show_in_default>
|
529 |
<show_in_website>1</show_in_website>
|
530 |
+
<show_in_store>0</show_in_store>
|
531 |
<depends>
|
532 |
<enable>1</enable>
|
533 |
</depends>
|
537 |
<frontend_type>text</frontend_type>
|
538 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
539 |
<sort_order>85</sort_order>
|
540 |
+
<show_in_default>0</show_in_default>
|
541 |
<show_in_website>1</show_in_website>
|
542 |
+
<show_in_store>0</show_in_store>
|
543 |
<depends>
|
544 |
<enable>1</enable>
|
545 |
</depends>
|
548 |
<label><![CDATA[ Product image class]]></label>
|
549 |
<frontend_type>text</frontend_type>
|
550 |
<sort_order>90</sort_order>
|
551 |
+
<show_in_default>0</show_in_default>
|
552 |
<show_in_website>1</show_in_website>
|
553 |
+
<show_in_store>0</show_in_store>
|
554 |
<depends>
|
555 |
<enable>1</enable>
|
556 |
</depends>
|
559 |
<label><![CDATA[ Product name class]]></label>
|
560 |
<frontend_type>text</frontend_type>
|
561 |
<sort_order>95</sort_order>
|
562 |
+
<show_in_default>0</show_in_default>
|
563 |
<show_in_website>1</show_in_website>
|
564 |
+
<show_in_store>0</show_in_store>
|
565 |
<depends>
|
566 |
<enable>1</enable>
|
567 |
</depends>
|
570 |
<label><![CDATA[ Product description class]]></label>
|
571 |
<frontend_type>text</frontend_type>
|
572 |
<sort_order>100</sort_order>
|
573 |
+
<show_in_default>0</show_in_default>
|
574 |
<show_in_website>1</show_in_website>
|
575 |
+
<show_in_store>0</show_in_store>
|
576 |
<depends>
|
577 |
<enable>1</enable>
|
578 |
</depends>
|
581 |
<label><![CDATA[ Price container class]]></label>
|
582 |
<frontend_type>text</frontend_type>
|
583 |
<sort_order>105</sort_order>
|
584 |
+
<show_in_default>0</show_in_default>
|
585 |
<show_in_website>1</show_in_website>
|
586 |
+
<show_in_store>0</show_in_store>
|
587 |
<depends>
|
588 |
<enable>1</enable>
|
589 |
</depends>
|
592 |
<label><![CDATA[ Price class]]></label>
|
593 |
<frontend_type>text</frontend_type>
|
594 |
<sort_order>110</sort_order>
|
595 |
+
<show_in_default>0</show_in_default>
|
596 |
<show_in_website>1</show_in_website>
|
597 |
+
<show_in_store>0</show_in_store>
|
598 |
<depends>
|
599 |
<enable>1</enable>
|
600 |
</depends>
|
606 |
<label>Right column</label>
|
607 |
<frontend_type>text</frontend_type>
|
608 |
<sort_order>30</sort_order>
|
609 |
+
<show_in_default>0</show_in_default>
|
610 |
<show_in_website>1</show_in_website>
|
611 |
+
<show_in_store>0</show_in_store>
|
612 |
<fields>
|
613 |
<enable translate="label">
|
614 |
<label>Enable</label>
|
615 |
<frontend_type>select</frontend_type>
|
616 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
617 |
<sort_order>0</sort_order>
|
618 |
+
<show_in_default>0</show_in_default>
|
619 |
<show_in_website>1</show_in_website>
|
620 |
+
<show_in_store>0</show_in_store>
|
621 |
</enable>
|
622 |
<recommendation_label translate="label">
|
623 |
<label>Recommendation area label</label>
|
624 |
<frontend_type>text</frontend_type>
|
625 |
<sort_order>5</sort_order>
|
626 |
+
<show_in_default>0</show_in_default>
|
627 |
<show_in_website>1</show_in_website>
|
628 |
+
<show_in_store>0</show_in_store>
|
629 |
<depends>
|
630 |
<enable>1</enable>
|
631 |
</depends>
|
635 |
<frontend_type>select</frontend_type>
|
636 |
<source_model>affinityitems/source_recoconfig::right</source_model>
|
637 |
<sort_order>12</sort_order>
|
638 |
+
<show_in_default>0</show_in_default>
|
639 |
<show_in_website>1</show_in_website>
|
640 |
+
<show_in_store>0</show_in_store>
|
641 |
<depends>
|
642 |
<enable>1</enable>
|
643 |
</depends>
|
646 |
<label>Number of displayed products</label>
|
647 |
<frontend_type>text</frontend_type>
|
648 |
<sort_order>10</sort_order>
|
649 |
+
<show_in_default>0</show_in_default>
|
650 |
<show_in_website>1</show_in_website>
|
651 |
+
<show_in_store>0</show_in_store>
|
652 |
<depends>
|
653 |
<enable>1</enable>
|
654 |
</depends>
|
657 |
<label>Number of displayed products per line</label>
|
658 |
<frontend_type>text</frontend_type>
|
659 |
<sort_order>12</sort_order>
|
660 |
+
<show_in_default>0</show_in_default>
|
661 |
<show_in_website>1</show_in_website>
|
662 |
+
<show_in_store>0</show_in_store>
|
663 |
<depends>
|
664 |
<enable>1</enable>
|
665 |
</depends>
|
669 |
<frontend_type>select</frontend_type>
|
670 |
<source_model>affinityitems/source_imagesize</source_model>
|
671 |
<sort_order>15</sort_order>
|
672 |
+
<show_in_default>0</show_in_default>
|
673 |
<show_in_website>1</show_in_website>
|
674 |
+
<show_in_store>0</show_in_store>
|
675 |
<depends>
|
676 |
<enable>1</enable>
|
677 |
</depends>
|
680 |
<label><![CDATA[<strong>Display settings</strong>]]></label>
|
681 |
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
682 |
<sort_order>60</sort_order>
|
683 |
+
<show_in_default>0</show_in_default>
|
684 |
<show_in_website>1</show_in_website>
|
685 |
+
<show_in_store>0</show_in_store>
|
686 |
<depends>
|
687 |
<enable>1</enable>
|
688 |
</depends>
|
692 |
<frontend_type>text</frontend_type>
|
693 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
694 |
<sort_order>65</sort_order>
|
695 |
+
<show_in_default>0</show_in_default>
|
696 |
<show_in_website>1</show_in_website>
|
697 |
+
<show_in_store>0</show_in_store>
|
698 |
<depends>
|
699 |
<enable>1</enable>
|
700 |
</depends>
|
703 |
<label><![CDATA[ Title <strong>class</strong>]]></label>
|
704 |
<frontend_type>text</frontend_type>
|
705 |
<sort_order>70</sort_order>
|
706 |
+
<show_in_default>0</show_in_default>
|
707 |
<show_in_website>1</show_in_website>
|
708 |
+
<show_in_store>0</show_in_store>
|
709 |
<depends>
|
710 |
<enable>1</enable>
|
711 |
</depends>
|
715 |
<frontend_type>text</frontend_type>
|
716 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
717 |
<sort_order>75</sort_order>
|
718 |
+
<show_in_default>0</show_in_default>
|
719 |
<show_in_website>1</show_in_website>
|
720 |
+
<show_in_store>0</show_in_store>
|
721 |
<depends>
|
722 |
<enable>1</enable>
|
723 |
</depends>
|
727 |
<frontend_type>text</frontend_type>
|
728 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
729 |
<sort_order>80</sort_order>
|
730 |
+
<show_in_default>0</show_in_default>
|
731 |
<show_in_website>1</show_in_website>
|
732 |
+
<show_in_store>0</show_in_store>
|
733 |
<depends>
|
734 |
<enable>1</enable>
|
735 |
</depends>
|
739 |
<frontend_type>text</frontend_type>
|
740 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
741 |
<sort_order>85</sort_order>
|
742 |
+
<show_in_default>0</show_in_default>
|
743 |
<show_in_website>1</show_in_website>
|
744 |
+
<show_in_store>0</show_in_store>
|
745 |
<depends>
|
746 |
<enable>1</enable>
|
747 |
</depends>
|
750 |
<label><![CDATA[ Product image class]]></label>
|
751 |
<frontend_type>text</frontend_type>
|
752 |
<sort_order>90</sort_order>
|
753 |
+
<show_in_default>0</show_in_default>
|
754 |
<show_in_website>1</show_in_website>
|
755 |
+
<show_in_store>0</show_in_store>
|
756 |
<depends>
|
757 |
<enable>1</enable>
|
758 |
</depends>
|
761 |
<label><![CDATA[ Product name class]]></label>
|
762 |
<frontend_type>text</frontend_type>
|
763 |
<sort_order>95</sort_order>
|
764 |
+
<show_in_default>0</show_in_default>
|
765 |
<show_in_website>1</show_in_website>
|
766 |
+
<show_in_store>0</show_in_store>
|
767 |
<depends>
|
768 |
<enable>1</enable>
|
769 |
</depends>
|
772 |
<label><![CDATA[ Product description class]]></label>
|
773 |
<frontend_type>text</frontend_type>
|
774 |
<sort_order>100</sort_order>
|
775 |
+
<show_in_default>0</show_in_default>
|
776 |
<show_in_website>1</show_in_website>
|
777 |
+
<show_in_store>0</show_in_store>
|
778 |
<depends>
|
779 |
<enable>1</enable>
|
780 |
</depends>
|
783 |
<label><![CDATA[ Price container class]]></label>
|
784 |
<frontend_type>text</frontend_type>
|
785 |
<sort_order>105</sort_order>
|
786 |
+
<show_in_default>0</show_in_default>
|
787 |
<show_in_website>1</show_in_website>
|
788 |
+
<show_in_store>0</show_in_store>
|
789 |
<depends>
|
790 |
<enable>1</enable>
|
791 |
</depends>
|
794 |
<label><![CDATA[ Price class]]></label>
|
795 |
<frontend_type>text</frontend_type>
|
796 |
<sort_order>110</sort_order>
|
797 |
+
<show_in_default>0</show_in_default>
|
798 |
<show_in_website>1</show_in_website>
|
799 |
+
<show_in_store>0</show_in_store>
|
800 |
<depends>
|
801 |
<enable>1</enable>
|
802 |
</depends>
|
808 |
<label>Cart page</label>
|
809 |
<frontend_type>text</frontend_type>
|
810 |
<sort_order>40</sort_order>
|
811 |
+
<show_in_default>0</show_in_default>
|
812 |
<show_in_website>1</show_in_website>
|
813 |
+
<show_in_store>0</show_in_store>
|
814 |
<fields>
|
815 |
<enable translate="label">
|
816 |
<label>Enable</label>
|
817 |
<frontend_type>select</frontend_type>
|
818 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
819 |
<sort_order>0</sort_order>
|
820 |
+
<show_in_default>0</show_in_default>
|
821 |
<show_in_website>1</show_in_website>
|
822 |
+
<show_in_store>0</show_in_store>
|
823 |
</enable>
|
824 |
<recommendation_label translate="label">
|
825 |
<label>Recommendation area label</label>
|
826 |
<frontend_type>text</frontend_type>
|
827 |
<sort_order>5</sort_order>
|
828 |
+
<show_in_default>0</show_in_default>
|
829 |
<show_in_website>1</show_in_website>
|
830 |
+
<show_in_store>0</show_in_store>
|
831 |
<depends>
|
832 |
<enable>1</enable>
|
833 |
</depends>
|
837 |
<frontend_type>select</frontend_type>
|
838 |
<source_model>affinityitems/source_recoconfig::cart</source_model>
|
839 |
<sort_order>12</sort_order>
|
840 |
+
<show_in_default>0</show_in_default>
|
841 |
<show_in_website>1</show_in_website>
|
842 |
+
<show_in_store>0</show_in_store>
|
843 |
<depends>
|
844 |
<enable>1</enable>
|
845 |
</depends>
|
848 |
<label>Number of displayed products</label>
|
849 |
<frontend_type>text</frontend_type>
|
850 |
<sort_order>10</sort_order>
|
851 |
+
<show_in_default>0</show_in_default>
|
852 |
<show_in_website>1</show_in_website>
|
853 |
+
<show_in_store>0</show_in_store>
|
854 |
<depends>
|
855 |
<enable>1</enable>
|
856 |
</depends>
|
859 |
<label>Number of displayed products per line</label>
|
860 |
<frontend_type>text</frontend_type>
|
861 |
<sort_order>12</sort_order>
|
862 |
+
<show_in_default>0</show_in_default>
|
863 |
<show_in_website>1</show_in_website>
|
864 |
+
<show_in_store>0</show_in_store>
|
865 |
<depends>
|
866 |
<enable>1</enable>
|
867 |
</depends>
|
871 |
<frontend_type>select</frontend_type>
|
872 |
<source_model>affinityitems/source_imagesize</source_model>
|
873 |
<sort_order>15</sort_order>
|
874 |
+
<show_in_default>0</show_in_default>
|
875 |
<show_in_website>1</show_in_website>
|
876 |
+
<show_in_store>0</show_in_store>
|
877 |
<depends>
|
878 |
<enable>1</enable>
|
879 |
</depends>
|
882 |
<label><![CDATA[<strong>Display settings</strong>]]></label>
|
883 |
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
884 |
<sort_order>60</sort_order>
|
885 |
+
<show_in_default>0</show_in_default>
|
886 |
<show_in_website>1</show_in_website>
|
887 |
+
<show_in_store>0</show_in_store>
|
888 |
<depends>
|
889 |
<enable>1</enable>
|
890 |
</depends>
|
894 |
<frontend_type>text</frontend_type>
|
895 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
896 |
<sort_order>65</sort_order>
|
897 |
+
<show_in_default>0</show_in_default>
|
898 |
<show_in_website>1</show_in_website>
|
899 |
+
<show_in_store>0</show_in_store>
|
900 |
<depends>
|
901 |
<enable>1</enable>
|
902 |
</depends>
|
905 |
<label><![CDATA[ Title <strong>class</strong>]]></label>
|
906 |
<frontend_type>text</frontend_type>
|
907 |
<sort_order>70</sort_order>
|
908 |
+
<show_in_default>0</show_in_default>
|
909 |
<show_in_website>1</show_in_website>
|
910 |
+
<show_in_store>0</show_in_store>
|
911 |
<depends>
|
912 |
<enable>1</enable>
|
913 |
</depends>
|
917 |
<frontend_type>text</frontend_type>
|
918 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
919 |
<sort_order>75</sort_order>
|
920 |
+
<show_in_default>0</show_in_default>
|
921 |
<show_in_website>1</show_in_website>
|
922 |
+
<show_in_store>0</show_in_store>
|
923 |
<depends>
|
924 |
<enable>1</enable>
|
925 |
</depends>
|
929 |
<frontend_type>text</frontend_type>
|
930 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
931 |
<sort_order>80</sort_order>
|
932 |
+
<show_in_default>0</show_in_default>
|
933 |
<show_in_website>1</show_in_website>
|
934 |
+
<show_in_store>0</show_in_store>
|
935 |
<depends>
|
936 |
<enable>1</enable>
|
937 |
</depends>
|
941 |
<frontend_type>text</frontend_type>
|
942 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
943 |
<sort_order>85</sort_order>
|
944 |
+
<show_in_default>0</show_in_default>
|
945 |
<show_in_website>1</show_in_website>
|
946 |
+
<show_in_store>0</show_in_store>
|
947 |
<depends>
|
948 |
<enable>1</enable>
|
949 |
</depends>
|
952 |
<label><![CDATA[ Product image class]]></label>
|
953 |
<frontend_type>text</frontend_type>
|
954 |
<sort_order>90</sort_order>
|
955 |
+
<show_in_default>0</show_in_default>
|
956 |
<show_in_website>1</show_in_website>
|
957 |
+
<show_in_store>0</show_in_store>
|
958 |
<depends>
|
959 |
<enable>1</enable>
|
960 |
</depends>
|
963 |
<label><![CDATA[ Product name class]]></label>
|
964 |
<frontend_type>text</frontend_type>
|
965 |
<sort_order>95</sort_order>
|
966 |
+
<show_in_default>0</show_in_default>
|
967 |
<show_in_website>1</show_in_website>
|
968 |
+
<show_in_store>0</show_in_store>
|
969 |
<depends>
|
970 |
<enable>1</enable>
|
971 |
</depends>
|
974 |
<label><![CDATA[ Product description class]]></label>
|
975 |
<frontend_type>text</frontend_type>
|
976 |
<sort_order>100</sort_order>
|
977 |
+
<show_in_default>0</show_in_default>
|
978 |
<show_in_website>1</show_in_website>
|
979 |
+
<show_in_store>0</show_in_store>
|
980 |
<depends>
|
981 |
<enable>1</enable>
|
982 |
</depends>
|
985 |
<label><![CDATA[ Price container class]]></label>
|
986 |
<frontend_type>text</frontend_type>
|
987 |
<sort_order>105</sort_order>
|
988 |
+
<show_in_default>0</show_in_default>
|
989 |
<show_in_website>1</show_in_website>
|
990 |
+
<show_in_store>0</show_in_store>
|
991 |
<depends>
|
992 |
<enable>1</enable>
|
993 |
</depends>
|
996 |
<label><![CDATA[ Price class]]></label>
|
997 |
<frontend_type>text</frontend_type>
|
998 |
<sort_order>110</sort_order>
|
999 |
+
<show_in_default>0</show_in_default>
|
1000 |
<show_in_website>1</show_in_website>
|
1001 |
+
<show_in_store>0</show_in_store>
|
1002 |
<depends>
|
1003 |
<enable>1</enable>
|
1004 |
</depends>
|
1010 |
<label>Product page</label>
|
1011 |
<frontend_type>text</frontend_type>
|
1012 |
<sort_order>50</sort_order>
|
1013 |
+
<show_in_default>0</show_in_default>
|
1014 |
<show_in_website>1</show_in_website>
|
1015 |
+
<show_in_store>0</show_in_store>
|
1016 |
<fields>
|
1017 |
<enable translate="label">
|
1018 |
<label>Enable</label>
|
1019 |
<frontend_type>select</frontend_type>
|
1020 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
1021 |
<sort_order>0</sort_order>
|
1022 |
+
<show_in_default>0</show_in_default>
|
1023 |
<show_in_website>1</show_in_website>
|
1024 |
+
<show_in_store>0</show_in_store>
|
1025 |
</enable>
|
1026 |
<recommendation_label translate="label">
|
1027 |
<label>Recommendation area label</label>
|
1028 |
<frontend_type>text</frontend_type>
|
1029 |
<sort_order>5</sort_order>
|
1030 |
+
<show_in_default>0</show_in_default>
|
1031 |
<show_in_website>1</show_in_website>
|
1032 |
+
<show_in_store>0</show_in_store>
|
1033 |
<depends>
|
1034 |
<enable>1</enable>
|
1035 |
</depends>
|
1039 |
<frontend_type>select</frontend_type>
|
1040 |
<source_model>affinityitems/source_recoconfig::product</source_model>
|
1041 |
<sort_order>12</sort_order>
|
1042 |
+
<show_in_default>0</show_in_default>
|
1043 |
<show_in_website>1</show_in_website>
|
1044 |
+
<show_in_store>0</show_in_store>
|
1045 |
<depends>
|
1046 |
<enable>1</enable>
|
1047 |
</depends>
|
1050 |
<label>Number of displayed products</label>
|
1051 |
<frontend_type>text</frontend_type>
|
1052 |
<sort_order>10</sort_order>
|
1053 |
+
<show_in_default>0</show_in_default>
|
1054 |
<show_in_website>1</show_in_website>
|
1055 |
+
<show_in_store>0</show_in_store>
|
1056 |
<depends>
|
1057 |
<enable>1</enable>
|
1058 |
</depends>
|
1061 |
<label>Number of displayed products per line</label>
|
1062 |
<frontend_type>text</frontend_type>
|
1063 |
<sort_order>12</sort_order>
|
1064 |
+
<show_in_default>0</show_in_default>
|
1065 |
<show_in_website>1</show_in_website>
|
1066 |
+
<show_in_store>0</show_in_store>
|
1067 |
<depends>
|
1068 |
<enable>1</enable>
|
1069 |
</depends>
|
1073 |
<frontend_type>select</frontend_type>
|
1074 |
<source_model>affinityitems/source_imagesize</source_model>
|
1075 |
<sort_order>15</sort_order>
|
1076 |
+
<show_in_default>0</show_in_default>
|
1077 |
<show_in_website>1</show_in_website>
|
1078 |
+
<show_in_store>0</show_in_store>
|
1079 |
<depends>
|
1080 |
<enable>1</enable>
|
1081 |
</depends>
|
1084 |
<label><![CDATA[<strong>Display settings</strong>]]></label>
|
1085 |
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
1086 |
<sort_order>60</sort_order>
|
1087 |
+
<show_in_default>0</show_in_default>
|
1088 |
<show_in_website>1</show_in_website>
|
1089 |
+
<show_in_store>0</show_in_store>
|
1090 |
<depends>
|
1091 |
<enable>1</enable>
|
1092 |
</depends>
|
1096 |
<frontend_type>text</frontend_type>
|
1097 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
1098 |
<sort_order>65</sort_order>
|
1099 |
+
<show_in_default>0</show_in_default>
|
1100 |
<show_in_website>1</show_in_website>
|
1101 |
+
<show_in_store>0</show_in_store>
|
1102 |
<depends>
|
1103 |
<enable>1</enable>
|
1104 |
</depends>
|
1107 |
<label><![CDATA[ Title <strong>class</strong>]]></label>
|
1108 |
<frontend_type>text</frontend_type>
|
1109 |
<sort_order>70</sort_order>
|
1110 |
+
<show_in_default>0</show_in_default>
|
1111 |
<show_in_website>1</show_in_website>
|
1112 |
+
<show_in_store>0</show_in_store>
|
1113 |
<depends>
|
1114 |
<enable>1</enable>
|
1115 |
</depends>
|
1119 |
<frontend_type>text</frontend_type>
|
1120 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
1121 |
<sort_order>75</sort_order>
|
1122 |
+
<show_in_default>0</show_in_default>
|
1123 |
<show_in_website>1</show_in_website>
|
1124 |
+
<show_in_store>0</show_in_store>
|
1125 |
<depends>
|
1126 |
<enable>1</enable>
|
1127 |
</depends>
|
1131 |
<frontend_type>text</frontend_type>
|
1132 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
1133 |
<sort_order>80</sort_order>
|
1134 |
+
<show_in_default>0</show_in_default>
|
1135 |
<show_in_website>1</show_in_website>
|
1136 |
+
<show_in_store>0</show_in_store>
|
1137 |
<depends>
|
1138 |
<enable>1</enable>
|
1139 |
</depends>
|
1143 |
<frontend_type>text</frontend_type>
|
1144 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
1145 |
<sort_order>85</sort_order>
|
1146 |
+
<show_in_default>0</show_in_default>
|
1147 |
<show_in_website>1</show_in_website>
|
1148 |
+
<show_in_store>0</show_in_store>
|
1149 |
<depends>
|
1150 |
<enable>1</enable>
|
1151 |
</depends>
|
1154 |
<label><![CDATA[ Product image class]]></label>
|
1155 |
<frontend_type>text</frontend_type>
|
1156 |
<sort_order>90</sort_order>
|
1157 |
+
<show_in_default>0</show_in_default>
|
1158 |
<show_in_website>1</show_in_website>
|
1159 |
+
<show_in_store>0</show_in_store>
|
1160 |
<depends>
|
1161 |
<enable>1</enable>
|
1162 |
</depends>
|
1165 |
<label><![CDATA[ Product name class]]></label>
|
1166 |
<frontend_type>text</frontend_type>
|
1167 |
<sort_order>95</sort_order>
|
1168 |
+
<show_in_default>0</show_in_default>
|
1169 |
<show_in_website>1</show_in_website>
|
1170 |
+
<show_in_store>0</show_in_store>
|
1171 |
<depends>
|
1172 |
<enable>1</enable>
|
1173 |
</depends>
|
1176 |
<label><![CDATA[ Product description class]]></label>
|
1177 |
<frontend_type>text</frontend_type>
|
1178 |
<sort_order>100</sort_order>
|
1179 |
+
<show_in_default>0</show_in_default>
|
1180 |
<show_in_website>1</show_in_website>
|
1181 |
+
<show_in_store>0</show_in_store>
|
1182 |
<depends>
|
1183 |
<enable>1</enable>
|
1184 |
</depends>
|
1187 |
<label><![CDATA[ Price container class]]></label>
|
1188 |
<frontend_type>text</frontend_type>
|
1189 |
<sort_order>105</sort_order>
|
1190 |
+
<show_in_default>0</show_in_default>
|
1191 |
<show_in_website>1</show_in_website>
|
1192 |
+
<show_in_store>0</show_in_store>
|
1193 |
<depends>
|
1194 |
<enable>1</enable>
|
1195 |
</depends>
|
1198 |
<label><![CDATA[ Price class]]></label>
|
1199 |
<frontend_type>text</frontend_type>
|
1200 |
<sort_order>110</sort_order>
|
1201 |
+
<show_in_default>0</show_in_default>
|
1202 |
<show_in_website>1</show_in_website>
|
1203 |
+
<show_in_store>0</show_in_store>
|
1204 |
<depends>
|
1205 |
<enable>1</enable>
|
1206 |
</depends>
|
1212 |
<label>Search page</label>
|
1213 |
<frontend_type>text</frontend_type>
|
1214 |
<sort_order>60</sort_order>
|
1215 |
+
<show_in_default>0</show_in_default>
|
1216 |
<show_in_website>1</show_in_website>
|
1217 |
+
<show_in_store>0</show_in_store>
|
1218 |
<fields>
|
1219 |
<enable translate="label">
|
1220 |
<label>Enable</label>
|
1221 |
<frontend_type>select</frontend_type>
|
1222 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
1223 |
<sort_order>0</sort_order>
|
1224 |
+
<show_in_default>0</show_in_default>
|
1225 |
<show_in_website>1</show_in_website>
|
1226 |
+
<show_in_store>0</show_in_store>
|
1227 |
</enable>
|
1228 |
<recommendation_label translate="label">
|
1229 |
<label>Recommendation area label</label>
|
1230 |
<frontend_type>text</frontend_type>
|
1231 |
<sort_order>5</sort_order>
|
1232 |
+
<show_in_default>0</show_in_default>
|
1233 |
<show_in_website>1</show_in_website>
|
1234 |
+
<show_in_store>0</show_in_store>
|
1235 |
<depends>
|
1236 |
<enable>1</enable>
|
1237 |
</depends>
|
1241 |
<frontend_type>select</frontend_type>
|
1242 |
<source_model>affinityitems/source_recoconfig::search</source_model>
|
1243 |
<sort_order>12</sort_order>
|
1244 |
+
<show_in_default>0</show_in_default>
|
1245 |
<show_in_website>1</show_in_website>
|
1246 |
+
<show_in_store>0</show_in_store>
|
1247 |
<depends>
|
1248 |
<enable>1</enable>
|
1249 |
</depends>
|
1252 |
<label>Number of displayed products</label>
|
1253 |
<frontend_type>text</frontend_type>
|
1254 |
<sort_order>10</sort_order>
|
1255 |
+
<show_in_default>0</show_in_default>
|
1256 |
<show_in_website>1</show_in_website>
|
1257 |
+
<show_in_store>0</show_in_store>
|
1258 |
<depends>
|
1259 |
<enable>1</enable>
|
1260 |
</depends>
|
1263 |
<label>Number of displayed products per line</label>
|
1264 |
<frontend_type>text</frontend_type>
|
1265 |
<sort_order>12</sort_order>
|
1266 |
+
<show_in_default>0</show_in_default>
|
1267 |
<show_in_website>1</show_in_website>
|
1268 |
+
<show_in_store>0</show_in_store>
|
1269 |
<depends>
|
1270 |
<enable>1</enable>
|
1271 |
</depends>
|
1275 |
<frontend_type>select</frontend_type>
|
1276 |
<source_model>affinityitems/source_imagesize</source_model>
|
1277 |
<sort_order>15</sort_order>
|
1278 |
+
<show_in_default>0</show_in_default>
|
1279 |
<show_in_website>1</show_in_website>
|
1280 |
+
<show_in_store>0</show_in_store>
|
1281 |
<depends>
|
1282 |
<enable>1</enable>
|
1283 |
</depends>
|
1286 |
<label><![CDATA[<strong>Display settings</strong>]]></label>
|
1287 |
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
1288 |
<sort_order>60</sort_order>
|
1289 |
+
<show_in_default>0</show_in_default>
|
1290 |
<show_in_website>1</show_in_website>
|
1291 |
+
<show_in_store>0</show_in_store>
|
1292 |
<depends>
|
1293 |
<enable>1</enable>
|
1294 |
</depends>
|
1298 |
<frontend_type>text</frontend_type>
|
1299 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
1300 |
<sort_order>65</sort_order>
|
1301 |
+
<show_in_default>0</show_in_default>
|
1302 |
<show_in_website>1</show_in_website>
|
1303 |
+
<show_in_store>0</show_in_store>
|
1304 |
<depends>
|
1305 |
<enable>1</enable>
|
1306 |
</depends>
|
1309 |
<label><![CDATA[ Title <strong>class</strong>]]></label>
|
1310 |
<frontend_type>text</frontend_type>
|
1311 |
<sort_order>70</sort_order>
|
1312 |
+
<show_in_default>0</show_in_default>
|
1313 |
<show_in_website>1</show_in_website>
|
1314 |
+
<show_in_store>0</show_in_store>
|
1315 |
<depends>
|
1316 |
<enable>1</enable>
|
1317 |
</depends>
|
1321 |
<frontend_type>text</frontend_type>
|
1322 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
1323 |
<sort_order>75</sort_order>
|
1324 |
+
<show_in_default>0</show_in_default>
|
1325 |
<show_in_website>1</show_in_website>
|
1326 |
+
<show_in_store>0</show_in_store>
|
1327 |
<depends>
|
1328 |
<enable>1</enable>
|
1329 |
</depends>
|
1333 |
<frontend_type>text</frontend_type>
|
1334 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
1335 |
<sort_order>80</sort_order>
|
1336 |
+
<show_in_default>0</show_in_default>
|
1337 |
<show_in_website>1</show_in_website>
|
1338 |
+
<show_in_store>0</show_in_store>
|
1339 |
<depends>
|
1340 |
<enable>1</enable>
|
1341 |
</depends>
|
1345 |
<frontend_type>text</frontend_type>
|
1346 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
1347 |
<sort_order>85</sort_order>
|
1348 |
+
<show_in_default>0</show_in_default>
|
1349 |
<show_in_website>1</show_in_website>
|
1350 |
+
<show_in_store>0</show_in_store>
|
1351 |
<depends>
|
1352 |
<enable>1</enable>
|
1353 |
</depends>
|
1356 |
<label><![CDATA[ Product image class]]></label>
|
1357 |
<frontend_type>text</frontend_type>
|
1358 |
<sort_order>90</sort_order>
|
1359 |
+
<show_in_default>0</show_in_default>
|
1360 |
<show_in_website>1</show_in_website>
|
1361 |
+
<show_in_store>0</show_in_store>
|
1362 |
<depends>
|
1363 |
<enable>1</enable>
|
1364 |
</depends>
|
1367 |
<label><![CDATA[ Product name class]]></label>
|
1368 |
<frontend_type>text</frontend_type>
|
1369 |
<sort_order>95</sort_order>
|
1370 |
+
<show_in_default>0</show_in_default>
|
1371 |
<show_in_website>1</show_in_website>
|
1372 |
+
<show_in_store>0</show_in_store>
|
1373 |
<depends>
|
1374 |
<enable>1</enable>
|
1375 |
</depends>
|
1378 |
<label><![CDATA[ Product description class]]></label>
|
1379 |
<frontend_type>text</frontend_type>
|
1380 |
<sort_order>100</sort_order>
|
1381 |
+
<show_in_default>0</show_in_default>
|
1382 |
<show_in_website>1</show_in_website>
|
1383 |
+
<show_in_store>0</show_in_store>
|
1384 |
<depends>
|
1385 |
<enable>1</enable>
|
1386 |
</depends>
|
1389 |
<label><![CDATA[ Price container class]]></label>
|
1390 |
<frontend_type>text</frontend_type>
|
1391 |
<sort_order>105</sort_order>
|
1392 |
+
<show_in_default>0</show_in_default>
|
1393 |
<show_in_website>1</show_in_website>
|
1394 |
+
<show_in_store>0</show_in_store>
|
1395 |
<depends>
|
1396 |
<enable>1</enable>
|
1397 |
</depends>
|
1400 |
<label><![CDATA[ Price class]]></label>
|
1401 |
<frontend_type>text</frontend_type>
|
1402 |
<sort_order>110</sort_order>
|
1403 |
+
<show_in_default>0</show_in_default>
|
1404 |
<show_in_website>1</show_in_website>
|
1405 |
+
<show_in_store>0</show_in_store>
|
1406 |
<depends>
|
1407 |
<enable>1</enable>
|
1408 |
</depends>
|
1414 |
<label>Category page</label>
|
1415 |
<frontend_type>text</frontend_type>
|
1416 |
<sort_order>70</sort_order>
|
1417 |
+
<show_in_default>0</show_in_default>
|
1418 |
<show_in_website>1</show_in_website>
|
1419 |
+
<show_in_store>0</show_in_store>
|
1420 |
<fields>
|
1421 |
<enable translate="label">
|
1422 |
<label>Enable</label>
|
1423 |
<frontend_type>select</frontend_type>
|
1424 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
1425 |
<sort_order>0</sort_order>
|
1426 |
+
<show_in_default>0</show_in_default>
|
1427 |
<show_in_website>1</show_in_website>
|
1428 |
+
<show_in_store>0</show_in_store>
|
1429 |
</enable>
|
1430 |
<recommendation_label translate="label">
|
1431 |
<label>Recommendation area label</label>
|
1432 |
<frontend_type>text</frontend_type>
|
1433 |
<sort_order>5</sort_order>
|
1434 |
+
<show_in_default>0</show_in_default>
|
1435 |
<show_in_website>1</show_in_website>
|
1436 |
+
<show_in_store>0</show_in_store>
|
1437 |
<depends>
|
1438 |
<enable>1</enable>
|
1439 |
</depends>
|
1443 |
<frontend_type>select</frontend_type>
|
1444 |
<source_model>affinityitems/source_recoconfig::category</source_model>
|
1445 |
<sort_order>12</sort_order>
|
1446 |
+
<show_in_default>0</show_in_default>
|
1447 |
<show_in_website>1</show_in_website>
|
1448 |
+
<show_in_store>0</show_in_store>
|
1449 |
<depends>
|
1450 |
<enable>1</enable>
|
1451 |
</depends>
|
1454 |
<label>Number of displayed products</label>
|
1455 |
<frontend_type>text</frontend_type>
|
1456 |
<sort_order>10</sort_order>
|
1457 |
+
<show_in_default>0</show_in_default>
|
1458 |
<show_in_website>1</show_in_website>
|
1459 |
+
<show_in_store>0</show_in_store>
|
1460 |
<depends>
|
1461 |
<enable>1</enable>
|
1462 |
</depends>
|
1465 |
<label>Number of displayed products per line</label>
|
1466 |
<frontend_type>text</frontend_type>
|
1467 |
<sort_order>12</sort_order>
|
1468 |
+
<show_in_default>0</show_in_default>
|
1469 |
<show_in_website>1</show_in_website>
|
1470 |
+
<show_in_store>0</show_in_store>
|
1471 |
<depends>
|
1472 |
<enable>1</enable>
|
1473 |
</depends>
|
1477 |
<frontend_type>select</frontend_type>
|
1478 |
<source_model>affinityitems/source_imagesize</source_model>
|
1479 |
<sort_order>15</sort_order>
|
1480 |
+
<show_in_default>0</show_in_default>
|
1481 |
<show_in_website>1</show_in_website>
|
1482 |
+
<show_in_store>0</show_in_store>
|
1483 |
<depends>
|
1484 |
<enable>1</enable>
|
1485 |
</depends>
|
1488 |
<label><![CDATA[<strong>Display settings</strong>]]></label>
|
1489 |
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
1490 |
<sort_order>60</sort_order>
|
1491 |
+
<show_in_default>0</show_in_default>
|
1492 |
<show_in_website>1</show_in_website>
|
1493 |
+
<show_in_store>0</show_in_store>
|
1494 |
<depends>
|
1495 |
<enable>1</enable>
|
1496 |
</depends>
|
1500 |
<frontend_type>text</frontend_type>
|
1501 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
1502 |
<sort_order>65</sort_order>
|
1503 |
+
<show_in_default>0</show_in_default>
|
1504 |
<show_in_website>1</show_in_website>
|
1505 |
+
<show_in_store>0</show_in_store>
|
1506 |
<depends>
|
1507 |
<enable>1</enable>
|
1508 |
</depends>
|
1511 |
<label><![CDATA[ Title <strong>class</strong>]]></label>
|
1512 |
<frontend_type>text</frontend_type>
|
1513 |
<sort_order>70</sort_order>
|
1514 |
+
<show_in_default>0</show_in_default>
|
1515 |
<show_in_website>1</show_in_website>
|
1516 |
+
<show_in_store>0</show_in_store>
|
1517 |
<depends>
|
1518 |
<enable>1</enable>
|
1519 |
</depends>
|
1523 |
<frontend_type>text</frontend_type>
|
1524 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
1525 |
<sort_order>75</sort_order>
|
1526 |
+
<show_in_default>0</show_in_default>
|
1527 |
<show_in_website>1</show_in_website>
|
1528 |
+
<show_in_store>0</show_in_store>
|
1529 |
<depends>
|
1530 |
<enable>1</enable>
|
1531 |
</depends>
|
1535 |
<frontend_type>text</frontend_type>
|
1536 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
1537 |
<sort_order>80</sort_order>
|
1538 |
+
<show_in_default>0</show_in_default>
|
1539 |
<show_in_website>1</show_in_website>
|
1540 |
+
<show_in_store>0</show_in_store>
|
1541 |
<depends>
|
1542 |
<enable>1</enable>
|
1543 |
</depends>
|
1547 |
<frontend_type>text</frontend_type>
|
1548 |
<frontend_model>affinityitems/renderer_config_classes</frontend_model>
|
1549 |
<sort_order>85</sort_order>
|
1550 |
+
<show_in_default>0</show_in_default>
|
1551 |
<show_in_website>1</show_in_website>
|
1552 |
+
<show_in_store>0</show_in_store>
|
1553 |
<depends>
|
1554 |
<enable>1</enable>
|
1555 |
</depends>
|
1558 |
<label><![CDATA[ Product image class]]></label>
|
1559 |
<frontend_type>text</frontend_type>
|
1560 |
<sort_order>90</sort_order>
|
1561 |
+
<show_in_default>0</show_in_default>
|
1562 |
<show_in_website>1</show_in_website>
|
1563 |
+
<show_in_store>0</show_in_store>
|
1564 |
<depends>
|
1565 |
<enable>1</enable>
|
1566 |
</depends>
|
1569 |
<label><![CDATA[ Product name class]]></label>
|
1570 |
<frontend_type>text</frontend_type>
|
1571 |
<sort_order>95</sort_order>
|
1572 |
+
<show_in_default>0</show_in_default>
|
1573 |
<show_in_website>1</show_in_website>
|
1574 |
+
<show_in_store>0</show_in_store>
|
1575 |
<depends>
|
1576 |
<enable>1</enable>
|
1577 |
</depends>
|
1580 |
<label><![CDATA[ Product description class]]></label>
|
1581 |
<frontend_type>text</frontend_type>
|
1582 |
<sort_order>100</sort_order>
|
1583 |
+
<show_in_default>0</show_in_default>
|
1584 |
<show_in_website>1</show_in_website>
|
1585 |
+
<show_in_store>0</show_in_store>
|
1586 |
<depends>
|
1587 |
<enable>1</enable>
|
1588 |
</depends>
|
1591 |
<label><![CDATA[ Price container class]]></label>
|
1592 |
<frontend_type>text</frontend_type>
|
1593 |
<sort_order>105</sort_order>
|
1594 |
+
<show_in_default>0</show_in_default>
|
1595 |
<show_in_website>1</show_in_website>
|
1596 |
+
<show_in_store>0</show_in_store>
|
1597 |
<depends>
|
1598 |
<enable>1</enable>
|
1599 |
</depends>
|
1602 |
<label><![CDATA[ Price class]]></label>
|
1603 |
<frontend_type>text</frontend_type>
|
1604 |
<sort_order>110</sort_order>
|
1605 |
+
<show_in_default>0</show_in_default>
|
1606 |
<show_in_website>1</show_in_website>
|
1607 |
+
<show_in_store>0</show_in_store>
|
1608 |
<depends>
|
1609 |
<enable>1</enable>
|
1610 |
</depends>
|
app/code/local/AffinityEngine/AffinityItems/sql/affinityitems_setup/mysql4-install-1.0.0.php
CHANGED
@@ -70,6 +70,10 @@ $sql = "INSERT INTO `" . $this->getTable('ae_sync_rotate') . "` (`id`, `last_syn
|
|
70 |
$installer->run($sql);
|
71 |
|
72 |
// define defaults in system config
|
|
|
|
|
|
|
|
|
73 |
|
74 |
$xml_path = array('items_home', 'items_left', 'items_right', 'items_cart', 'items_product', 'items_search', 'items_category');
|
75 |
foreach ($xml_path as $path) {
|
@@ -86,7 +90,7 @@ foreach ($xml_path as $path) {
|
|
86 |
(NULL, 'default', '0', 'affinityitems/" . $path . "/li', ',ae_product_block_center'),
|
87 |
(NULL, 'default', '0', 'affinityitems/" . $path . "/product_image_class', 'ae_img_center'),
|
88 |
(NULL, 'default', '0', 'affinityitems/" . $path . "/product_name_class', 'ae_products_name_center'),
|
89 |
-
(NULL, 'default', '0', 'affinityitems/" . $path . "/
|
90 |
(NULL, 'default', '0', 'affinityitems/" . $path . "/price_container_class', 'ae_price_container_center'),
|
91 |
(NULL, 'default', '0', 'affinityitems/" . $path . "/price_class', 'ae_price_center');";
|
92 |
$installer->run($sql);
|
70 |
$installer->run($sql);
|
71 |
|
72 |
// define defaults in system config
|
73 |
+
$sql = "INSERT INTO `" . $this->getTable('core_config_data') . "` (`config_id`, `scope`, `scope_id`, `path`, `value`)
|
74 |
+
VALUES
|
75 |
+
(NULL, 'default', '0', 'affinityitems/general/storeid', '0');";
|
76 |
+
$installer->run($sql);
|
77 |
|
78 |
$xml_path = array('items_home', 'items_left', 'items_right', 'items_cart', 'items_product', 'items_search', 'items_category');
|
79 |
foreach ($xml_path as $path) {
|
90 |
(NULL, 'default', '0', 'affinityitems/" . $path . "/li', ',ae_product_block_center'),
|
91 |
(NULL, 'default', '0', 'affinityitems/" . $path . "/product_image_class', 'ae_img_center'),
|
92 |
(NULL, 'default', '0', 'affinityitems/" . $path . "/product_name_class', 'ae_products_name_center'),
|
93 |
+
(NULL, 'default', '0', 'affinityitems/" . $path . "/product_description_class', 'ae_product_description'),
|
94 |
(NULL, 'default', '0', 'affinityitems/" . $path . "/price_container_class', 'ae_price_container_center'),
|
95 |
(NULL, 'default', '0', 'affinityitems/" . $path . "/price_class', 'ae_price_center');";
|
96 |
$installer->run($sql);
|
app/code/local/AffinityEngine/AffinityItems/sql/affinityitems_setup/mysql4-upgrade-1.1.3-1.1.4.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$installer = $this;
|
4 |
+
$installer->startSetup();
|
5 |
+
|
6 |
+
$sql = 'ALTER TABLE `' . $this->getTable('ae_sync_rotate') . '` ADD `website_id` INT NOT NULL, ADD `website_reg` INT NOT NULL ;'
|
7 |
+
. ' ALTER TABLE `' . $this->getTable('ae_sync_rotate') . '` CHANGE `id` `id` INT( 16 ) NOT NULL AUTO_INCREMENT ;'
|
8 |
+
. ' TRUNCATE TABLE `' . $this->getTable('ae_sync_rotate') . '`;';
|
9 |
+
$installer->run($sql);
|
10 |
+
|
11 |
+
$sql = 'ALTER TABLE `' . $this->getTable('ae_cart_repository') . '` ADD `website_id` INT NOT NULL ;';
|
12 |
+
$installer->run($sql);
|
13 |
+
|
14 |
+
$sql = 'ALTER TABLE `' . $this->getTable('ae_cat_prod_repository') . '` ADD `website_id` INT NOT NULL ;';
|
15 |
+
$installer->run($sql);
|
16 |
+
|
17 |
+
$sql = 'ALTER TABLE `' . $this->getTable('ae_guest_action_repository') . '` ADD `website_id` INT NOT NULL ;';
|
18 |
+
$installer->run($sql);
|
19 |
+
|
20 |
+
$_websites = Mage::getResourceModel('core/website_collection');
|
21 |
+
foreach($_websites as $website) {
|
22 |
+
$sql = "INSERT INTO `" . $this->getTable('ae_sync_rotate') . "` (`last_sync`, `date_add`, `website_id`, `website_reg`) VALUES ('actions', '2014-01-01'," . $website->getWebsiteId() . ", 0);";
|
23 |
+
$installer->run($sql);
|
24 |
+
}
|
25 |
+
|
26 |
+
$sql = "DELETE FROM `" . $this->getTable('core_config_data') . "` WHERE `path` IN ('affinityitems/security/login', 'affinityitems/security/password', 'affinityitems/security/site_id', 'affinityitems/security/key');";
|
27 |
+
$installer->run($sql);
|
28 |
+
|
29 |
+
$installer->endSetup();
|
app/design/adminhtml/default/default/template/affinityitems/affinityitems_login.phtml
CHANGED
@@ -41,7 +41,8 @@ jQuery(document).ready(function () {
|
|
41 |
email: jQuery("#remail").val(),
|
42 |
password: jQuery("#rpassword").val(),
|
43 |
discountCode: jQuery("#rdiscount").val(),
|
44 |
-
form_key: jQuery("#rform_key").val()
|
|
|
45 |
},
|
46 |
success: function (e, t, n) {
|
47 |
var response = e;
|
@@ -72,6 +73,27 @@ return false;
|
|
72 |
</script>
|
73 |
|
74 |
<div class="items-wrapper">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
<div class="items-header">
|
76 |
<div class="aelogo"></div>
|
77 |
</div>
|
@@ -95,6 +117,7 @@ return false;
|
|
95 |
</p>
|
96 |
<input id="aeregister" style="margin-top: 67px;" class="items-button items-green" type="submit" value="<?php echo Mage::helper('affinityitems')->__('Install AffinityItems');?>">
|
97 |
<input name="form_key" id="rform_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
|
|
98 |
</form>
|
99 |
</div>
|
100 |
</div>
|
@@ -114,4 +137,14 @@ return false;
|
|
114 |
<div class="clear"></div>
|
115 |
</div>
|
116 |
</div>
|
117 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
email: jQuery("#remail").val(),
|
42 |
password: jQuery("#rpassword").val(),
|
43 |
discountCode: jQuery("#rdiscount").val(),
|
44 |
+
form_key: jQuery("#rform_key").val(),
|
45 |
+
website_id: jQuery("#website_id").val()
|
46 |
},
|
47 |
success: function (e, t, n) {
|
48 |
var response = e;
|
73 |
</script>
|
74 |
|
75 |
<div class="items-wrapper">
|
76 |
+
|
77 |
+
<?php $websites = Mage::app()->getWebsites(); ?>
|
78 |
+
<p class="switcher"><label for="store_switcher"><?php echo $this->__('Choose website:') ?></label>
|
79 |
+
<?php echo $this->getHintHtml() ?>
|
80 |
+
<select name="store_switcher" id="store_switcher" class="left-col-block" onchange="return switchStore(this);">
|
81 |
+
<option value=""><?php echo $this->__('Please select website') ?></option>
|
82 |
+
<?php // foreach ($this->getWebsiteCollection() as $_website): ?>
|
83 |
+
<?php foreach ($websites as $_website): ?>
|
84 |
+
<option website="true"
|
85 |
+
rel="<?php echo Mage::helper("adminhtml")->getUrl("affinityitems/adminhtml_affinityitemsbackend/index/",array("website_id" => $_website->getId())); ?>"
|
86 |
+
value="<?php echo $_website->getId() ?>"
|
87 |
+
<?php if($this->getRequest()->getParam('website_id') == $_website->getId()): ?>
|
88 |
+
selected="selected"<?php endif; ?>
|
89 |
+
><?php echo $_website->getName() ?></option>
|
90 |
+
<?php endforeach; ?>
|
91 |
+
</select>
|
92 |
+
</p>
|
93 |
+
|
94 |
+
<?php
|
95 |
+
if ( $this->getRequest()->getParam('website_id') ): ?>
|
96 |
+
|
97 |
<div class="items-header">
|
98 |
<div class="aelogo"></div>
|
99 |
</div>
|
117 |
</p>
|
118 |
<input id="aeregister" style="margin-top: 67px;" class="items-button items-green" type="submit" value="<?php echo Mage::helper('affinityitems')->__('Install AffinityItems');?>">
|
119 |
<input name="form_key" id="rform_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
120 |
+
<input name="website_id" id="website_id" type="hidden" value="<?php echo $this->getRequest()->getParam('website_id') ?>" />
|
121 |
</form>
|
122 |
</div>
|
123 |
</div>
|
137 |
<div class="clear"></div>
|
138 |
</div>
|
139 |
</div>
|
140 |
+
<?php endif; ?>
|
141 |
+
</div>
|
142 |
+
|
143 |
+
<script type="text/javascript">
|
144 |
+
//<![CDATA[
|
145 |
+
function switchStore(obj){
|
146 |
+
var redirecrUrl = obj.options[obj.selectedIndex].getAttribute('rel');
|
147 |
+
setLocation(redirecrUrl);
|
148 |
+
}
|
149 |
+
//]]>
|
150 |
+
</script>
|
app/design/adminhtml/default/default/template/affinityitems/affinityitems_sync.phtml
CHANGED
@@ -1,5 +1,7 @@
|
|
1 |
<?php
|
|
|
2 |
$helper = Mage::helper('affinityitems/aeadapter');
|
|
|
3 |
$request = new AffinityEngine_AffinityItems_Model_Sdk_Request_SiteRequest(array());
|
4 |
$data = $request->get();
|
5 |
$statistics = Mage::helper('core')->jsonDecode($data['statistics']);
|
@@ -7,10 +9,12 @@ $siteId = $helper->getSiteId();
|
|
7 |
$categories = $helper->checkSync('categories');
|
8 |
$products = $helper->checkSync('products');
|
9 |
$cart = $helper->checkSync('cart');
|
|
|
10 |
$orders = $helper->checkSync('orders');
|
11 |
$actions = $helper->checkSync('actions');
|
12 |
$isSynced = (bool) ($categories && $products && $cart && $orders && $actions);
|
13 |
$initialsync = (count(Mage::getModel('affinityitems/syncrotate')->getCollection())) ? (bool) Mage::getModel('affinityitems/syncrotate')->getCollection()->getFirstItem()->getData('initial_sync') : true;
|
|
|
14 |
?>
|
15 |
|
16 |
<div class="aewrapper">
|
@@ -26,6 +30,26 @@ $initialsync = (count(Mage::getModel('affinityitems/syncrotate')->getCollection(
|
|
26 |
</div>
|
27 |
|
28 |
<div class="items-wrapper">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
<div class="items-header">
|
30 |
<div class="aelogo"></div>
|
31 |
</div>
|
@@ -54,7 +78,8 @@ $initialsync = (count(Mage::getModel('affinityitems/syncrotate')->getCollection(
|
|
54 |
<?php } ?>
|
55 |
|
56 |
|
57 |
-
<?php $currency_code = Mage::app()->getStore()->getCurrentCurrencyCode(); ?>
|
|
|
58 |
|
59 |
<div class="items-boxes">
|
60 |
|
@@ -116,11 +141,19 @@ $initialsync = (count(Mage::getModel('affinityitems/syncrotate')->getCollection(
|
|
116 |
<ul>
|
117 |
<li class="<?php echo ($categories) ? 'aechecked' : 'aeunchecked'; ?>"><?php echo $this->__('Categories synchronization'); ?></li>
|
118 |
<li class="<?php echo ($products) ? 'aechecked' : 'aeunchecked'; ?>"><?php echo $this->__('Products synchronization'); ?></li>
|
119 |
-
<li class="<?php echo ($
|
120 |
<li class="<?php echo ($orders) ? 'aechecked' : 'aeunchecked'; ?>"><?php echo $this->__('Orders synchronization'); ?></li>
|
|
|
121 |
<li class="<?php echo ($actions) ? 'aechecked' : 'aeunchecked'; ?>"><?php echo $this->__('Actions synchronization'); ?></li>
|
122 |
</ul>
|
123 |
</div>
|
124 |
</div>
|
125 |
|
126 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
2 |
+
$websiteId = $this->getRequest()->getParam('website_id') ? $this->getRequest()->getParam('website_id') : 0 ;
|
3 |
$helper = Mage::helper('affinityitems/aeadapter');
|
4 |
+
$helper->registerWebsiteId($websiteId);
|
5 |
$request = new AffinityEngine_AffinityItems_Model_Sdk_Request_SiteRequest(array());
|
6 |
$data = $request->get();
|
7 |
$statistics = Mage::helper('core')->jsonDecode($data['statistics']);
|
9 |
$categories = $helper->checkSync('categories');
|
10 |
$products = $helper->checkSync('products');
|
11 |
$cart = $helper->checkSync('cart');
|
12 |
+
$members = $helper->checkSync('members');
|
13 |
$orders = $helper->checkSync('orders');
|
14 |
$actions = $helper->checkSync('actions');
|
15 |
$isSynced = (bool) ($categories && $products && $cart && $orders && $actions);
|
16 |
$initialsync = (count(Mage::getModel('affinityitems/syncrotate')->getCollection())) ? (bool) Mage::getModel('affinityitems/syncrotate')->getCollection()->getFirstItem()->getData('initial_sync') : true;
|
17 |
+
|
18 |
?>
|
19 |
|
20 |
<div class="aewrapper">
|
30 |
</div>
|
31 |
|
32 |
<div class="items-wrapper">
|
33 |
+
|
34 |
+
|
35 |
+
<?php $websites = Mage::app()->getWebsites(); ?>
|
36 |
+
<p class="switcher"><label for="store_switcher"><?php echo $this->__('Choose website:') ?></label>
|
37 |
+
<?php echo $this->getHintHtml() ?>
|
38 |
+
<select name="store_switcher" id="store_switcher" class="left-col-block" onchange="return switchStore(this);">
|
39 |
+
<!--<option value=""><?php echo $this->__('Please select website') ?></option>-->
|
40 |
+
<?php // foreach ($this->getWebsiteCollection() as $_website): ?>
|
41 |
+
<?php foreach ($websites as $_website): ?>
|
42 |
+
<option website="true"
|
43 |
+
rel="<?php echo Mage::helper("adminhtml")->getUrl("affinityitems/adminhtml_affinityitemsbackend/index/",array("website_id" => $_website->getId())); ?>"
|
44 |
+
value="<?php echo $_website->getId() ?>"
|
45 |
+
<?php if($websiteId == $_website->getId()): ?>
|
46 |
+
selected="selected"<?php endif; ?>
|
47 |
+
><?php echo $_website->getName() ?></option>
|
48 |
+
<?php endforeach; ?>
|
49 |
+
</select>
|
50 |
+
</p>
|
51 |
+
|
52 |
+
|
53 |
<div class="items-header">
|
54 |
<div class="aelogo"></div>
|
55 |
</div>
|
78 |
<?php } ?>
|
79 |
|
80 |
|
81 |
+
<?php // $currency_code = Mage::app()->getStore()->getCurrentCurrencyCode(); ?>
|
82 |
+
<?php $currency_code = Mage::getModel('core/website')->load($websiteId)->getDefaultStore()->getCurrentCurrencyCode(); ?>
|
83 |
|
84 |
<div class="items-boxes">
|
85 |
|
141 |
<ul>
|
142 |
<li class="<?php echo ($categories) ? 'aechecked' : 'aeunchecked'; ?>"><?php echo $this->__('Categories synchronization'); ?></li>
|
143 |
<li class="<?php echo ($products) ? 'aechecked' : 'aeunchecked'; ?>"><?php echo $this->__('Products synchronization'); ?></li>
|
144 |
+
<li class="<?php echo ($members) ? 'aechecked' : 'aeunchecked'; ?>"><?php echo $this->__('Members synchronization'); ?></li>
|
145 |
<li class="<?php echo ($orders) ? 'aechecked' : 'aeunchecked'; ?>"><?php echo $this->__('Orders synchronization'); ?></li>
|
146 |
+
<li class="<?php echo ($cart) ? 'aechecked' : 'aeunchecked'; ?>"><?php echo $this->__('Carts synchronization'); ?></li>
|
147 |
<li class="<?php echo ($actions) ? 'aechecked' : 'aeunchecked'; ?>"><?php echo $this->__('Actions synchronization'); ?></li>
|
148 |
</ul>
|
149 |
</div>
|
150 |
</div>
|
151 |
|
152 |
+
</div>
|
153 |
+
|
154 |
+
<script type="text/javascript">
|
155 |
+
function switchStore(obj){
|
156 |
+
var redirecrUrl = obj.options[obj.selectedIndex].getAttribute('rel');
|
157 |
+
setLocation(redirecrUrl);
|
158 |
+
}
|
159 |
+
</script>
|
app/design/frontend/base/default/template/affinityengine/ae_js.phtml
CHANGED
@@ -14,8 +14,8 @@
|
|
14 |
|
15 |
<?php
|
16 |
$_helper = $this->helper('catalog/output');
|
17 |
-
$_category_detail = Mage::registry('current_category');
|
18 |
-
if(isset($_category_detail)) { ?>
|
19 |
var categoryId = '<?php echo $_category_detail->getId();?>';
|
20 |
<?php } ?>
|
21 |
aejQuery(document).ready(function () {
|
14 |
|
15 |
<?php
|
16 |
$_helper = $this->helper('catalog/output');
|
17 |
+
$_category_detail = Mage::registry('current_category');
|
18 |
+
if(isset($_category_detail) && Mage::helper('affinityitems')->getCurrentPage() == 'category') { ?>
|
19 |
var categoryId = '<?php echo $_category_detail->getId();?>';
|
20 |
<?php } ?>
|
21 |
aejQuery(document).ready(function () {
|
app/design/frontend/base/default/template/affinityengine/horizontal.phtml
CHANGED
@@ -21,7 +21,7 @@
|
|
21 |
<li id="<?php echo $helper->getId('li'); ?>" class="<?php echo $helper->getClass('li'); ?> <?php if(($i % $helper->getConfig('number_products_per_line')) == ($helper->getConfig('number_products_per_line') - 1)) echo 'ae_last_item_of_line'; ?>">
|
22 |
<a rel="<?php echo $product->getId()?>" href="<?php echo $helper->getFullProductUrl($product); ?>" title="<?php echo $pname ?>" rel="<?php echo $product->getId() ?>"><img class="<?php echo $helper->getClass('product_image_class'); ?>" src="<?php echo Mage::helper('catalog/image')->init($product, 'image')->resize($imagesize[0], $imagesize[1]) ?>" height="<?php echo $imagesize[0]; ?>" width="<?php echo $imagesize[1]; ?>" alt="<?php echo $pname ?>" /></a>
|
23 |
<h5 itemprop="name">
|
24 |
-
<a rel="<?php echo $product->getId()?>" class="<?php echo $helper->getClass('product_name_class'); ?>" href="<?php echo $helper->getFullProductUrl($product); ?>"
|
25 |
</h5>
|
26 |
<div>
|
27 |
<p class="<?php echo $helper->getClass('product_description_class'); ?>"><?php echo Mage::helper('core/string')->truncate($product->getShortDescription(), 40); ?></p>
|
21 |
<li id="<?php echo $helper->getId('li'); ?>" class="<?php echo $helper->getClass('li'); ?> <?php if(($i % $helper->getConfig('number_products_per_line')) == ($helper->getConfig('number_products_per_line') - 1)) echo 'ae_last_item_of_line'; ?>">
|
22 |
<a rel="<?php echo $product->getId()?>" href="<?php echo $helper->getFullProductUrl($product); ?>" title="<?php echo $pname ?>" rel="<?php echo $product->getId() ?>"><img class="<?php echo $helper->getClass('product_image_class'); ?>" src="<?php echo Mage::helper('catalog/image')->init($product, 'image')->resize($imagesize[0], $imagesize[1]) ?>" height="<?php echo $imagesize[0]; ?>" width="<?php echo $imagesize[1]; ?>" alt="<?php echo $pname ?>" /></a>
|
23 |
<h5 itemprop="name">
|
24 |
+
<a rel="<?php echo $product->getId()?>" class="<?php echo $helper->getClass('product_name_class'); ?>" href="<?php echo $helper->getFullProductUrl($product); ?>" title="<?php echo $pname ?>"><?php echo $pname ?></a>
|
25 |
</h5>
|
26 |
<div>
|
27 |
<p class="<?php echo $helper->getClass('product_description_class'); ?>"><?php echo Mage::helper('core/string')->truncate($product->getShortDescription(), 40); ?></p>
|
app/design/frontend/base/default/template/affinityengine/vertical.phtml
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
<?php $enable_column = false; ?>
|
13 |
<?php endif; ?>
|
14 |
|
15 |
-
<?php if ($enable_column): ?>
|
16 |
<?php $productCollection = $this->getProductCollection($blockName); ?>
|
17 |
<?php if ($productCollection && count($productCollection)): ?>
|
18 |
<div class="ae-area ae-<?php echo $css;?>">
|
12 |
<?php $enable_column = false; ?>
|
13 |
<?php endif; ?>
|
14 |
|
15 |
+
<?php if ($enable_column ): ?>
|
16 |
<?php $productCollection = $this->getProductCollection($blockName); ?>
|
17 |
<?php if ($productCollection && count($productCollection)): ?>
|
18 |
<div class="ae-area ae-<?php echo $css;?>">
|
app/etc/modules/AffinityEngine_AffinityItems.xml
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
<AffinityEngine_AffinityItems>
|
5 |
<active>true</active>
|
6 |
<codePool>local</codePool>
|
7 |
-
<version>1.1.
|
8 |
</AffinityEngine_AffinityItems>
|
9 |
</modules>
|
10 |
</config>
|
4 |
<AffinityEngine_AffinityItems>
|
5 |
<active>true</active>
|
6 |
<codePool>local</codePool>
|
7 |
+
<version>1.1.4</version>
|
8 |
</AffinityEngine_AffinityItems>
|
9 |
</modules>
|
10 |
</config>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Affinity_Items</name>
|
4 |
-
<version>1.1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3</license>
|
7 |
<channel>community</channel>
|
@@ -42,14 +42,14 @@ Affinity items pricing model is a pure success based pricing model. There are no
|
|
42 |
Developers
|
43 |

|
44 |
Affinity items Magento extension is also downloadable from our developer platform: http://developer.affinity-engine.fr/affinityitems/magento/wikis/master/en-home</description>
|
45 |
-
<notes>-
|
46 |
-
-
|
47 |
-
- fixed
|
48 |
-
|
49 |
<authors><author><name>Mathieu</name><user>BARAN</user><email>mathieu@affinity-engine.fr</email></author></authors>
|
50 |
-
<date>2015-
|
51 |
-
<time>
|
52 |
-
<contents><target name="magelocal"><dir name="AffinityEngine"><dir name="AffinityItems"><dir name="Block"><dir name="Adminhtml"><dir name="Affinityitems"><file name="Grid.php" hash="de34b472132fc34610da4b2257f17176"/></dir><file name="Affinityitems.php" hash="
|
53 |
<compatible/>
|
54 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
55 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Affinity_Items</name>
|
4 |
+
<version>1.1.4</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3</license>
|
7 |
<channel>community</channel>
|
42 |
Developers
|
43 |

|
44 |
Affinity items Magento extension is also downloadable from our developer platform: http://developer.affinity-engine.fr/affinityitems/magento/wikis/master/en-home</description>
|
45 |
+
<notes>- added multisite functionnality
|
46 |
+
- added more logs
|
47 |
+
- fixed read action js error
|
48 |
+
</notes>
|
49 |
<authors><author><name>Mathieu</name><user>BARAN</user><email>mathieu@affinity-engine.fr</email></author></authors>
|
50 |
+
<date>2015-09-09</date>
|
51 |
+
<time>08:49:44</time>
|
52 |
+
<contents><target name="magelocal"><dir name="AffinityEngine"><dir name="AffinityItems"><dir name="Block"><dir name="Adminhtml"><dir name="Affinityitems"><file name="Grid.php" hash="de34b472132fc34610da4b2257f17176"/></dir><file name="Affinityitems.php" hash="5b3ec37b91405b80e060902a21ed8e9c"/><file name="Affinityitemsbackend.php" hash="40aa694ef6ee2f256f202cf1a144ce0b"/></dir><file name="Index.php" hash="0149583572d9d455c4bb3cf78336d2af"/><dir name="Renderer"><dir name="Config"><file name="Classes.php" hash="8c3d39529ef95c439b8e679a3912d9be"/><file name="Imagesize.php" hash="1a1bdd54722e5cf9ecb0318655b5f6db"/><file name="Ipblacklist.php" hash="645526f7fc6ad0ca8835f027d3a8c5f9"/><file name="Serverlist.php" hash="5c0f647a50a9444cde02909bcc164c6f"/><file name="Siteinfo.php" hash="baed3f0f265f0e93537d75ed988c871b"/><file name="Version.php" hash="48fe7d204de5dbc4194b54b6c3df41e9"/></dir></dir></dir><dir name="Helper"><file name="Aeadapter.php" hash="d2ff77ec63677d25e411d45042aeb326"/><file name="Data.php" hash="659e81e6fe364e5f1970191e3b2115e3"/></dir><dir name="Model"><file name="Action.php" hash="2eb81ffd225b596d389c63f158818809"/><file name="Cart.php" hash="726ae5561ab9e01ee72c036f42914469"/><file name="CatProdRepo.php" hash="326f055745d51d128b1e2e00c7fdb286"/><file name="Config.php" hash="b29bcfd6f1ed91bd0f83b56563732a4b"/><file name="Cron.php" hash="d4c580adc720b8c93b3d2735046cc3bb"/><file name="Log.php" hash="2c2f523188b50e7a4cf5ff6d79d1c3b5"/><file name="Observer.php" hash="a27c175b5c067cf10d5784b05b963eed"/><dir name="Resource"><dir name="Action"><file name="Collection.php" hash="326d82fe39153680f99defdb1e846476"/></dir><file name="Action.php" hash="6cd9f6a6d4b87e220c3bbf271a24810d"/><dir name="Cart"><file name="Collection.php" hash="9a8c23023645f9170102980ce56bc193"/></dir><file name="Cart.php" hash="8bb395c3ebfc043326c6001d623270a4"/><dir name="CatProdRepo"><file name="Collection.php" hash="bf98be72eae2c0859046142ed2d7fb4c"/></dir><file name="CatProdRepo.php" hash="4781a985d1b889633ed28d98b28378bf"/><dir name="Log"><file name="Collection.php" hash="935eae91b74f30c4a960b1c18f373050"/></dir><file name="Log.php" hash="bc36af5602145cc1fc094fa17289eb1a"/><dir name="Syncrotate"><file name="Collection.php" hash="66bd261226b6865c5a52ef28e9b064ea"/></dir><file name="Syncrotate.php" hash="0d3b60d41d19f49c8dc673fd61007de5"/></dir><dir name="Sdk"><dir name="Abtesting"><file name="Abtesting.php" hash="7e15e1a98aaa55f0dee24ecacf813f54"/></dir><dir name="Core"><file name="AbstractRequest.php" hash="d92ec4494b9cee5fa1343594024336fd"/><file name="Curl.php" hash="4d79b217f9dc05d6a0afdb2515e372f9"/></dir><dir name="Recommendation"><file name="Recommendation.php" hash="64929784b877e32281705eee0c056533"/></dir><dir name="Request"><file name="ActionRequest.php" hash="a4128a5365d69a19e72ed9d7fe357514"/><file name="CategoryRequest.php" hash="31db44e9f404ee80a29939424a1a3596"/><file name="CustomerRequest.php" hash="3f1a0758034a2865e5bdf0e439694212"/><file name="DisableRequest.php" hash="9eeb721518be067c57eb8ce58df3d270"/><file name="GuestRequest.php" hash="78dd970ae4d0612853ddcdafd4de8ec4"/><file name="HostRequest.php" hash="8df4275aaf02019d9228ee14b395abe5"/><file name="LinkGuestToMemberRequest.php" hash="499c3986c89b09942c424542375d4d58"/><file name="MemberRequest.php" hash="74747f67cca8cccad5e6e346cfc157b0"/><file name="NotificationRequest.php" hash="3758c90470a9a32bafc8395a30127490"/><file name="OrderRequest.php" hash="590c8d40c2202f0becd50ec9a97c6885"/><file name="ProductRequest.php" hash="ad20d6f489728b5863867bd6bfaca753"/><file name="RecommendationRequest.php" hash="dc4e986ed4b224cbc1f36464e8610a43"/><file name="ResynchronizeRequest.php" hash="5d534d27011644ba14aa58bd935394bd"/><file name="SiteRequest.php" hash="42029a530971606fd2a2fd4cdb23b8b3"/></dir></dir><dir name="Source"><file name="Enviroment.php" hash="099b2a345377ceb795674a5d4d30a6a7"/><file name="Imagesize.php" hash="fa63ae1460a85dae21b0c6a3aabd6e35"/><file name="Loglevel.php" hash="8ffa64757752eaba56cac5b8bb1ff7a3"/><file name="Recoconfig.php" hash="cc99f674dd147f270969d05f02c615a6"/></dir><dir name="Sync"><file name="ActionSync.php" hash="52f8661cf04949ee8d390fa84cef2b4c"/><file name="CartActionSync.php" hash="00ffa3870ffab842261b771e80b89c3a"/><file name="CategorySync.php" hash="829ffddb16589edda245860f25452ef9"/><file name="MemberSync.php" hash="1b4216a76bfeb78490ae34a31c6fc6a8"/><file name="OrderSync.php" hash="01aefd33bfd7802038e9e5658c628901"/><file name="ProductSync.php" hash="9e3dfb3d1aa92491211414ab4958f1ce"/><file name="Sync.php" hash="def552c615693c6e217fc272335aab4c"/></dir><file name="Syncrotate.php" hash="358dd78e37da93c0450162c0b20e185b"/><dir name="System"><dir name="Config"><dir name="Source"><dir name="Dropdown"><file name="Values.php" hash="5e4f3df023f2745c27d72b73ff2d09ec"/></dir></dir></dir></dir></dir><dir name="bin"><file name="manual-run.php" hash="cb2223d194aea92cf5626000c4ddfde8"/></dir><dir name="controllers"><file name="ActionController.php" hash="de57a5b767913931b63fe29eb6e2311f"/><dir name="Adminhtml"><file name="AffinityitemsbackendController.php" hash="a1f7026fd8ac2def3b25826a11b41f0a"/><file name="AffinityitemslogController.php" hash="54903640158b2163526431001a1c51d9"/><file name="AjaxController.php" hash="793c65d49a7932a5c2fac07ea9a40e9e"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="3db0abc036764375bece30c5bb5dc976"/><file name="config.xml" hash="3e6e39ca3bf87e37137a9256eef79612"/><file name="system.xml" hash="16effd86c38e6c13f166a5ffbb10f5c1"/></dir><dir name="sql"><dir name="affinityitems_setup"><file name="mysql4-install-1.0.0.php" hash="084acd16e18a817ab84e2479bcf2622e"/><file name="mysql4-upgrade-1.1.3-1.1.4.php" hash="ebd883bed32bd6bb2f5eb4976e1b1699"/></dir></dir><file name="uninstall.sql" hash="73cb0928320f6f5325c6d21a87bf49eb"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="AffinityEngine_AffinityItems.xml" hash="9bc174dad4c7965b6ee01d4360e797fc"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="affinityitems.xml" hash="32d45a407463b4e76b5e30dab765b965"/></dir><dir name="template"><dir name="affinityitems"><file name="affinityitems_login.phtml" hash="f5673a792b174e9595290d60e2257135"/><file name="affinityitems_sync.phtml" hash="4e4713289acda3e95b592c94f8587906"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="affinityengine"><file name="affinityitems.xml" hash="9a2c254e32f5d69deef0e3d74f007905"/></dir></dir><dir name="template"><dir name="affinityengine"><file name="ae_css.phtml" hash="828164eb0fcf039ac670c432d2d56c0d"/><file name="ae_js.phtml" hash="cde8d2a00a5f76b5932d1ad71c4ac4d2"/><file name="horizontal.phtml" hash="ef22dbc5d8803e0fab10cce0f94cfe32"/><file name="pricehtml.phtml" hash="a4c2c740d9119fb016c8e005ed5ad7ca"/><file name="vertical.phtml" hash="4b378f94d695d2eabc30560636c91aa5"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="affinityitems"><file name="affinityitems.css" hash="ecb8e40e67270c872e53b18f46a42671"/></dir></dir><dir name="js"><dir name="affinityitems"><file name="affinityitems.js" hash="9dd718da50afee4a5bbdc4780e10ae72"/><file name="jquery-noconflict.js" hash="1f3b8801b59144eeaee27caa7c5c15db"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="affinityengine"><dir name="img"><file name="aeboard.jpg" hash="9481a712582bcac6bdc2727a9cf52b3b"/><file name="aemoney.jpg" hash="6dc4d7612be1efe77784c622fa73985d"/><file name="aestart.jpg" hash="277c540ae19974133f473a731145f33d"/><file name="ailogo.png" hash="df2799c4ee9e68bd793cb85149fea2e7"/><file name="checked.png" hash="d4122f013483f59be79719385405a0de"/><file name="disabled.png" hash="fd56b078b4c3423735c667358285dc06"/><file name="enabled.png" hash="2499c302772cacbaf5d3c85427f2e7c5"/><file name="error.png" hash="bc87cd99143fc930408e379d5c3aa0f0"/><file name="index.php" hash="931175008efa4be6a17827fefd16937d"/><file name="loading.gif" hash="30d8e72bfdae694b1938658e1b087df0"/><file name="logo.png" hash="af48761d7b17a4e5115b8f16aaf634b6"/><file name="pdf.png" hash="95b561422892384337eb2eabb968a558"/><file name="unchecked.png" hash="0f5ec71a07abf89590209349c85b58ff"/></dir><file name="jquery-noconflict.js" hash="3d8c3103282467d2cd94031dbf4a75b6"/><file name="main.css" hash="58cbab2fcea443ea9dad70bb0cd4dad8"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="fr_FR"><file name="AffinityEngine_AffinityItems.csv" hash="e8531b7ad38442694a0091c4daf586d4"/></dir></target></contents>
|
53 |
<compatible/>
|
54 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
55 |
</package>
|
skin/frontend/base/default/js/affinityitems/affinityitems.js
CHANGED
@@ -115,8 +115,8 @@ aejQuery(document).ready(function() {
|
|
115 |
var aenow = new Date().getTime();
|
116 |
|
117 |
if (aejQuery('#product_page_product_id').val()) {
|
118 |
-
var
|
119 |
-
clearInterval(
|
120 |
postAction("read", {productId: aejQuery('#product_page_product_id').val()});
|
121 |
}), 4000);
|
122 |
createCookie('paetimestamp', (aenow + "." + aejQuery('#product_page_product_id').val()), 1);
|
@@ -131,8 +131,8 @@ aejQuery(document).ready(function() {
|
|
131 |
}
|
132 |
|
133 |
if (typeof categoryId !== 'undefined') {
|
134 |
-
var
|
135 |
-
clearInterval(
|
136 |
postAction("readCategory", {categoryId : categoryId});
|
137 |
}), 4000);
|
138 |
createCookie('caetimestamp', (aenow+"."+categoryId), 1);
|
115 |
var aenow = new Date().getTime();
|
116 |
|
117 |
if (aejQuery('#product_page_product_id').val()) {
|
118 |
+
var aeptimer = setInterval((function() {
|
119 |
+
clearInterval(aeptimer);
|
120 |
postAction("read", {productId: aejQuery('#product_page_product_id').val()});
|
121 |
}), 4000);
|
122 |
createCookie('paetimestamp', (aenow + "." + aejQuery('#product_page_product_id').val()), 1);
|
131 |
}
|
132 |
|
133 |
if (typeof categoryId !== 'undefined') {
|
134 |
+
var aectimer = setInterval((function() {
|
135 |
+
clearInterval(aectimer);
|
136 |
postAction("readCategory", {categoryId : categoryId});
|
137 |
}), 4000);
|
138 |
createCookie('caetimestamp', (aenow+"."+categoryId), 1);
|