Me_Gravity - Version 1.0.0.9

Version Notes

Version number: 1.0.0.9
Stability: Stable
Compatibility: CE 1.6.x, 1.7.x, 1.8.x, 1.9.x

Download this release

Release Info

Developer Gravity Recommendations
Extension Me_Gravity
Version 1.0.0.9
Comparing to
See all releases


Code changes from version 1.0.0.0 to 1.0.0.9

Files changed (37) hide show
  1. app/code/community/Me/Gravity/Block/Catalog/Product/View/Js/Gravity.php +10 -0
  2. app/code/community/Me/Gravity/Block/Catalogsearch/Advanced/Js/Gravity.php +85 -0
  3. app/code/community/Me/Gravity/Block/Catalogsearch/Js/Gravity.php +10 -0
  4. app/code/community/Me/Gravity/Block/Recommendation.php +10 -0
  5. app/code/community/Me/Gravity/Model/Export/Abstract.php +11 -10
  6. app/code/community/Me/Gravity/Model/Export/Catalog/Product.php +37 -35
  7. app/code/community/Me/Gravity/Model/Method/Request.php +29 -8
  8. app/code/community/Me/Gravity/Model/Observer.php +10 -5
  9. app/code/community/Me/Gravity/Model/Products.php +198 -53
  10. app/code/community/Me/Gravity/controllers/Adminhtml/GravityController.php +3 -10
  11. app/code/community/Me/Gravity/etc/config.xml +1 -1
  12. app/design/frontend/base/default/template/me/gravity/catalog/category/boxes/default.phtml +6 -4
  13. app/design/frontend/base/default/template/me/gravity/catalog/category/boxes/sidebar.phtml +5 -3
  14. app/design/frontend/base/default/template/me/gravity/catalog/product/view/boxes/default.phtml +6 -4
  15. app/design/frontend/base/default/template/me/gravity/catalog/product/view/boxes/sidebar.phtml +5 -3
  16. app/design/frontend/base/default/template/me/gravity/catalog/product/view/js/gravity.phtml +1 -0
  17. app/design/frontend/base/default/template/me/gravity/catalogsearch/advanced/js/gravity.phtml +5 -4
  18. app/design/frontend/base/default/template/me/gravity/catalogsearch/boxes/default.phtml +6 -4
  19. app/design/frontend/base/default/template/me/gravity/catalogsearch/boxes/sidebar.phtml +5 -3
  20. app/design/frontend/base/default/template/me/gravity/catalogsearch/js/gravity.phtml +2 -1
  21. app/design/frontend/base/default/template/me/gravity/checkout/cart/boxes/default.phtml +6 -4
  22. app/design/frontend/base/default/template/me/gravity/checkout/cart/boxes/sidebar.phtml +5 -3
  23. app/design/frontend/base/default/template/me/gravity/general/boxes/default.phtml +6 -4
  24. app/design/frontend/base/default/template/me/gravity/general/boxes/sidebar.phtml +5 -3
  25. app/design/frontend/base/default/template/me/gravity/widget/boxes/widget.phtml +6 -4
  26. app/design/frontend/rwd/default/template/me/gravity/catalog/category/boxes/default.phtml +6 -4
  27. app/design/frontend/rwd/default/template/me/gravity/catalog/category/boxes/sidebar.phtml +5 -3
  28. app/design/frontend/rwd/default/template/me/gravity/catalog/product/view/boxes/default.phtml +6 -4
  29. app/design/frontend/rwd/default/template/me/gravity/catalog/product/view/boxes/sidebar.phtml +5 -3
  30. app/design/frontend/rwd/default/template/me/gravity/catalogsearch/boxes/default.phtml +6 -4
  31. app/design/frontend/rwd/default/template/me/gravity/catalogsearch/boxes/sidebar.phtml +5 -3
  32. app/design/frontend/rwd/default/template/me/gravity/checkout/cart/boxes/default.phtml +6 -4
  33. app/design/frontend/rwd/default/template/me/gravity/checkout/cart/boxes/sidebar.phtml +5 -3
  34. app/design/frontend/rwd/default/template/me/gravity/general/boxes/default.phtml +6 -4
  35. app/design/frontend/rwd/default/template/me/gravity/general/boxes/sidebar.phtml +5 -3
  36. app/design/frontend/rwd/default/template/me/gravity/widget/boxes/widget.phtml +6 -4
  37. package.xml +5 -5
app/code/community/Me/Gravity/Block/Catalog/Product/View/Js/Gravity.php CHANGED
@@ -51,6 +51,16 @@ class Me_Gravity_Block_Catalog_Product_View_Js_Gravity extends Mage_Catalog_Bloc
51
  return false;
52
  }
53
 
 
 
 
 
 
 
 
 
 
 
54
  /**
55
  * Get Gravity extension helper
56
  *
51
  return false;
52
  }
53
 
54
+ /**
55
+ * Get current store id
56
+ *
57
+ * @return int
58
+ */
59
+ public function getStoreId()
60
+ {
61
+ return Mage::app()->getStore()->getId();
62
+ }
63
+
64
  /**
65
  * Get Gravity extension helper
66
  *
app/code/community/Me/Gravity/Block/Catalogsearch/Advanced/Js/Gravity.php CHANGED
@@ -25,6 +25,40 @@ class Me_Gravity_Block_Catalogsearch_Advanced_Js_Gravity extends Mage_CatalogSea
25
  return $this->getGravityHelper()->isFullyEnabled();
26
  }
27
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  /**
29
  * Get search criterias
30
  *
@@ -45,6 +79,16 @@ class Me_Gravity_Block_Catalogsearch_Advanced_Js_Gravity extends Mage_CatalogSea
45
  return Mage::getSingleton('customer/session')->getCustomerId();
46
  }
47
 
 
 
 
 
 
 
 
 
 
 
48
  /**
49
  * Get Gravity extension helper
50
  *
@@ -54,4 +98,45 @@ class Me_Gravity_Block_Catalogsearch_Advanced_Js_Gravity extends Mage_CatalogSea
54
  {
55
  return Mage::helper('me_gravity');
56
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  }
25
  return $this->getGravityHelper()->isFullyEnabled();
26
  }
27
 
28
+ /**
29
+ * Get modified search criterias
30
+ *
31
+ * @return array
32
+ */
33
+ public function getModifiedSearchCriterias()
34
+ {
35
+ $modifiedCriterias = array();
36
+
37
+ $searchCriterias = $this->getSearchCriterias();
38
+ $parameters = $this->_cleanSearchParams($this->getParameters());
39
+ if (!empty($searchCriterias) && !empty($parameters)) {
40
+
41
+ $i = 0;
42
+ foreach ($parameters as $key => $parameter) {
43
+ $modifiedCriterias[$key] = $searchCriterias[$i];
44
+ $i++;
45
+ }
46
+ }
47
+
48
+ return $modifiedCriterias;
49
+ }
50
+
51
+ /**
52
+ * Get parameters
53
+ *
54
+ * @return array
55
+ * @throws Exception
56
+ */
57
+ public function getParameters()
58
+ {
59
+ return $this->getRequest()->getParams();
60
+ }
61
+
62
  /**
63
  * Get search criterias
64
  *
79
  return Mage::getSingleton('customer/session')->getCustomerId();
80
  }
81
 
82
+ /**
83
+ * Get current store id
84
+ *
85
+ * @return int
86
+ */
87
+ public function getStoreId()
88
+ {
89
+ return Mage::app()->getStore()->getId();
90
+ }
91
+
92
  /**
93
  * Get Gravity extension helper
94
  *
98
  {
99
  return Mage::helper('me_gravity');
100
  }
101
+
102
+ /**
103
+ * Clean parameters form unnecessary values
104
+ *
105
+ * @param array $parameters parameters
106
+ * @return array
107
+ */
108
+ protected function _cleanSearchParams($parameters = array())
109
+ {
110
+ if ($parameters) {
111
+ if (isset($parameters['___store'])) {
112
+ unset($parameters['___store']);
113
+ }
114
+ if (isset($parameters['___from_store'])) {
115
+ unset($parameters['___from_store']);
116
+ }
117
+
118
+ $removeKeys = array();
119
+ foreach ($parameters as $key => $value) {
120
+ if (is_array($value)) {
121
+ if (isset($value['from']) && isset($value['to'])) {
122
+ if (empty($value['from']) && empty($value['to'])) {
123
+ $removeKeys[] = $key;
124
+ }
125
+ }
126
+ } else {
127
+ if (empty($value)) {
128
+ $removeKeys[] = $key;
129
+ }
130
+ }
131
+ }
132
+
133
+ if ($removeKeys) {
134
+ foreach ($removeKeys as $key) {
135
+ unset($parameters[$key]);
136
+ }
137
+ }
138
+ }
139
+
140
+ return $parameters;
141
+ }
142
  }
app/code/community/Me/Gravity/Block/Catalogsearch/Js/Gravity.php CHANGED
@@ -45,6 +45,16 @@ class Me_Gravity_Block_Catalogsearch_Js_Gravity extends Mage_CatalogSearch_Block
45
  return Mage::getSingleton('customer/session')->getCustomerId();
46
  }
47
 
 
 
 
 
 
 
 
 
 
 
48
  /**
49
  * Get Gravity extension helper
50
  *
45
  return Mage::getSingleton('customer/session')->getCustomerId();
46
  }
47
 
48
+ /**
49
+ * Get current store id
50
+ *
51
+ * @return int
52
+ */
53
+ public function getStoreId()
54
+ {
55
+ return Mage::app()->getStore()->getId();
56
+ }
57
+
58
  /**
59
  * Get Gravity extension helper
60
  *
app/code/community/Me/Gravity/Block/Recommendation.php CHANGED
@@ -228,6 +228,16 @@ class Me_Gravity_Block_Recommendation extends Mage_Catalog_Block_Product_Abstrac
228
  return $this->_boxClass;
229
  }
230
 
 
 
 
 
 
 
 
 
 
 
231
  /**
232
  * Get product ids in cart
233
  *
228
  return $this->_boxClass;
229
  }
230
 
231
+ /**
232
+ * Get current store id
233
+ *
234
+ * @return int
235
+ */
236
+ public function getStoreId()
237
+ {
238
+ return Mage::app()->getStore()->getId();
239
+ }
240
+
241
  /**
242
  * Get product ids in cart
243
  *
app/code/community/Me/Gravity/Model/Export/Abstract.php CHANGED
@@ -127,19 +127,20 @@ abstract class Me_Gravity_Model_Export_Abstract
127
 
128
  $index = in_array($attribute->getAttributeCode(), $this->_indexValueAttributes) ? 'value' : 'label';
129
 
130
- // only default (admin) store values used
131
- $attribute->setStoreId(Mage_Catalog_Model_Abstract::DEFAULT_STORE_ID);
132
-
133
- try {
134
- foreach ($attribute->getSource()->getAllOptions(false) as $option) {
135
- foreach (is_array($option['value']) ? $option['value'] : array($option) as $innerOption) {
136
- if (strlen($innerOption['value'])) { // skip ' -- Please Select -- ' option
137
- $options[$innerOption['value']] = $innerOption[$index];
 
138
  }
139
  }
 
 
140
  }
141
- } catch (Exception $e) {
142
- // ignore exceptions connected with source models
143
  }
144
  }
145
 
127
 
128
  $index = in_array($attribute->getAttributeCode(), $this->_indexValueAttributes) ? 'value' : 'label';
129
 
130
+ foreach (Mage::app()->getStores() as $store) {
131
+ $attribute->setStoreId($store->getId());
132
+
133
+ try {
134
+ foreach ($attribute->getSource()->getAllOptions(false) as $option) {
135
+ foreach (is_array($option['value']) ? $option['value'] : array($option) as $innerOption) {
136
+ if (strlen($innerOption['value'])) { // skip ' -- Please Select -- ' option
137
+ $options[$store->getId()][$innerOption['value']] = $innerOption[$index];
138
+ }
139
  }
140
  }
141
+ } catch (Exception $e) {
142
+ // ignore exceptions connected with source models
143
  }
 
 
144
  }
145
  }
146
 
app/code/community/Me/Gravity/Model/Export/Catalog/Product.php CHANGED
@@ -119,32 +119,27 @@ class Me_Gravity_Model_Export_Catalog_Product extends Me_Gravity_Model_Export_Ab
119
  */
120
  public function getProductCollection($storeId = 0)
121
  {
122
- if (is_null($this->_productCollection)) {
 
 
 
123
 
124
- $this->_productCollection = $this->_addBaseAttributes($this->_getProductCollection())
125
- ->setStoreId($storeId)
126
- ->addWebsiteFilter(Mage::app()->getStore($storeId)->getWebsiteId())
127
- ->addCategoryIds();
128
-
129
- if ($this->_helper->getOnlySalable()) {
130
- $this->_productCollection->addFinalPrice();
131
- }
132
 
133
- if (!$this->_helper->getCatalogExportAll()) {
134
- if ($this->_helper->getCatalogMaxLimit()) {
135
- $this->_productCollection->setPageSize((int)$this->_helper->getCatalogMaxLimit());
136
- } else {
137
- $this->_productCollection->setPageSize(self::MAX_LIMIT);
138
- }
139
  }
140
-
141
- $this->_productCollection->addAttributeToFilter('status', Mage_Catalog_Model_Product_Status::STATUS_ENABLED);
142
-
143
- $this->_productCollection->load();
144
-
145
  }
146
 
147
- return $this->_productCollection;
 
 
 
148
  }
149
 
150
  /**
@@ -191,23 +186,30 @@ class Me_Gravity_Model_Export_Catalog_Product extends Me_Gravity_Model_Export_Ab
191
  */
192
  protected function _initCategories()
193
  {
194
- $collection = Mage::getResourceModel('catalog/category_collection')->addNameToResult();
195
-
196
- foreach ($collection as $category) {
197
- $structure = preg_split('#/+#', $category->getPath());
198
- $pathSize = count($structure);
199
- if ($pathSize > 1) {
200
- $path = array();
201
- for ($i = 1; $i < $pathSize; $i++) {
202
- $path[] = $collection->getItemById($structure[$i])->getName();
203
- }
204
- $this->_rootCategories[$category->getId()] = array_shift($path);
205
- if ($pathSize > 2) {
206
- $this->_categories[$category->getId()] = implode('/', $path);
 
 
 
 
 
 
207
  }
208
- }
209
 
 
210
  }
 
211
  return $this;
212
  }
213
 
119
  */
120
  public function getProductCollection($storeId = 0)
121
  {
122
+ $productCollection = $this->_addBaseAttributes($this->_getProductCollection())
123
+ ->setStoreId($storeId)
124
+ ->addWebsiteFilter(Mage::app()->getStore($storeId)->getWebsiteId())
125
+ ->addCategoryIds();
126
 
127
+ if ($this->_helper->getOnlySalable()) {
128
+ $productCollection->addFinalPrice();
129
+ }
 
 
 
 
 
130
 
131
+ if (!$this->_helper->getCatalogExportAll()) {
132
+ if ($this->_helper->getCatalogMaxLimit()) {
133
+ $productCollection->setPageSize((int)$this->_helper->getCatalogMaxLimit());
134
+ } else {
135
+ $productCollection->setPageSize(self::MAX_LIMIT);
 
136
  }
 
 
 
 
 
137
  }
138
 
139
+ $productCollection->addAttributeToFilter('status', Mage_Catalog_Model_Product_Status::STATUS_ENABLED);
140
+ $productCollection->load();
141
+
142
+ return $productCollection;
143
  }
144
 
145
  /**
186
  */
187
  protected function _initCategories()
188
  {
189
+ $stores = Mage::app()->getStores();
190
+
191
+ foreach ($stores as $store) {
192
+ $collection = Mage::getResourceModel('catalog/category_collection')
193
+ ->setStoreId($store->getId())
194
+ ->addNameToResult();
195
+
196
+ foreach ($collection as $category) {
197
+ $structure = preg_split('#/+#', $category->getPath());
198
+ $pathSize = count($structure);
199
+ if ($pathSize > 1) {
200
+ $path = array();
201
+ for ($i = 1; $i < $pathSize; $i++) {
202
+ $path[] = $collection->getItemById($structure[$i])->getName();
203
+ }
204
+ $this->_rootCategories[$store->getId()][$category->getId()] = array_shift($path);
205
+ if ($pathSize > 2) {
206
+ $this->_categories[$store->getId()][$category->getId()] = implode('/', $path);
207
+ }
208
  }
 
209
 
210
+ }
211
  }
212
+
213
  return $this;
214
  }
215
 
app/code/community/Me/Gravity/Model/Method/Request.php CHANGED
@@ -143,6 +143,13 @@ class Me_Gravity_Model_Method_Request extends Me_Gravity_Model_Method_Abstract
143
  */
144
  protected $_gravityCookie = '';
145
 
 
 
 
 
 
 
 
146
  /**
147
  * Constructor
148
  *
@@ -153,6 +160,7 @@ class Me_Gravity_Model_Method_Request extends Me_Gravity_Model_Method_Abstract
153
  parent::_construct();
154
 
155
  $this->_helper = $this->_getGravityHelper();
 
156
  if ($this->_helper->getDebugMode()) {
157
  $this->_canDebugLog = true;
158
  }
@@ -248,6 +256,8 @@ class Me_Gravity_Model_Method_Request extends Me_Gravity_Model_Method_Abstract
248
  $event->cookieId = $this->_getGravityCookie();
249
  $event->time = time();
250
 
 
 
251
  switch ($params['type']) {
252
  case self::EVENT_TYPE_ADD_TO_CART:
253
  if (isset($params['product'])
@@ -257,11 +267,13 @@ class Me_Gravity_Model_Method_Request extends Me_Gravity_Model_Method_Abstract
257
  ) {
258
  $event->itemId = $params['product'];
259
  $qty = new GravityNameValue('quantity', $params['qty']);
260
- $price = new GravityNameValue('price', $params['price']);
261
- $event->nameValues = array($qty, $price);
262
  if ($this->_canDebugLog) {
263
  $this->_helper->getLogger('Item id: ' . $event->itemId);
264
  $this->_helper->getLogger('Qty: ' . $params['qty']);
 
 
265
  }
266
  } else {
267
  Mage::throwException($this->_helper->__('Invalid ' . $params['type'] . ' parameters'));
@@ -271,10 +283,11 @@ class Me_Gravity_Model_Method_Request extends Me_Gravity_Model_Method_Abstract
271
  if (isset($params['product']) && isset($params['qty']) && $params['product'] && $params['qty']) {
272
  $event->itemId = $params['product'];
273
  $qty = new GravityNameValue('quantity', $params['qty']);
274
- $event->nameValues = array($qty);
275
  if ($this->_canDebugLog) {
276
  $this->_helper->getLogger('Item id: ' . $event->itemId);
277
  $this->_helper->getLogger('Qty: ' . $params['qty']);
 
278
  }
279
  } else {
280
  Mage::throwException($this->_helper->__('Invalid ' . $params['type'] . ' parameters'));
@@ -295,13 +308,14 @@ class Me_Gravity_Model_Method_Request extends Me_Gravity_Model_Method_Abstract
295
  $unitPrice = new GravityNameValue('unitPrice', $params['unitPrice']);
296
  $currency = new GravityNameValue('currency', $params['currency']);
297
  $orderId = new GravityNameValue('orderId', $params['orderId']);
298
- $event->nameValues = array($quantity, $unitPrice, $currency, $orderId);
299
  if ($this->_canDebugLog) {
300
  $this->_helper->getLogger('Item id: ' . $event->itemId);
301
  $this->_helper->getLogger('Qty: ' . $params['quantity']);
302
  $this->_helper->getLogger('UnitPrice: ' . $params['unitPrice']);
303
  $this->_helper->getLogger('Currency: ' . $params['currency']);
304
  $this->_helper->getLogger('OrderId: ' . $params['orderId']);
 
305
  }
306
  } else {
307
  Mage::throwException($this->_helper->__('Invalid ' . $params['type'] . ' parameters'));
@@ -354,32 +368,39 @@ class Me_Gravity_Model_Method_Request extends Me_Gravity_Model_Method_Abstract
354
  $recommendationContext->numberLimit = 5;
355
  }
356
 
 
 
 
357
  if (isset($params['itemId']) && $params['itemId']) {
358
  $pageItemId = new GravityNameValue('currentItemId', 'ItemID_' . $params['itemId']);
359
- $recommendationContext->nameValues = array($pageItemId);
360
  }
361
 
362
  if (isset($params['itemsInCart']) && is_array($params['itemsInCart']) && $params['itemsInCart']) {
363
  foreach ($params['itemsInCart'] as $itemId) {
364
  $itemId = new GravityNameValue('cartItemId', $itemId);
365
- $recommendationContext->nameValues = array($itemId);
366
  }
367
  }
368
 
369
  if (isset($params['filters']) && is_array($params['filters']) && $params['filters']) {
370
  foreach ($params['filters'] as $key => $filter) {
371
  $nameValue = new GravityNameValue($key, $filter);
372
- $recommendationContext->nameValues = array($nameValue);
373
  }
374
  }
375
 
376
  if (isset($params['keywords']) && is_array($params['keywords']) && $params['keywords']) {
377
  foreach ($params['keywords'] as $key => $filter) {
378
  $nameValue = new GravityNameValue($key, $filter);
379
- $recommendationContext->nameValues = array($nameValue);
380
  }
381
  }
382
 
 
 
 
 
383
  $recommendationContext->recommendationTime = time();
384
 
385
  $itemRecommendation = null;
143
  */
144
  protected $_gravityCookie = '';
145
 
146
+ /**
147
+ * Current store id
148
+ *
149
+ * @var int
150
+ */
151
+ protected $_storeId = 0;
152
+
153
  /**
154
  * Constructor
155
  *
160
  parent::_construct();
161
 
162
  $this->_helper = $this->_getGravityHelper();
163
+ $this->_storeId = Mage::app()->getStore()->getId();
164
  if ($this->_helper->getDebugMode()) {
165
  $this->_canDebugLog = true;
166
  }
256
  $event->cookieId = $this->_getGravityCookie();
257
  $event->time = time();
258
 
259
+ $storeId = new GravityNameValue('storeId', $this->_storeId);
260
+
261
  switch ($params['type']) {
262
  case self::EVENT_TYPE_ADD_TO_CART:
263
  if (isset($params['product'])
267
  ) {
268
  $event->itemId = $params['product'];
269
  $qty = new GravityNameValue('quantity', $params['qty']);
270
+ $price = new GravityNameValue('unitPrice', $params['unitPrice']);
271
+ $event->nameValues = array($qty, $price, $storeId);
272
  if ($this->_canDebugLog) {
273
  $this->_helper->getLogger('Item id: ' . $event->itemId);
274
  $this->_helper->getLogger('Qty: ' . $params['qty']);
275
+ $this->_helper->getLogger('unitPrice: ' . $params['unitPrice']);
276
+ $this->_helper->getLogger('StoreId: ' . $this->_storeId);
277
  }
278
  } else {
279
  Mage::throwException($this->_helper->__('Invalid ' . $params['type'] . ' parameters'));
283
  if (isset($params['product']) && isset($params['qty']) && $params['product'] && $params['qty']) {
284
  $event->itemId = $params['product'];
285
  $qty = new GravityNameValue('quantity', $params['qty']);
286
+ $event->nameValues = array($qty, $storeId);
287
  if ($this->_canDebugLog) {
288
  $this->_helper->getLogger('Item id: ' . $event->itemId);
289
  $this->_helper->getLogger('Qty: ' . $params['qty']);
290
+ $this->_helper->getLogger('StoreId: ' . $this->_storeId);
291
  }
292
  } else {
293
  Mage::throwException($this->_helper->__('Invalid ' . $params['type'] . ' parameters'));
308
  $unitPrice = new GravityNameValue('unitPrice', $params['unitPrice']);
309
  $currency = new GravityNameValue('currency', $params['currency']);
310
  $orderId = new GravityNameValue('orderId', $params['orderId']);
311
+ $event->nameValues = array($quantity, $unitPrice, $currency, $orderId, $storeId);
312
  if ($this->_canDebugLog) {
313
  $this->_helper->getLogger('Item id: ' . $event->itemId);
314
  $this->_helper->getLogger('Qty: ' . $params['quantity']);
315
  $this->_helper->getLogger('UnitPrice: ' . $params['unitPrice']);
316
  $this->_helper->getLogger('Currency: ' . $params['currency']);
317
  $this->_helper->getLogger('OrderId: ' . $params['orderId']);
318
+ $this->_helper->getLogger('StoreId: ' . $this->_storeId);
319
  }
320
  } else {
321
  Mage::throwException($this->_helper->__('Invalid ' . $params['type'] . ' parameters'));
368
  $recommendationContext->numberLimit = 5;
369
  }
370
 
371
+ $storeValue = new GravityNameValue('storeId', $this->_storeId);
372
+ $recommendationContext->nameValues = array($storeValue);
373
+
374
  if (isset($params['itemId']) && $params['itemId']) {
375
  $pageItemId = new GravityNameValue('currentItemId', 'ItemID_' . $params['itemId']);
376
+ $recommendationContext->nameValues = array_merge(array($pageItemId), $recommendationContext->nameValues);
377
  }
378
 
379
  if (isset($params['itemsInCart']) && is_array($params['itemsInCart']) && $params['itemsInCart']) {
380
  foreach ($params['itemsInCart'] as $itemId) {
381
  $itemId = new GravityNameValue('cartItemId', $itemId);
382
+ $recommendationContext->nameValues = array_merge(array($itemId), $recommendationContext->nameValues);
383
  }
384
  }
385
 
386
  if (isset($params['filters']) && is_array($params['filters']) && $params['filters']) {
387
  foreach ($params['filters'] as $key => $filter) {
388
  $nameValue = new GravityNameValue($key, $filter);
389
+ $recommendationContext->nameValues = array_merge(array($nameValue), $recommendationContext->nameValues);
390
  }
391
  }
392
 
393
  if (isset($params['keywords']) && is_array($params['keywords']) && $params['keywords']) {
394
  foreach ($params['keywords'] as $key => $filter) {
395
  $nameValue = new GravityNameValue($key, $filter);
396
+ $recommendationContext->nameValues = array_merge(array($nameValue), $recommendationContext->nameValues);
397
  }
398
  }
399
 
400
+ if ($this->_canDebugLog) {
401
+ $this->_helper->getLogger($recommendationContext->nameValues);
402
+ }
403
+
404
  $recommendationContext->recommendationTime = time();
405
 
406
  $itemRecommendation = null;
app/code/community/Me/Gravity/Model/Observer.php CHANGED
@@ -96,7 +96,7 @@ class Me_Gravity_Model_Observer
96
  'type' => Me_Gravity_Model_Method_Request::EVENT_TYPE_ADD_TO_CART,
97
  'product' => $requestParams['product'],
98
  'qty' => isset($requestParams['qty']) ? $requestParams['qty'] : 1,
99
- 'price' => $product->getFinalPrice()
100
  )
101
  );
102
 
@@ -142,7 +142,7 @@ class Me_Gravity_Model_Observer
142
  'type' => Me_Gravity_Model_Method_Request::EVENT_TYPE_ADD_TO_CART,
143
  'product' => $item->getProductId(),
144
  'qty' => $itemInfo['qty'],
145
- 'price' => $item->getPrice()
146
  )
147
  );
148
 
@@ -360,6 +360,10 @@ class Me_Gravity_Model_Observer
360
 
361
  try {
362
  $storeId = Mage::app()->getDefaultStoreView()->getId();
 
 
 
 
363
  $product = $observer->getProduct();
364
  if (!is_null($product) && $product->getId()) {
365
 
@@ -375,11 +379,12 @@ class Me_Gravity_Model_Observer
375
  'image_link' => htmlspecialchars($this->_getCatalogBaseMediaUrl() . $product->getImage()),
376
  'description' => htmlspecialchars($product->getDescription()),
377
  'price' => $product->getFinalPrice(),
378
- 'categoryPath' => $exportModel->getCategoryPath($product->getCategoryIds()),
379
- 'categoryId' => implode($product->getCategoryIds())
 
380
  );
381
 
382
- $additionalParameters = $exportModel->getAdditionalAttributesXml($product, false);
383
  if ($additionalParameters) {
384
  $parameters = array_merge($parameters, $additionalParameters);
385
  }
96
  'type' => Me_Gravity_Model_Method_Request::EVENT_TYPE_ADD_TO_CART,
97
  'product' => $requestParams['product'],
98
  'qty' => isset($requestParams['qty']) ? $requestParams['qty'] : 1,
99
+ 'unitPrice' => $product->getFinalPrice()
100
  )
101
  );
102
 
142
  'type' => Me_Gravity_Model_Method_Request::EVENT_TYPE_ADD_TO_CART,
143
  'product' => $item->getProductId(),
144
  'qty' => $itemInfo['qty'],
145
+ 'unitPrice' => $item->getPrice()
146
  )
147
  );
148
 
360
 
361
  try {
362
  $storeId = Mage::app()->getDefaultStoreView()->getId();
363
+ $param = Mage::app()->getRequest()->getParam('store');
364
+ if (isset($param) && $param) {
365
+ $storeId = $param;
366
+ }
367
  $product = $observer->getProduct();
368
  if (!is_null($product) && $product->getId()) {
369
 
379
  'image_link' => htmlspecialchars($this->_getCatalogBaseMediaUrl() . $product->getImage()),
380
  'description' => htmlspecialchars($product->getDescription()),
381
  'price' => $product->getFinalPrice(),
382
+ 'categoryPath' => implode(',', $exportModel->getCategoryPath($product->getCategoryIds(), $storeId)),
383
+ 'categoryId' => implode(',', $product->getCategoryIds()),
384
+ 'storeId' => $storeId
385
  );
386
 
387
+ $additionalParameters = $exportModel->getAdditionalAttributesXml($product, false, $storeId);
388
  if ($additionalParameters) {
389
  $parameters = array_merge($parameters, $additionalParameters);
390
  }
app/code/community/Me/Gravity/Model/Products.php CHANGED
@@ -29,61 +29,93 @@ class Me_Gravity_Model_Products extends Me_Gravity_Model_Export_Catalog_Product
29
  */
30
  protected $_filePath;
31
 
 
 
 
 
 
 
 
32
  /**
33
  * Generate product catalog xml
34
  *
35
- * @param int $storeId store id
36
  * @throws Mage_Core_Exception
37
  * @return string
38
  */
39
- public function generateCatalogXml($storeId = 0)
40
  {
41
- $this->_validatePath($storeId);
42
-
43
- $baseUrl = Mage::app()->getStore($storeId)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
44
 
45
  $io = new Varien_Io_File();
46
  $io->setAllowCreateFolders(true);
47
  $io->open(array('path' => $this->_getCatalogExportPath()));
48
 
49
- if ($io->fileExists($this->_getGravityCatalogFilename($storeId)) && !$io->isWriteable($this->_getGravityCatalogFilename($storeId))) {
50
  Mage::throwException(
51
  Mage::helper('me_gravity')->__(
52
  'File "%s" cannot be saved. Please, make sure the directory "%s" is writeable by web server.',
53
- $this->_getGravityCatalogFilename($storeId),
54
  $this->_getCatalogExportPath()
55
  )
56
  );
57
  }
58
 
59
- $io->streamOpen($this->_getGravityCatalogFilename($storeId));
60
 
61
  $io->streamWrite('<?xml version="1.0"?>' . "\n");
62
  $io->streamWrite('<rss version="2.0" xmlns:g="http://base.google.com/ns/1.0" xmlns:c="http://base.google.com/cns/1.0">');
63
  $io->streamWrite('<channel>');
64
- $io->streamWrite('<title>' . Mage::app()->getStore($storeId)->getFrontendName() . ' Gravity Reco item catalog</title>');
65
  $io->streamWrite('<link>' . $baseUrl . '</link>');
66
- $io->streamWrite('<description>' . Mage::app()->getStore($storeId)->getFrontendName() . ' item catalog description</description>');
67
 
68
- $productCollection = $this->getProductCollection($storeId);
 
69
 
70
- if ($productCollection->count()) {
 
 
71
 
72
- foreach ($productCollection as $product) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
 
74
- $xml = sprintf(
75
- '<item><g:id>%s</g:id><title>%s</title><c:hidden>%s</c:hidden><link>%s</link><g:image_link>%s</g:image_link><c:description>%s</c:description><g:price>%.4f</g:price>%s%s</item>',
76
- $product->getId(),
77
- htmlspecialchars($product->getName()),
78
- ($product->getVisibility() == Mage_Catalog_Model_Product_Visibility::VISIBILITY_NOT_VISIBLE) ? 'true' : 'false',
79
- htmlspecialchars($baseUrl . $product->getUrlPath()),
80
- htmlspecialchars($this->_getCatalogBaseMediaUrl() . $product->getImage()),
81
- htmlspecialchars($product->getDescription()),
82
- $product->getFinalPrice(),
83
- $this->_getCategoryXml($product),
84
- $this->getAdditionalAttributesXml($product)
85
- );
86
- $io->streamWrite($xml);
87
  }
88
 
89
  }
@@ -92,52 +124,166 @@ class Me_Gravity_Model_Products extends Me_Gravity_Model_Export_Catalog_Product
92
  $io->streamWrite('</rss>');
93
  $io->streamClose();
94
 
95
- return $this->_getGravityCatalogFilename($storeId);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
  }
97
 
98
  /**
99
  * Get category information XML part
100
  *
101
- * @param Mage_Catalog_Model_Product $product object
 
102
  * @return string
103
  */
104
- protected function _getCategoryXml(Mage_Catalog_Model_Product $product)
105
  {
106
  $categoryXml = '';
107
- $categoryPath = $this->getCategoryPath($product->getCategoryIds());
108
 
109
- if ($categoryPath) {
110
- $categoryXml = sprintf(
111
- '<c:categoryPath>%s</c:categoryPath><c:categoryId>%s</c:categoryId>',
112
- htmlspecialchars($categoryPath),
113
- implode($product->getCategoryIds())
114
- );
115
  }
116
 
117
  return $categoryXml;
118
  }
119
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
120
  /**
121
  * Get category path by category ids
122
  *
123
  * @param array $categoryIds category ids
 
124
  * @return string
125
  */
126
- public function getCategoryPath($categoryIds)
127
  {
128
  $categoryPath = array();
129
 
130
  if ($categoryIds) {
131
 
132
  foreach ($categoryIds as $categoryId) {
133
- if (array_key_exists($categoryId, $this->_categories)) {
134
- $categoryPath[] = $this->_categories[$categoryId];
135
  }
136
  }
137
 
138
  }
139
 
140
- return implode(',', $categoryPath);
141
  }
142
 
143
  /**
@@ -145,9 +291,10 @@ class Me_Gravity_Model_Products extends Me_Gravity_Model_Export_Catalog_Product
145
  *
146
  * @param Mage_Catalog_Model_Product $product product
147
  * @param boolean $asXml as xml
 
148
  * @return string|array
149
  */
150
- public function getAdditionalAttributesXml(Mage_Catalog_Model_Product $product, $asXml = true)
151
  {
152
  $additionalXml = '';
153
 
@@ -161,13 +308,13 @@ class Me_Gravity_Model_Products extends Me_Gravity_Model_Export_Catalog_Product
161
 
162
  if (is_array($productValue)) {
163
  foreach ($productValue as $optionId) {
164
- if (array_key_exists($optionId, $this->_attributeValues[$attributeCode])) {
165
- $additionalValues[] = $this->_attributeValues[$attributeCode][$optionId];
166
  }
167
  }
168
  } else {
169
- if (array_key_exists($productValue, $this->_attributeValues[$attributeCode])) {
170
- $additionalValues[] = $this->_attributeValues[$attributeCode][$productValue];
171
  } else {
172
 
173
  $additionalValues[] = $productValue;
@@ -179,11 +326,11 @@ class Me_Gravity_Model_Products extends Me_Gravity_Model_Export_Catalog_Product
179
 
180
  if ($asXml) {
181
  $additionalXml .= sprintf(
182
- '<' . $attributeCode . '>%s</' . $attributeCode . '>',
183
  htmlspecialchars(implode(',', $additionalValues))
184
  );
185
  } else {
186
- $additionalXml[$attributeCode] = htmlspecialchars(implode(',', $additionalValues));
187
  }
188
 
189
  }
@@ -213,11 +360,10 @@ class Me_Gravity_Model_Products extends Me_Gravity_Model_Export_Catalog_Product
213
  /**
214
  * Validate catalog export file save path
215
  *
216
- * @param int $storeId store id
217
  * @throws Mage_Core_Exception
218
  * @return void
219
  */
220
- protected function _validatePath($storeId)
221
  {
222
  $io = new Varien_Io_File();
223
  $realPath = $io->getCleanPath(Mage::getBaseDir() . '/' . $this->_getCatalogFilePath());
@@ -246,7 +392,7 @@ class Me_Gravity_Model_Products extends Me_Gravity_Model_Export_Catalog_Product
246
  /**
247
  * Check allow filename
248
  */
249
- if (!preg_match('#^[a-zA-Z0-9_\.]+$#', $this->_getGravityCatalogFilename($storeId))) {
250
  Mage::throwException(
251
  $this->_helper->__(
252
  'Please use only letters (a-z or A-Z), numbers (0-9) or underscore (_) in the filename. No spaces or other characters are allowed.'
@@ -258,12 +404,11 @@ class Me_Gravity_Model_Products extends Me_Gravity_Model_Export_Catalog_Product
258
  /**
259
  * Get catalog export filename
260
  *
261
- * @param int $storeId store id
262
  * @return string
263
  */
264
- protected function _getGravityCatalogFilename($storeId)
265
  {
266
- return 'gravity_' . $storeId . '.xml';
267
  }
268
 
269
  /**
29
  */
30
  protected $_filePath;
31
 
32
+ /**
33
+ * Items array
34
+ *
35
+ * @var array
36
+ */
37
+ protected $_items = array();
38
+
39
  /**
40
  * Generate product catalog xml
41
  *
 
42
  * @throws Mage_Core_Exception
43
  * @return string
44
  */
45
+ public function generateCatalogXml()
46
  {
47
+ $this->_validatePath();
48
+ $baseUrl = Mage::app()->getStore()->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
 
49
 
50
  $io = new Varien_Io_File();
51
  $io->setAllowCreateFolders(true);
52
  $io->open(array('path' => $this->_getCatalogExportPath()));
53
 
54
+ if ($io->fileExists($this->_getGravityCatalogFilename()) && !$io->isWriteable($this->_getGravityCatalogFilename())) {
55
  Mage::throwException(
56
  Mage::helper('me_gravity')->__(
57
  'File "%s" cannot be saved. Please, make sure the directory "%s" is writeable by web server.',
58
+ $this->_getGravityCatalogFilename(),
59
  $this->_getCatalogExportPath()
60
  )
61
  );
62
  }
63
 
64
+ $io->streamOpen($this->_getGravityCatalogFilename());
65
 
66
  $io->streamWrite('<?xml version="1.0"?>' . "\n");
67
  $io->streamWrite('<rss version="2.0" xmlns:g="http://base.google.com/ns/1.0" xmlns:c="http://base.google.com/cns/1.0">');
68
  $io->streamWrite('<channel>');
69
+ $io->streamWrite('<title>' . Mage::app()->getStore()->getFrontendName() . ' Gravity Reco item catalog</title>');
70
  $io->streamWrite('<link>' . $baseUrl . '</link>');
71
+ $io->streamWrite('<description>' . Mage::app()->getStore()->getFrontendName() . ' item catalog description</description>');
72
 
73
+ $stores = Mage::app()->getStores();
74
+ ksort($stores);
75
 
76
+ $defaultStoreId = Mage::app()->getDefaultStoreView()->getId();
77
+ $defaultCurrency = Mage::app()->getDefaultStoreView()->getBaseCurrencyCode();
78
+ $directoryHelper = Mage::helper('directory');
79
 
80
+ foreach ($stores as $store) {
81
+
82
+ $productCollection = $this->getProductCollection($store->getId());
83
+
84
+ if ($productCollection->count()) {
85
+
86
+ $currentCurrencyCode = $store->getCurrentCurrencyCode();
87
+ foreach ($productCollection as $product) {
88
+
89
+ if ($store->getId() == $defaultStoreId) {
90
+ $this->_items[$product->getId()]['default_title'] = htmlspecialchars($product->getName());
91
+ }
92
+
93
+ $this->_items[$product->getId()][$store->getId()]['title'] = htmlspecialchars($product->getName());
94
+ $this->_items[$product->getId()][$store->getId()]['hidden'] = ($product->getVisibility() == Mage_Catalog_Model_Product_Visibility::VISIBILITY_NOT_VISIBLE) ? 'true' : 'false';
95
+ $this->_items[$product->getId()][$store->getId()]['link'] = htmlspecialchars($baseUrl . $product->getUrlPath());
96
+ $this->_items[$product->getId()][$store->getId()]['image_link'] = htmlspecialchars($this->_getCatalogBaseMediaUrl() . $product->getImage());
97
+ $this->_items[$product->getId()][$store->getId()]['description'] = htmlspecialchars($product->getDescription(), ENT_COMPAT | ENT_DISALLOWED, 'UTF-8', false);
98
+ if ($store->getId() == $defaultStoreId) {
99
+ $this->_items[$product->getId()][$store->getId()]['price'] = $product->getFinalPrice();
100
+ } else {
101
+ $this->_items[$product->getId()][$store->getId()]['price'] = $directoryHelper->currencyConvert($product->getFinalPrice(), $defaultCurrency, $currentCurrencyCode);
102
+ }
103
+ $this->_items[$product->getId()][$store->getId()]['categoryPath'] = $this->getCategoryPath($product->getCategoryIds(), $store->getId());
104
+ $this->_items[$product->getId()][$store->getId()]['categoryId'] = $product->getCategoryIds();
105
+ $this->_items[$product->getId()][$store->getId()]['attributes'] = $this->getAdditionalAttributesXml($product, false, $store->getId());
106
+ $this->_items[$product->getId()][$store->getId()]['currency'] = $currentCurrencyCode;
107
+ }
108
+
109
+ }
110
+
111
+ }
112
+
113
+ if (!empty($this->_items)) {
114
+
115
+ foreach ($this->_items as $productId => $storeItem) {
116
+
117
+ $io->streamWrite($this->_createItemXml($storeItem, $productId));
118
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  }
120
 
121
  }
124
  $io->streamWrite('</rss>');
125
  $io->streamClose();
126
 
127
+ return $this->_getGravityCatalogFilename();
128
+ }
129
+
130
+ /**
131
+ * Get item xml
132
+ *
133
+ * @param array $storeItems items
134
+ * @param int $productId product Id
135
+ * @return string
136
+ */
137
+ protected function _createItemXml($storeItems = array(), $productId = 0)
138
+ {
139
+ $itemXml = '';
140
+ $defaultTitle = '';
141
+
142
+ if (isset($storeItems['default_title'])) {
143
+ $defaultTitle = $storeItems['default_title'];
144
+ unset($storeItems['default_title']);
145
+ } else {
146
+ Mage::throwException('Invalid default title in catalog export.');
147
+ }
148
+
149
+ // add fix elements
150
+ $itemXml = sprintf(
151
+ '<item>%s',
152
+ $this->_getFixElements($productId, $defaultTitle)
153
+ );
154
+
155
+ // add store elements
156
+ foreach ($storeItems as $storeId => $item) {
157
+
158
+ $itemXml .= sprintf(
159
+ '<title_' . $storeId . '>%s</title_' . $storeId . '><currency_' . $storeId . '>%s</currency_' . $storeId . '><c:hidden_' . $storeId . '>%s</c:hidden_' . $storeId . '><link_' . $storeId . '>%s</link_' . $storeId . '><g:image_link_' . $storeId . '>%s</g:image_link_' . $storeId . '><c:description_' . $storeId . '>%s</c:description_' . $storeId . '><g:price_' . $storeId . '>%.4f</g:price_' . $storeId . '>%s%s%s',
160
+ $item['title'],
161
+ $item['currency'],
162
+ $item['hidden'],
163
+ $item['link'],
164
+ $item['image_link'],
165
+ $item['description'],
166
+ $item['price'],
167
+ $this->_getCategoryXml($item, $storeId),
168
+ $this->_getCategoryIdsXml($item, $storeId),
169
+ $this->_getAttributesXml($item, $storeId)
170
+ );
171
+
172
+ }
173
+
174
+ $itemXml .= '</item>';
175
+
176
+ return $itemXml;
177
+ }
178
+
179
+ /**
180
+ * Get first two fix xml element
181
+ *
182
+ * @param int $productId product Id
183
+ * @param string $title title
184
+ * @return string
185
+ */
186
+ protected function _getFixElements($productId, $title)
187
+ {
188
+ $fixXml = '';
189
+
190
+ $fixXml .= sprintf(
191
+ '<g:id>%s</g:id><title>%s</title>',
192
+ $productId,
193
+ $title
194
+ );
195
+
196
+ return $fixXml;
197
  }
198
 
199
  /**
200
  * Get category information XML part
201
  *
202
+ * @param array $item item
203
+ * @param int $storeId store Id
204
  * @return string
205
  */
206
+ protected function _getCategoryXml($item = array(), $storeId = 0)
207
  {
208
  $categoryXml = '';
 
209
 
210
+ if (isset($item['categoryPath']) && is_array($item['categoryPath'])) {
211
+ foreach ($item['categoryPath'] as $categoryPath)
212
+ $categoryXml .= sprintf(
213
+ '<c:categoryPath_' . $storeId . '>%s</c:categoryPath_' . $storeId . '>',
214
+ $categoryPath
215
+ );
216
  }
217
 
218
  return $categoryXml;
219
  }
220
 
221
+ /**
222
+ * Get category isd information XML part
223
+ *
224
+ * @param array $item item
225
+ * @param int $storeId store Id
226
+ * @return string
227
+ */
228
+ protected function _getCategoryIdsXml($item = array(), $storeId = 0)
229
+ {
230
+ $categoryIdsXml = '';
231
+
232
+ if (isset($item['categoryId']) && is_array($item['categoryId'])) {
233
+ foreach ($item['categoryId'] as $categoryId)
234
+ $categoryIdsXml .= sprintf(
235
+ '<c:categoryId_' . $storeId . '>%s</c:categoryId_' . $storeId . '>',
236
+ $categoryId
237
+ );
238
+ }
239
+
240
+ return $categoryIdsXml;
241
+ }
242
+
243
+ /**
244
+ * Get attributes xml for each store
245
+ *
246
+ * @param array $item item
247
+ * @param int $storeId store Id
248
+ * @return string
249
+ */
250
+ protected function _getAttributesXml($item = array(), $storeId = 0)
251
+ {
252
+ $attributesXml = '';
253
+
254
+ if (isset($item['attributes']) && is_array($item['attributes'])) {
255
+ foreach ($item['attributes'] as $attributeCode => $attribute)
256
+ $attributesXml .= sprintf(
257
+ '<' . $attributeCode . '>%s</' . $attributeCode . '>',
258
+ $attribute
259
+ );
260
+ }
261
+
262
+ return $attributesXml;
263
+ }
264
+
265
  /**
266
  * Get category path by category ids
267
  *
268
  * @param array $categoryIds category ids
269
+ * @param int $storeId store id
270
  * @return string
271
  */
272
+ public function getCategoryPath($categoryIds, $storeId = 0)
273
  {
274
  $categoryPath = array();
275
 
276
  if ($categoryIds) {
277
 
278
  foreach ($categoryIds as $categoryId) {
279
+ if (array_key_exists($categoryId, $this->_categories[$storeId])) {
280
+ $categoryPath[] = htmlspecialchars($this->_categories[$storeId][$categoryId]);
281
  }
282
  }
283
 
284
  }
285
 
286
+ return $categoryPath;
287
  }
288
 
289
  /**
291
  *
292
  * @param Mage_Catalog_Model_Product $product product
293
  * @param boolean $asXml as xml
294
+ * @param int $storeId store id
295
  * @return string|array
296
  */
297
+ public function getAdditionalAttributesXml(Mage_Catalog_Model_Product $product, $asXml = true, $storeId = 0)
298
  {
299
  $additionalXml = '';
300
 
308
 
309
  if (is_array($productValue)) {
310
  foreach ($productValue as $optionId) {
311
+ if (array_key_exists($optionId, $this->_attributeValues[$attributeCode][$storeId])) {
312
+ $additionalValues[] = $this->_attributeValues[$attributeCode][$storeId][$optionId];
313
  }
314
  }
315
  } else {
316
+ if (!empty($this->_attributeValues[$attributeCode]) && array_key_exists($productValue, $this->_attributeValues[$attributeCode][$storeId])) {
317
+ $additionalValues[] = $this->_attributeValues[$attributeCode][$storeId][$productValue];
318
  } else {
319
 
320
  $additionalValues[] = $productValue;
326
 
327
  if ($asXml) {
328
  $additionalXml .= sprintf(
329
+ '<' . $attributeCode . '_' . $storeId . '>%s</' . $attributeCode . '>',
330
  htmlspecialchars(implode(',', $additionalValues))
331
  );
332
  } else {
333
+ $additionalXml[$attributeCode . '_' . $storeId] = htmlspecialchars(implode(',', $additionalValues));
334
  }
335
 
336
  }
360
  /**
361
  * Validate catalog export file save path
362
  *
 
363
  * @throws Mage_Core_Exception
364
  * @return void
365
  */
366
+ protected function _validatePath()
367
  {
368
  $io = new Varien_Io_File();
369
  $realPath = $io->getCleanPath(Mage::getBaseDir() . '/' . $this->_getCatalogFilePath());
392
  /**
393
  * Check allow filename
394
  */
395
+ if (!preg_match('#^[a-zA-Z0-9_\.]+$#', $this->_getGravityCatalogFilename())) {
396
  Mage::throwException(
397
  $this->_helper->__(
398
  'Please use only letters (a-z or A-Z), numbers (0-9) or underscore (_) in the filename. No spaces or other characters are allowed.'
404
  /**
405
  * Get catalog export filename
406
  *
 
407
  * @return string
408
  */
409
+ protected function _getGravityCatalogFilename()
410
  {
411
+ return 'gravity.xml';
412
  }
413
 
414
  /**
app/code/community/Me/Gravity/controllers/Adminhtml/GravityController.php CHANGED
@@ -32,26 +32,19 @@ class Me_Gravity_Adminhtml_GravityController extends Mage_Adminhtml_Controller_A
32
  */
33
  public function exportcatalogAction()
34
  {
35
- $store = $this->getRequest()->getParam('store');
36
-
37
  try {
38
- $storeId = Mage::app()->getStore($store)->getId();
39
  $gravityHelper = $this->_getGravityHelper();
40
 
41
- if (!$storeId) {
42
- $storeId = Mage::app()->getDefaultStoreView()->getId();
43
- }
44
-
45
  $timeStart = microtime(true);
46
- $resultFileName = Mage::getModel('me_gravity/products')->generateCatalogXml($storeId);
47
  $timeEnd = microtime(true);
48
 
49
  if ($gravityHelper->getDebugMode()) {
50
  $gravityHelper->getLogger($this->_getGravityHelper()->__('Catalog export finished in %s seconds', $timeEnd - $timeStart));
51
  }
52
 
53
- $path = Mage::app()->getStore($storeId)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK)
54
- . $this->_getGravityHelper()->getExportFilePath() . $resultFileName;
55
  $this->_getSession()->addSuccess(Mage::helper('me_gravity')->__('Catalog was successfully exported to %s.', $path));
56
 
57
  } catch (Mage_Core_Exception $e) {
32
  */
33
  public function exportcatalogAction()
34
  {
 
 
35
  try {
 
36
  $gravityHelper = $this->_getGravityHelper();
37
 
 
 
 
 
38
  $timeStart = microtime(true);
39
+ $resultFileName = Mage::getModel('me_gravity/products')->generateCatalogXml();
40
  $timeEnd = microtime(true);
41
 
42
  if ($gravityHelper->getDebugMode()) {
43
  $gravityHelper->getLogger($this->_getGravityHelper()->__('Catalog export finished in %s seconds', $timeEnd - $timeStart));
44
  }
45
 
46
+ $path = Mage::app()->getStore()->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB)
47
+ . $gravityHelper->getExportFilePath() . $resultFileName;
48
  $this->_getSession()->addSuccess(Mage::helper('me_gravity')->__('Catalog was successfully exported to %s.', $path));
49
 
50
  } catch (Mage_Core_Exception $e) {
app/code/community/Me/Gravity/etc/config.xml CHANGED
@@ -12,7 +12,7 @@
12
  <config>
13
  <modules>
14
  <Me_Gravity>
15
- <version>1.0.0.0</version>
16
  </Me_Gravity>
17
  </modules>
18
  <global>
12
  <config>
13
  <modules>
14
  <Me_Gravity>
15
+ <version>1.0.0.7</version>
16
  </Me_Gravity>
17
  </modules>
18
  <global>
app/design/frontend/base/default/template/me/gravity/catalog/category/boxes/default.phtml CHANGED
@@ -17,6 +17,7 @@
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
 
20
  <div class="block block-<?php echo $this->getBoxClass() ?>">
21
  <div class="block-title">
22
  <?php if($title = $this->getRecommendationTitle()) : ?>
@@ -30,11 +31,11 @@
30
  <ul class="recItems products-grid gravity-<?php echo $this->getBoxClass() ?>-grid" class="block-content" style="background: none;">
31
  {for p in products}
32
  <li class="item" style="min-height: 200px;">
33
- <a class="product-image" href="${p.Url}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">
34
- <img width="90" src='${p.ImageUrl}' />
35
  </a>
36
  <div class="recItemTitle product-name">
37
- <a class="recItemTitle product-name" href="${p.Url}" onmousedown="_gravity.push({type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title}</a>
38
  </div>
39
  <div class="clearer"></div>
40
  </li>
@@ -49,12 +50,13 @@
49
  type: "recommendation",
50
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
51
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
 
52
  <?php if($filters = $this->getFilters()) : ?>
53
  <?php foreach($filters as $attributeCode => $value) : ?>
54
  <?php echo $attributeCode ?>: "<?php echo $value ?>",
55
  <?php endforeach; ?>
56
  <?php endif; ?>
57
- resultNames: ["itemId", "title", "Url", "ImageUrl"],
58
  templating: {
59
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
60
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
20
+ <?php $storeId = $this->getStoreId(); ?>
21
  <div class="block block-<?php echo $this->getBoxClass() ?>">
22
  <div class="block-title">
23
  <?php if($title = $this->getRecommendationTitle()) : ?>
31
  <ul class="recItems products-grid gravity-<?php echo $this->getBoxClass() ?>-grid" class="block-content" style="background: none;">
32
  {for p in products}
33
  <li class="item" style="min-height: 200px;">
34
+ <a class="product-image" href="${p.link_<?php echo $storeId ?>}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">
35
+ <img width="90" src='${p.image_link_<?php echo $storeId ?>}' />
36
  </a>
37
  <div class="recItemTitle product-name">
38
+ <a class="recItemTitle product-name" href="${p.link_<?php echo $storeId ?>}" onmousedown="_gravity.push({type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title_<?php echo $storeId ?>}</a>
39
  </div>
40
  <div class="clearer"></div>
41
  </li>
50
  type: "recommendation",
51
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
52
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
53
+ storeId: <?php echo $storeId ?>,
54
  <?php if($filters = $this->getFilters()) : ?>
55
  <?php foreach($filters as $attributeCode => $value) : ?>
56
  <?php echo $attributeCode ?>: "<?php echo $value ?>",
57
  <?php endforeach; ?>
58
  <?php endif; ?>
59
+ resultNames: ["itemId", "title_<?php echo $storeId ?>", "link_<?php echo $storeId ?>", "image_link_<?php echo $storeId ?>"],
60
  templating: {
61
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
62
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
app/design/frontend/base/default/template/me/gravity/catalog/category/boxes/sidebar.phtml CHANGED
@@ -17,6 +17,7 @@
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
 
20
  <div class="block block-<?php echo $this->getBoxClass() ?>">
21
  <div class="block-title">
22
  <?php if($title = $this->getRecommendationTitle()) : ?>
@@ -31,9 +32,9 @@
31
  {for p in products}
32
  <li class="item">
33
  <div class="product">
34
- <a href="${p.Url}" title="${p.title}" class="product-image" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});"><img src="${p.ImageUrl}" width="50" alt=">${p.title}" /></a>
35
  <div class="product-details">
36
- <p class="recItemTitle product-name"><a href="${p.Url}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title}</a></p>
37
  </div>
38
  </div>
39
  <div class="clearer"></div>
@@ -49,12 +50,13 @@
49
  type: "recommendation",
50
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
51
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
 
52
  <?php if($filters = $this->getFilters()) : ?>
53
  <?php foreach($filters as $attributeCode => $value) : ?>
54
  <?php echo $attributeCode ?>: "<?php echo $value ?>",
55
  <?php endforeach; ?>
56
  <?php endif; ?>
57
- resultNames: ["itemId", "title", "Url", "ImageUrl"],
58
  templating: {
59
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
60
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
20
+ <?php $storeId = $this->getStoreId(); ?>
21
  <div class="block block-<?php echo $this->getBoxClass() ?>">
22
  <div class="block-title">
23
  <?php if($title = $this->getRecommendationTitle()) : ?>
32
  {for p in products}
33
  <li class="item">
34
  <div class="product">
35
+ <a href="${p.link_<?php echo $storeId ?>}" title="${p.title_<?php echo $storeId ?>}" class="product-image" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});"><img src="${p.image_link_<?php echo $storeId ?>}" width="50" alt=">${p.title_<?php echo $storeId ?>}" /></a>
36
  <div class="product-details">
37
+ <p class="recItemTitle product-name"><a href="${p.link_<?php echo $storeId ?>}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title_<?php echo $storeId ?>}</a></p>
38
  </div>
39
  </div>
40
  <div class="clearer"></div>
50
  type: "recommendation",
51
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
52
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
53
+ storeId: <?php echo $storeId ?>,
54
  <?php if($filters = $this->getFilters()) : ?>
55
  <?php foreach($filters as $attributeCode => $value) : ?>
56
  <?php echo $attributeCode ?>: "<?php echo $value ?>",
57
  <?php endforeach; ?>
58
  <?php endif; ?>
59
+ resultNames: ["itemId", "title_<?php echo $storeId ?>", "link_<?php echo $storeId ?>", "image_link_<?php echo $storeId ?>"],
60
  templating: {
61
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
62
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
app/design/frontend/base/default/template/me/gravity/catalog/product/view/boxes/default.phtml CHANGED
@@ -17,6 +17,7 @@
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
 
20
  <div class="block block-<?php echo $this->getBoxClass() ?>">
21
  <div class="block-title">
22
  <?php if($title = $this->getRecommendationTitle()) : ?>
@@ -30,11 +31,11 @@
30
  <ul class="recItems products-grid gravity-<?php echo $this->getBoxClass() ?>-grid" class="block-content" style="background: none;">
31
  {for p in products}
32
  <li class="item" style="min-height: 200px;">
33
- <a class="product-image" href="${p.Url}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">
34
- <img width="90" src='${p.ImageUrl}' />
35
  </a>
36
  <div class="recItemTitle product-name">
37
- <a class="recItemTitle product-name" href="${p.Url}" onmousedown="_gravity.push({type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title}</a>
38
  </div>
39
  <div class="clearer"></div>
40
  </li>
@@ -49,10 +50,11 @@
49
  type: "recommendation",
50
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
51
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
 
52
  <?php if($productId = $this->getProduct()->getId()) : ?>
53
  currentItemId: "ItemID_<?php echo $productId ?>",
54
  <?php endif; ?>
55
- resultNames: ["itemId", "title", "Url", "ImageUrl"],
56
  templating: {
57
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
58
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
20
+ <?php $storeId = $this->getStoreId(); ?>
21
  <div class="block block-<?php echo $this->getBoxClass() ?>">
22
  <div class="block-title">
23
  <?php if($title = $this->getRecommendationTitle()) : ?>
31
  <ul class="recItems products-grid gravity-<?php echo $this->getBoxClass() ?>-grid" class="block-content" style="background: none;">
32
  {for p in products}
33
  <li class="item" style="min-height: 200px;">
34
+ <a class="product-image" href="${p.link_<?php echo $storeId ?>}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">
35
+ <img width="90" src='${p.image_link_<?php echo $storeId ?>}' />
36
  </a>
37
  <div class="recItemTitle product-name">
38
+ <a class="recItemTitle product-name" href="${p.link_<?php echo $storeId ?>}" onmousedown="_gravity.push({type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title_<?php echo $storeId ?>}</a>
39
  </div>
40
  <div class="clearer"></div>
41
  </li>
50
  type: "recommendation",
51
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
52
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
53
+ storeId: <?php echo $storeId ?>,
54
  <?php if($productId = $this->getProduct()->getId()) : ?>
55
  currentItemId: "ItemID_<?php echo $productId ?>",
56
  <?php endif; ?>
57
+ resultNames: ["itemId", "title_<?php echo $storeId ?>", "link_<?php echo $storeId ?>", "image_link_<?php echo $storeId ?>"],
58
  templating: {
59
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
60
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
app/design/frontend/base/default/template/me/gravity/catalog/product/view/boxes/sidebar.phtml CHANGED
@@ -17,6 +17,7 @@
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
 
20
  <div class="block block-<?php echo $this->getBoxClass() ?>">
21
  <div class="block-title">
22
  <?php if($title = $this->getRecommendationTitle()) : ?>
@@ -31,9 +32,9 @@
31
  {for p in products}
32
  <li class="item">
33
  <div class="product">
34
- <a href="${p.Url}" title="${p.title}" class="product-image" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});"><img src="${p.ImageUrl}" width="50" alt=">${p.title}" /></a>
35
  <div class="product-details">
36
- <p class="recItemTitle product-name"><a href="${p.Url}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title}</a></p>
37
  </div>
38
  </div>
39
  <div class="clearer"></div>
@@ -49,10 +50,11 @@
49
  type: "recommendation",
50
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
51
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
 
52
  <?php if($productId = $this->getProduct()->getId()) : ?>
53
  currentItemId: "ItemID_<?php echo $productId ?>",
54
  <?php endif; ?>
55
- resultNames: ["itemId", "title", "Url", "ImageUrl"],
56
  templating: {
57
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
58
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
20
+ <?php $storeId = $this->getStoreId(); ?>
21
  <div class="block block-<?php echo $this->getBoxClass() ?>">
22
  <div class="block-title">
23
  <?php if($title = $this->getRecommendationTitle()) : ?>
32
  {for p in products}
33
  <li class="item">
34
  <div class="product">
35
+ <a href="${p.link_<?php echo $storeId ?>}" title="${p.title_<?php echo $storeId ?>}" class="product-image" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});"><img src="${p.image_link_<?php echo $storeId ?>}" width="50" alt=">${p.title_<?php echo $storeId ?>}" /></a>
36
  <div class="product-details">
37
+ <p class="recItemTitle product-name"><a href="${p.link_<?php echo $storeId ?>}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title_<?php echo $storeId ?>}</a></p>
38
  </div>
39
  </div>
40
  <div class="clearer"></div>
50
  type: "recommendation",
51
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
52
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
53
+ storeId: <?php echo $storeId ?>,
54
  <?php if($productId = $this->getProduct()->getId()) : ?>
55
  currentItemId: "ItemID_<?php echo $productId ?>",
56
  <?php endif; ?>
57
+ resultNames: ["itemId", "title_<?php echo $storeId ?>", "link_<?php echo $storeId ?>", "image_link_<?php echo $storeId ?>"],
58
  templating: {
59
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
60
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
app/design/frontend/base/default/template/me/gravity/catalog/product/view/js/gravity.phtml CHANGED
@@ -30,6 +30,7 @@
30
  _gravity.push({
31
  type: "event",
32
  eventType: "VIEW",
 
33
  itemId: "<?php echo $this->getProduct()->getId() ?>",
34
  <?php if($categoryId = $this->getGravityCategoryId()) : ?>
35
  categoryId: "<?php echo $categoryId ?>",
30
  _gravity.push({
31
  type: "event",
32
  eventType: "VIEW",
33
+ storeId: <?php echo $this->getStoreId() ?>,
34
  itemId: "<?php echo $this->getProduct()->getId() ?>",
35
  <?php if($categoryId = $this->getGravityCategoryId()) : ?>
36
  categoryId: "<?php echo $categoryId ?>",
app/design/frontend/base/default/template/me/gravity/catalogsearch/advanced/js/gravity.phtml CHANGED
@@ -18,7 +18,7 @@
18
  */
19
  ?>
20
  <?php if ($this->isEnabled()) : ?>
21
- <?php $searchCriterias = $this->getSearchCriterias(); ?>
22
  <?php if($searchCriterias) : ?>
23
  <script type="text/javascript">
24
  //<![CDATA[
@@ -31,8 +31,9 @@
31
  _gravity.push({
32
  type: "event",
33
  eventType: "SEARCH",
34
- <?php foreach ($searchCriterias as $criteria): ?>
35
- <?php if(strtolower($criteria['name']) == 'price') : ?>
 
36
  <?php $prices = explode(' - ', $criteria['value']); ?>
37
  <?php if(isset($prices[0])) : ?>
38
  minPrice: "<?php echo $prices[0] ?>",
@@ -41,7 +42,7 @@
41
  maxPrice: "<?php echo $prices[1] ?>",
42
  <?php endif; ?>
43
  <?php else : ?>
44
- <?php echo $this->escapeHtml(strtolower($criteria['name'])); ?>:"<?php echo $this->escapeHtml(strtolower($criteria['value'])); ?>",
45
  <?php endif; ?>
46
  <?php endforeach; ?>
47
  });
18
  */
19
  ?>
20
  <?php if ($this->isEnabled()) : ?>
21
+ <?php $searchCriterias = $this->getModifiedSearchCriterias(); ?>
22
  <?php if($searchCriterias) : ?>
23
  <script type="text/javascript">
24
  //<![CDATA[
31
  _gravity.push({
32
  type: "event",
33
  eventType: "SEARCH",
34
+ storeId: <?php echo $this->getStoreId() ?>,
35
+ <?php foreach ($searchCriterias as $key => $criteria): ?>
36
+ <?php if(strtolower($key) == 'price') : ?>
37
  <?php $prices = explode(' - ', $criteria['value']); ?>
38
  <?php if(isset($prices[0])) : ?>
39
  minPrice: "<?php echo $prices[0] ?>",
42
  maxPrice: "<?php echo $prices[1] ?>",
43
  <?php endif; ?>
44
  <?php else : ?>
45
+ <?php echo $this->escapeHtml(strtolower($key)); ?>:"<?php echo $this->escapeHtml($criteria['value']); ?>",
46
  <?php endif; ?>
47
  <?php endforeach; ?>
48
  });
app/design/frontend/base/default/template/me/gravity/catalogsearch/boxes/default.phtml CHANGED
@@ -17,6 +17,7 @@
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
 
20
  <div class="block block-<?php echo $this->getBoxClass() ?>">
21
  <div class="block-title">
22
  <?php if($title = $this->getRecommendationTitle()) : ?>
@@ -30,11 +31,11 @@
30
  <ul class="recItems products-grid gravity-<?php echo $this->getBoxClass() ?>-grid" class="block-content" style="background: none;">
31
  {for p in products}
32
  <li class="item" style="min-height: 200px;">
33
- <a class="product-image" href="${p.Url}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">
34
- <img width="90" src='${p.ImageUrl}' />
35
  </a>
36
  <div class="recItemTitle product-name">
37
- <a class="recItemTitle product-name" href="${p.Url}" onmousedown="_gravity.push({type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title}</a>
38
  </div>
39
  <div class="clearer"></div>
40
  </li>
@@ -49,12 +50,13 @@
49
  type: "recommendation",
50
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
51
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
 
52
  <?php if($searchKeywords = $this->getSearchKeywords()) : ?>
53
  <?php foreach($searchKeywords as $attributeCode => $value) : ?>
54
  <?php echo $attributeCode ?>: "<?php echo $value ?>",
55
  <?php endforeach; ?>
56
  <?php endif; ?>
57
- resultNames: ["itemId", "title", "Url", "ImageUrl"],
58
  templating: {
59
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
60
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
20
+ <?php $storeId = $this->getStoreId(); ?>
21
  <div class="block block-<?php echo $this->getBoxClass() ?>">
22
  <div class="block-title">
23
  <?php if($title = $this->getRecommendationTitle()) : ?>
31
  <ul class="recItems products-grid gravity-<?php echo $this->getBoxClass() ?>-grid" class="block-content" style="background: none;">
32
  {for p in products}
33
  <li class="item" style="min-height: 200px;">
34
+ <a class="product-image" href="${p.link_<?php echo $storeId ?>}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">
35
+ <img width="90" src='${p.image_link_<?php echo $storeId ?>}' />
36
  </a>
37
  <div class="recItemTitle product-name">
38
+ <a class="recItemTitle product-name" href="${p.link_<?php echo $storeId ?>}" onmousedown="_gravity.push({type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title_<?php echo $storeId ?>}</a>
39
  </div>
40
  <div class="clearer"></div>
41
  </li>
50
  type: "recommendation",
51
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
52
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
53
+ storeId: <?php echo $storeId ?>,
54
  <?php if($searchKeywords = $this->getSearchKeywords()) : ?>
55
  <?php foreach($searchKeywords as $attributeCode => $value) : ?>
56
  <?php echo $attributeCode ?>: "<?php echo $value ?>",
57
  <?php endforeach; ?>
58
  <?php endif; ?>
59
+ resultNames: ["itemId", "title_<?php echo $storeId ?>", "link_<?php echo $storeId ?>", "image_link_<?php echo $storeId ?>"],
60
  templating: {
61
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
62
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
app/design/frontend/base/default/template/me/gravity/catalogsearch/boxes/sidebar.phtml CHANGED
@@ -17,6 +17,7 @@
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
 
20
  <div class="block block-<?php echo $this->getBoxClass() ?>">
21
  <div class="block-title">
22
  <?php if($title = $this->getRecommendationTitle()) : ?>
@@ -31,9 +32,9 @@
31
  {for p in products}
32
  <li class="item">
33
  <div class="product">
34
- <a href="${p.Url}" title="${p.title}" class="product-image" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});"><img src="${p.ImageUrl}" width="50" alt=">${p.title}" /></a>
35
  <div class="product-details">
36
- <p class="recItemTitle product-name"><a href="${p.Url}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title}</a></p>
37
  </div>
38
  </div>
39
  <div class="clearer"></div>
@@ -49,12 +50,13 @@
49
  type: "recommendation",
50
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
51
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
 
52
  <?php if($searchKeywords = $this->getSearchKeywords()) : ?>
53
  <?php foreach($searchKeywords as $attributeCode => $value) : ?>
54
  <?php echo $attributeCode ?>: "<?php echo $value ?>",
55
  <?php endforeach; ?>
56
  <?php endif; ?>
57
- resultNames: ["itemId", "title", "Url", "ImageUrl"],
58
  templating: {
59
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
60
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
20
+ <?php $storeId = $this->getStoreId(); ?>
21
  <div class="block block-<?php echo $this->getBoxClass() ?>">
22
  <div class="block-title">
23
  <?php if($title = $this->getRecommendationTitle()) : ?>
32
  {for p in products}
33
  <li class="item">
34
  <div class="product">
35
+ <a href="${p.link_<?php echo $storeId ?>}" title="${p.title_<?php echo $storeId ?>}" class="product-image" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});"><img src="${p.image_link_<?php echo $storeId ?>}" width="50" alt=">${p.title_<?php echo $storeId ?>}" /></a>
36
  <div class="product-details">
37
+ <p class="recItemTitle product-name"><a href="${p.link_<?php echo $storeId ?>}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title_<?php echo $storeId ?>}</a></p>
38
  </div>
39
  </div>
40
  <div class="clearer"></div>
50
  type: "recommendation",
51
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
52
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
53
+ storeId: <?php echo $storeId ?>,
54
  <?php if($searchKeywords = $this->getSearchKeywords()) : ?>
55
  <?php foreach($searchKeywords as $attributeCode => $value) : ?>
56
  <?php echo $attributeCode ?>: "<?php echo $value ?>",
57
  <?php endforeach; ?>
58
  <?php endif; ?>
59
+ resultNames: ["itemId", "title_<?php echo $storeId ?>", "link_<?php echo $storeId ?>", "image_link_<?php echo $storeId ?>"],
60
  templating: {
61
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
62
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
app/design/frontend/base/default/template/me/gravity/catalogsearch/js/gravity.phtml CHANGED
@@ -29,7 +29,8 @@
29
  _gravity.push({
30
  type: "event",
31
  eventType: "SEARCH",
32
- searchKeyword: "<?php echo $this->getSearchKeyword() ?>"
 
33
  });
34
  //]]>
35
  </script>
29
  _gravity.push({
30
  type: "event",
31
  eventType: "SEARCH",
32
+ storeId: <?php echo $this->getStoreId() ?>,
33
+ searchKeyword: "<?php echo $this->getSearchKeyword() ?>",
34
  });
35
  //]]>
36
  </script>
app/design/frontend/base/default/template/me/gravity/checkout/cart/boxes/default.phtml CHANGED
@@ -17,6 +17,7 @@
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
 
20
  <div class="block block-<?php echo $this->getBoxClass() ?>">
21
  <div class="block-title">
22
  <?php if($title = $this->getRecommendationTitle()) : ?>
@@ -30,11 +31,11 @@
30
  <ul class="recItems products-grid gravity-<?php echo $this->getBoxClass() ?>-grid" class="block-content" style="background: none;">
31
  {for p in products}
32
  <li class="item" style="min-height: 200px;">
33
- <a class="product-image" href="${p.Url}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">
34
- <img width="90" src='${p.ImageUrl}' />
35
  </a>
36
  <div class="recItemTitle product-name">
37
- <a class="recItemTitle product-name" href="${p.Url}" onmousedown="_gravity.push({type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title}</a>
38
  </div>
39
  <div class="clearer"></div>
40
  </li>
@@ -49,12 +50,13 @@
49
  type: "recommendation",
50
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
51
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
 
52
  <?php if($itemIds = $this->getCartItems()) : ?>
53
  <?php foreach($itemIds as $itemId) : ?>
54
  cartItemId: "<?php echo $itemId ?>",
55
  <?php endforeach; ?>
56
  <?php endif; ?>
57
- resultNames: ["itemId", "title", "Url", "ImageUrl"],
58
  templating: {
59
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
60
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
20
+ <?php $storeId = $this->getStoreId(); ?>
21
  <div class="block block-<?php echo $this->getBoxClass() ?>">
22
  <div class="block-title">
23
  <?php if($title = $this->getRecommendationTitle()) : ?>
31
  <ul class="recItems products-grid gravity-<?php echo $this->getBoxClass() ?>-grid" class="block-content" style="background: none;">
32
  {for p in products}
33
  <li class="item" style="min-height: 200px;">
34
+ <a class="product-image" href="${p.link_<?php echo $storeId ?>}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">
35
+ <img width="90" src='${p.image_link_<?php echo $storeId ?>}' />
36
  </a>
37
  <div class="recItemTitle product-name">
38
+ <a class="recItemTitle product-name" href="${p.link_<?php echo $storeId ?>}" onmousedown="_gravity.push({type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title_<?php echo $storeId ?>}</a>
39
  </div>
40
  <div class="clearer"></div>
41
  </li>
50
  type: "recommendation",
51
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
52
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
53
+ storeId: <?php echo $storeId ?>,
54
  <?php if($itemIds = $this->getCartItems()) : ?>
55
  <?php foreach($itemIds as $itemId) : ?>
56
  cartItemId: "<?php echo $itemId ?>",
57
  <?php endforeach; ?>
58
  <?php endif; ?>
59
+ resultNames: ["itemId", "title_<?php echo $storeId ?>", "link_<?php echo $storeId ?>", "image_link_<?php echo $storeId ?>"],
60
  templating: {
61
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
62
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
app/design/frontend/base/default/template/me/gravity/checkout/cart/boxes/sidebar.phtml CHANGED
@@ -17,6 +17,7 @@
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
 
20
  <div class="block block-<?php echo $this->getBoxClass() ?>">
21
  <div class="block-title">
22
  <?php if($title = $this->getRecommendationTitle()) : ?>
@@ -31,9 +32,9 @@
31
  {for p in products}
32
  <li class="item">
33
  <div class="product">
34
- <a href="${p.Url}" title="${p.title}" class="product-image" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});"><img src="${p.ImageUrl}" width="50" alt=">${p.title}" /></a>
35
  <div class="product-details">
36
- <p class="recItemTitle product-name"><a href="${p.Url}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title}</a></p>
37
  </div>
38
  </div>
39
  <div class="clearer"></div>
@@ -49,12 +50,13 @@
49
  type: "recommendation",
50
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
51
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
 
52
  <?php if($itemIds = $this->getCartItems()) : ?>
53
  <?php foreach($itemIds as $itemId) : ?>
54
  cartItemId: "<?php echo $itemId ?>",
55
  <?php endforeach; ?>
56
  <?php endif; ?>
57
- resultNames: ["itemId", "title", "Url", "ImageUrl"],
58
  templating: {
59
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
60
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
20
+ <?php $storeId = $this->getStoreId(); ?>
21
  <div class="block block-<?php echo $this->getBoxClass() ?>">
22
  <div class="block-title">
23
  <?php if($title = $this->getRecommendationTitle()) : ?>
32
  {for p in products}
33
  <li class="item">
34
  <div class="product">
35
+ <a href="${p.link_<?php echo $storeId ?>}" title="${p.title_<?php echo $storeId ?>}" class="product-image" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});"><img src="${p.image_link_<?php echo $storeId ?>}" width="50" alt=">${p.title_<?php echo $storeId ?>}" /></a>
36
  <div class="product-details">
37
+ <p class="recItemTitle product-name"><a href="${p.link_<?php echo $storeId ?>}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title_<?php echo $storeId ?>}</a></p>
38
  </div>
39
  </div>
40
  <div class="clearer"></div>
50
  type: "recommendation",
51
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
52
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
53
+ storeId: <?php echo $storeId ?>,
54
  <?php if($itemIds = $this->getCartItems()) : ?>
55
  <?php foreach($itemIds as $itemId) : ?>
56
  cartItemId: "<?php echo $itemId ?>",
57
  <?php endforeach; ?>
58
  <?php endif; ?>
59
+ resultNames: ["itemId", "title_<?php echo $storeId ?>", "link_<?php echo $storeId ?>", "image_link_<?php echo $storeId ?>"],
60
  templating: {
61
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
62
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
app/design/frontend/base/default/template/me/gravity/general/boxes/default.phtml CHANGED
@@ -17,6 +17,7 @@
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
 
20
  <div class="block block-<?php echo $this->getBoxClass() ?>">
21
  <div class="block-title">
22
  <?php if($title = $this->getRecommendationTitle()) : ?>
@@ -30,11 +31,11 @@
30
  <ul class="recItems products-grid gravity-<?php echo $this->getBoxClass() ?>-grid" style="background: none;">
31
  {for p in products}
32
  <li class="item" style="min-height: 200px;">
33
- <a class="product-image" href="${p.Url}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">
34
- <img width="90" src='${p.ImageUrl}' />
35
  </a>
36
  <div class="recItemTitle product-name">
37
- <a class="recItemTitle product-name" href="${p.Url}" onmousedown="_gravity.push({type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title}</a>
38
  </div>
39
  <div class="clearer"></div>
40
  </li>
@@ -49,7 +50,8 @@
49
  type: "recommendation",
50
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
51
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
52
- resultNames: ["itemId", "title", "Url", "ImageUrl"],
 
53
  templating: {
54
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
55
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
20
+ <?php $storeId = $this->getStoreId(); ?>
21
  <div class="block block-<?php echo $this->getBoxClass() ?>">
22
  <div class="block-title">
23
  <?php if($title = $this->getRecommendationTitle()) : ?>
31
  <ul class="recItems products-grid gravity-<?php echo $this->getBoxClass() ?>-grid" style="background: none;">
32
  {for p in products}
33
  <li class="item" style="min-height: 200px;">
34
+ <a class="product-image" href="${p.link_<?php echo $storeId ?>}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">
35
+ <img width="90" src='${p.image_link_<?php echo $storeId ?>}' />
36
  </a>
37
  <div class="recItemTitle product-name">
38
+ <a class="recItemTitle product-name" href="${p.link_<?php echo $storeId ?>}" onmousedown="_gravity.push({type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title_<?php echo $storeId ?>}</a>
39
  </div>
40
  <div class="clearer"></div>
41
  </li>
50
  type: "recommendation",
51
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
52
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
53
+ storeId: <?php echo $storeId ?>,
54
+ resultNames: ["itemId", "title_<?php echo $storeId ?>", "link_<?php echo $storeId ?>", "image_link_<?php echo $storeId ?>"],
55
  templating: {
56
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
57
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
app/design/frontend/base/default/template/me/gravity/general/boxes/sidebar.phtml CHANGED
@@ -17,6 +17,7 @@
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
 
20
  <div class="block block-<?php echo $this->getBoxClass() ?>">
21
  <div class="block-title">
22
  <?php if($title = $this->getRecommendationTitle()) : ?>
@@ -31,9 +32,9 @@
31
  {for p in products}
32
  <li class="item">
33
  <div class="product">
34
- <a href="${p.Url}" title="${p.title}" class="product-image" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});"><img src="${p.ImageUrl}" width="50" alt=">${p.title}" /></a>
35
  <div class="product-details">
36
- <p class="recItemTitle product-name"><a href="${p.Url}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title}</a></p>
37
  </div>
38
  </div>
39
  <div class="clearer"></div>
@@ -49,7 +50,8 @@
49
  type: "recommendation",
50
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
51
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
52
- resultNames: ["itemId", "title", "Url", "ImageUrl"],
 
53
  templating: {
54
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
55
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
20
+ <?php $storeId = $this->getStoreId(); ?>
21
  <div class="block block-<?php echo $this->getBoxClass() ?>">
22
  <div class="block-title">
23
  <?php if($title = $this->getRecommendationTitle()) : ?>
32
  {for p in products}
33
  <li class="item">
34
  <div class="product">
35
+ <a href="${p.link_<?php echo $storeId ?>}" title="${p.title_<?php echo $storeId ?>}" class="product-image" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});"><img src="${p.image_link_<?php echo $storeId ?>}" width="50" alt=">${p.title_<?php echo $storeId ?>}" /></a>
36
  <div class="product-details">
37
+ <p class="recItemTitle product-name"><a href="${p.link_<?php echo $storeId ?>}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title_<?php echo $storeId ?>}</a></p>
38
  </div>
39
  </div>
40
  <div class="clearer"></div>
50
  type: "recommendation",
51
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
52
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
53
+ storeId: <?php echo $storeId ?>,
54
+ resultNames: ["itemId", "title_<?php echo $storeId ?>", "link_<?php echo $storeId ?>", "image_link_<?php echo $storeId ?>"],
55
  templating: {
56
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
57
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
app/design/frontend/base/default/template/me/gravity/widget/boxes/widget.phtml CHANGED
@@ -17,6 +17,7 @@
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($this->getTemplateType()) : ?>
 
20
  <div class="block block-<?php echo $this->getBoxClass() ?>">
21
  <div class="block-title">
22
  <?php if($title = $this->getRecommendationTitle()) : ?>
@@ -30,11 +31,11 @@
30
  <ul class="recItems products-grid gravity-<?php echo $this->getBoxClass() ?>-grid" style="background: none;">
31
  {for p in products}
32
  <li class="item" style="min-height: 200px;">
33
- <a class="product-image" href="${p.Url}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">
34
- <img width="90" src='${p.ImageUrl}' />
35
  </a>
36
  <div class="recItemTitle product-name">
37
- <a class="recItemTitle product-name" href="${p.Url}" onmousedown="_gravity.push({type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title}</a>
38
  </div>
39
  <div class="clearer"></div>
40
  </li>
@@ -49,7 +50,8 @@
49
  type: "recommendation",
50
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
51
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
52
- resultNames: ["itemId", "title", "Url", "ImageUrl"],
 
53
  templating: {
54
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
55
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($this->getTemplateType()) : ?>
20
+ <?php $storeId = $this->getStoreId(); ?>
21
  <div class="block block-<?php echo $this->getBoxClass() ?>">
22
  <div class="block-title">
23
  <?php if($title = $this->getRecommendationTitle()) : ?>
31
  <ul class="recItems products-grid gravity-<?php echo $this->getBoxClass() ?>-grid" style="background: none;">
32
  {for p in products}
33
  <li class="item" style="min-height: 200px;">
34
+ <a class="product-image" href="${p.link_<?php echo $storeId ?>}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">
35
+ <img width="90" src='${p.image_link_<?php echo $storeId ?>}' />
36
  </a>
37
  <div class="recItemTitle product-name">
38
+ <a class="recItemTitle product-name" href="${p.link_<?php echo $storeId ?>}" onmousedown="_gravity.push({type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title_<?php echo $storeId ?>}</a>
39
  </div>
40
  <div class="clearer"></div>
41
  </li>
50
  type: "recommendation",
51
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
52
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
53
+ storeId: <?php echo $storeId ?>,
54
+ resultNames: ["itemId", "title_<?php echo $storeId ?>", "link_<?php echo $storeId ?>", "image_link_<?php echo $storeId ?>"],
55
  templating: {
56
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
57
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
app/design/frontend/rwd/default/template/me/gravity/catalog/category/boxes/default.phtml CHANGED
@@ -17,6 +17,7 @@
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
 
20
  <?php $_columnCount = 5; ?>
21
  <div class="box box-<?php echo $this->getBoxClass() ?>">
22
  <div class="box-head">
@@ -31,11 +32,11 @@
31
  <ul class="products-grid products-grid--max-<?php echo $_columnCount; ?>-col gravity-<?php echo $this->getBoxClass() ?>-grid">
32
  {for p in products}
33
  <li class="item" style="min-height: 200px;">
34
- <a class="product-image" href="${p.Url}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">
35
- <img id="product-collection-image-${p.itemid}'}" src='${p.ImageUrl}' />
36
  </a>
37
  <div class="recItemTitle product-name">
38
- <a class="recItemTitle product-name" href="${p.Url}" onmousedown="_gravity.push({type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title}</a>
39
  </div>
40
  </li>
41
  {/for}
@@ -48,12 +49,13 @@
48
  type: "recommendation",
49
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
50
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
 
51
  <?php if($filters = $this->getFilters()) : ?>
52
  <?php foreach($filters as $attributeCode => $value) : ?>
53
  <?php echo $attributeCode ?>: "<?php echo $value ?>",
54
  <?php endforeach; ?>
55
  <?php endif; ?>
56
- resultNames: ["itemId", "title", "Url", "ImageUrl"],
57
  templating: {
58
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
59
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
20
+ <?php $storeId = $this->getStoreId(); ?>
21
  <?php $_columnCount = 5; ?>
22
  <div class="box box-<?php echo $this->getBoxClass() ?>">
23
  <div class="box-head">
32
  <ul class="products-grid products-grid--max-<?php echo $_columnCount; ?>-col gravity-<?php echo $this->getBoxClass() ?>-grid">
33
  {for p in products}
34
  <li class="item" style="min-height: 200px;">
35
+ <a class="product-image" href="${p.link_<?php echo $storeId ?>}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">
36
+ <img id="product-collection-image-${p.itemid}'}" src='${p.image_link_<?php echo $storeId ?>}' />
37
  </a>
38
  <div class="recItemTitle product-name">
39
+ <a class="recItemTitle product-name" href="${p.link_<?php echo $storeId ?>}" onmousedown="_gravity.push({type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title_<?php echo $storeId ?>}</a>
40
  </div>
41
  </li>
42
  {/for}
49
  type: "recommendation",
50
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
51
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
52
+ storeId: <?php echo $storeId ?>,
53
  <?php if($filters = $this->getFilters()) : ?>
54
  <?php foreach($filters as $attributeCode => $value) : ?>
55
  <?php echo $attributeCode ?>: "<?php echo $value ?>",
56
  <?php endforeach; ?>
57
  <?php endif; ?>
58
+ resultNames: ["itemId", "title_<?php echo $storeId ?>", "link_<?php echo $storeId ?>", "image_link_<?php echo $storeId ?>"],
59
  templating: {
60
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
61
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
app/design/frontend/rwd/default/template/me/gravity/catalog/category/boxes/sidebar.phtml CHANGED
@@ -17,6 +17,7 @@
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
 
20
  <div class="block block-<?php echo $this->getBoxClass() ?>">
21
  <div class="block-title">
22
  <?php if($title = $this->getRecommendationTitle()) : ?>
@@ -31,9 +32,9 @@
31
  {for p in products}
32
  <li class="item">
33
  <div class="product">
34
- <a href="${p.Url}" title="${p.title}" class="product-image" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});"><img src="${p.ImageUrl}" width="50" alt=">${p.title}" /></a>
35
  <div class="product-details">
36
- <p class="recItemTitle product-name"><a href="${p.Url}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title}</a></p>
37
  </div>
38
  </div>
39
  <div class="clearer"></div>
@@ -49,12 +50,13 @@
49
  type: "recommendation",
50
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
51
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
 
52
  <?php if($filters = $this->getFilters()) : ?>
53
  <?php foreach($filters as $attributeCode => $value) : ?>
54
  <?php echo $attributeCode ?>: "<?php echo $value ?>",
55
  <?php endforeach; ?>
56
  <?php endif; ?>
57
- resultNames: ["itemId", "title", "Url", "ImageUrl"],
58
  templating: {
59
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
60
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
20
+ <?php $storeId = $this->getStoreId(); ?>
21
  <div class="block block-<?php echo $this->getBoxClass() ?>">
22
  <div class="block-title">
23
  <?php if($title = $this->getRecommendationTitle()) : ?>
32
  {for p in products}
33
  <li class="item">
34
  <div class="product">
35
+ <a href="${p.link_<?php echo $storeId ?>}" title="${p.title_<?php echo $storeId ?>}" class="product-image" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});"><img src="${p.image_link_<?php echo $storeId ?>}" width="50" alt=">${p.title_<?php echo $storeId ?>}" /></a>
36
  <div class="product-details">
37
+ <p class="recItemTitle product-name"><a href="${p.link_<?php echo $storeId ?>}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title_<?php echo $storeId ?>}</a></p>
38
  </div>
39
  </div>
40
  <div class="clearer"></div>
50
  type: "recommendation",
51
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
52
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
53
+ storeId: <?php echo $storeId ?>,
54
  <?php if($filters = $this->getFilters()) : ?>
55
  <?php foreach($filters as $attributeCode => $value) : ?>
56
  <?php echo $attributeCode ?>: "<?php echo $value ?>",
57
  <?php endforeach; ?>
58
  <?php endif; ?>
59
+ resultNames: ["itemId", "title_<?php echo $storeId ?>", "link_<?php echo $storeId ?>", "image_link_<?php echo $storeId ?>"],
60
  templating: {
61
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
62
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
app/design/frontend/rwd/default/template/me/gravity/catalog/product/view/boxes/default.phtml CHANGED
@@ -17,6 +17,7 @@
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
 
20
  <?php $_columnCount = 5; ?>
21
  <div class="box box-<?php echo $this->getBoxClass() ?>">
22
  <div class="box-head">
@@ -31,11 +32,11 @@
31
  <ul class="products-grid products-grid--max-<?php echo $_columnCount; ?>-col gravity-<?php echo $this->getBoxClass() ?>-grid">
32
  {for p in products}
33
  <li class="item" style="min-height: 200px;">
34
- <a class="product-image" href="${p.Url}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">
35
- <img id="product-collection-image-${p.itemid}'}" src='${p.ImageUrl}' />
36
  </a>
37
  <div class="recItemTitle product-name">
38
- <a class="recItemTitle product-name" href="${p.Url}" onmousedown="_gravity.push({type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title}</a>
39
  </div>
40
  </li>
41
  {/for}
@@ -48,10 +49,11 @@
48
  type: "recommendation",
49
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
50
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
 
51
  <?php if($productId = $this->getProduct()->getId()) : ?>
52
  currentItemId: "ItemID_<?php echo $productId ?>",
53
  <?php endif; ?>
54
- resultNames: ["itemId", "title", "Url", "ImageUrl"],
55
  templating: {
56
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
57
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
20
+ <?php $storeId = $this->getStoreId(); ?>
21
  <?php $_columnCount = 5; ?>
22
  <div class="box box-<?php echo $this->getBoxClass() ?>">
23
  <div class="box-head">
32
  <ul class="products-grid products-grid--max-<?php echo $_columnCount; ?>-col gravity-<?php echo $this->getBoxClass() ?>-grid">
33
  {for p in products}
34
  <li class="item" style="min-height: 200px;">
35
+ <a class="product-image" href="${p.link_<?php echo $storeId ?>}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">
36
+ <img id="product-collection-image-${p.itemid}'}" src='${p.image_link_<?php echo $storeId ?>}' />
37
  </a>
38
  <div class="recItemTitle product-name">
39
+ <a class="recItemTitle product-name" href="${p.link_<?php echo $storeId ?>}" onmousedown="_gravity.push({type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title_<?php echo $storeId ?>}</a>
40
  </div>
41
  </li>
42
  {/for}
49
  type: "recommendation",
50
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
51
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
52
+ storeId: <?php echo $storeId ?>,
53
  <?php if($productId = $this->getProduct()->getId()) : ?>
54
  currentItemId: "ItemID_<?php echo $productId ?>",
55
  <?php endif; ?>
56
+ resultNames: ["itemId", "title_<?php echo $storeId ?>", "link_<?php echo $storeId ?>", "image_link_<?php echo $storeId ?>"],
57
  templating: {
58
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
59
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
app/design/frontend/rwd/default/template/me/gravity/catalog/product/view/boxes/sidebar.phtml CHANGED
@@ -17,6 +17,7 @@
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
 
20
  <div class="block block-<?php echo $this->getBoxClass() ?>">
21
  <div class="block-title">
22
  <?php if($title = $this->getRecommendationTitle()) : ?>
@@ -31,9 +32,9 @@
31
  {for p in products}
32
  <li class="item">
33
  <div class="product">
34
- <a href="${p.Url}" title="${p.title}" class="product-image" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});"><img src="${p.ImageUrl}" width="50" alt=">${p.title}" /></a>
35
  <div class="product-details">
36
- <p class="recItemTitle product-name"><a href="${p.Url}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title}</a></p>
37
  </div>
38
  </div>
39
  <div class="clearer"></div>
@@ -49,10 +50,11 @@
49
  type: "recommendation",
50
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
51
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
 
52
  <?php if($productId = $this->getProduct()->getId()) : ?>
53
  currentItemId: "ItemID_<?php echo $productId ?>",
54
  <?php endif; ?>
55
- resultNames: ["itemId", "title", "Url", "ImageUrl"],
56
  templating: {
57
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
58
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
20
+ <?php $storeId = $this->getStoreId(); ?>
21
  <div class="block block-<?php echo $this->getBoxClass() ?>">
22
  <div class="block-title">
23
  <?php if($title = $this->getRecommendationTitle()) : ?>
32
  {for p in products}
33
  <li class="item">
34
  <div class="product">
35
+ <a href="${p.link_<?php echo $storeId ?>}" title="${p.title_<?php echo $storeId ?>}" class="product-image" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});"><img src="${p.image_link_<?php echo $storeId ?>}" width="50" alt=">${p.title_<?php echo $storeId ?>}" /></a>
36
  <div class="product-details">
37
+ <p class="recItemTitle product-name"><a href="${p.link_<?php echo $storeId ?>}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title_<?php echo $storeId ?>}</a></p>
38
  </div>
39
  </div>
40
  <div class="clearer"></div>
50
  type: "recommendation",
51
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
52
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
53
+ storeId: <?php echo $storeId ?>,
54
  <?php if($productId = $this->getProduct()->getId()) : ?>
55
  currentItemId: "ItemID_<?php echo $productId ?>",
56
  <?php endif; ?>
57
+ resultNames: ["itemId", "title_<?php echo $storeId ?>", "link_<?php echo $storeId ?>", "image_link_<?php echo $storeId ?>"],
58
  templating: {
59
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
60
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
app/design/frontend/rwd/default/template/me/gravity/catalogsearch/boxes/default.phtml CHANGED
@@ -17,6 +17,7 @@
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
 
20
  <?php $_columnCount = 5; ?>
21
  <div class="box box-<?php echo $this->getBoxClass() ?>">
22
  <div class="box-head">
@@ -31,11 +32,11 @@
31
  <ul class="products-grid products-grid--max-<?php echo $_columnCount; ?>-col gravity-<?php echo $this->getBoxClass() ?>-grid">
32
  {for p in products}
33
  <li class="item" style="min-height: 200px;">
34
- <a class="product-image" href="${p.Url}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">
35
- <img id="product-collection-image-${p.itemid}'}" src='${p.ImageUrl}' />
36
  </a>
37
  <div class="recItemTitle product-name">
38
- <a class="recItemTitle product-name" href="${p.Url}" onmousedown="_gravity.push({type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title}</a>
39
  </div>
40
  </li>
41
  {/for}
@@ -48,12 +49,13 @@
48
  type: "recommendation",
49
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
50
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
 
51
  <?php if($searchKeywords = $this->getSearchKeywords()) : ?>
52
  <?php foreach($searchKeywords as $attributeCode => $value) : ?>
53
  <?php echo $attributeCode ?>: "<?php echo $value ?>",
54
  <?php endforeach; ?>
55
  <?php endif; ?>
56
- resultNames: ["itemId", "title", "Url", "ImageUrl"],
57
  templating: {
58
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
59
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
20
+ <?php $storeId = $this->getStoreId(); ?>
21
  <?php $_columnCount = 5; ?>
22
  <div class="box box-<?php echo $this->getBoxClass() ?>">
23
  <div class="box-head">
32
  <ul class="products-grid products-grid--max-<?php echo $_columnCount; ?>-col gravity-<?php echo $this->getBoxClass() ?>-grid">
33
  {for p in products}
34
  <li class="item" style="min-height: 200px;">
35
+ <a class="product-image" href="${p.link_<?php echo $storeId ?>}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">
36
+ <img id="product-collection-image-${p.itemid}'}" src='${p.image_link_<?php echo $storeId ?>}' />
37
  </a>
38
  <div class="recItemTitle product-name">
39
+ <a class="recItemTitle product-name" href="${p.link_<?php echo $storeId ?>}" onmousedown="_gravity.push({type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title_<?php echo $storeId ?>}</a>
40
  </div>
41
  </li>
42
  {/for}
49
  type: "recommendation",
50
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
51
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
52
+ storeId: <?php echo $storeId ?>,
53
  <?php if($searchKeywords = $this->getSearchKeywords()) : ?>
54
  <?php foreach($searchKeywords as $attributeCode => $value) : ?>
55
  <?php echo $attributeCode ?>: "<?php echo $value ?>",
56
  <?php endforeach; ?>
57
  <?php endif; ?>
58
+ resultNames: ["itemId", "title_<?php echo $storeId ?>", "link_<?php echo $storeId ?>", "image_link_<?php echo $storeId ?>"],
59
  templating: {
60
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
61
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
app/design/frontend/rwd/default/template/me/gravity/catalogsearch/boxes/sidebar.phtml CHANGED
@@ -17,6 +17,7 @@
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
 
20
  <div class="block block-<?php echo $this->getBoxClass() ?>">
21
  <div class="block-title">
22
  <?php if($title = $this->getRecommendationTitle()) : ?>
@@ -31,9 +32,9 @@
31
  {for p in products}
32
  <li class="item">
33
  <div class="product">
34
- <a href="${p.Url}" title="${p.title}" class="product-image" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});"><img src="${p.ImageUrl}" width="50" alt=">${p.title}" /></a>
35
  <div class="product-details">
36
- <p class="recItemTitle product-name"><a href="${p.Url}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title}</a></p>
37
  </div>
38
  </div>
39
  <div class="clearer"></div>
@@ -49,12 +50,13 @@
49
  type: "recommendation",
50
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
51
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
 
52
  <?php if($searchKeywords = $this->getSearchKeywords()) : ?>
53
  <?php foreach($searchKeywords as $attributeCode => $value) : ?>
54
  <?php echo $attributeCode ?>: "<?php echo $value ?>",
55
  <?php endforeach; ?>
56
  <?php endif; ?>
57
- resultNames: ["itemId", "title", "Url", "ImageUrl"],
58
  templating: {
59
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
60
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
20
+ <?php $storeId = $this->getStoreId(); ?>
21
  <div class="block block-<?php echo $this->getBoxClass() ?>">
22
  <div class="block-title">
23
  <?php if($title = $this->getRecommendationTitle()) : ?>
32
  {for p in products}
33
  <li class="item">
34
  <div class="product">
35
+ <a href="${p.link_<?php echo $storeId ?>}" title="${p.title_<?php echo $storeId ?>}" class="product-image" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});"><img src="${p.image_link_<?php echo $storeId ?>}" width="50" alt=">${p.title_<?php echo $storeId ?>}" /></a>
36
  <div class="product-details">
37
+ <p class="recItemTitle product-name"><a href="${p.link_<?php echo $storeId ?>}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title_<?php echo $storeId ?>}</a></p>
38
  </div>
39
  </div>
40
  <div class="clearer"></div>
50
  type: "recommendation",
51
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
52
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
53
+ storeId: <?php echo $storeId ?>,
54
  <?php if($searchKeywords = $this->getSearchKeywords()) : ?>
55
  <?php foreach($searchKeywords as $attributeCode => $value) : ?>
56
  <?php echo $attributeCode ?>: "<?php echo $value ?>",
57
  <?php endforeach; ?>
58
  <?php endif; ?>
59
+ resultNames: ["itemId", "title_<?php echo $storeId ?>", "link_<?php echo $storeId ?>", "image_link_<?php echo $storeId ?>"],
60
  templating: {
61
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
62
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
app/design/frontend/rwd/default/template/me/gravity/checkout/cart/boxes/default.phtml CHANGED
@@ -17,6 +17,7 @@
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
 
20
  <?php $_columnCount = 5; ?>
21
  <div class="box box-<?php echo $this->getBoxClass() ?>">
22
  <div class="box-head">
@@ -31,11 +32,11 @@
31
  <ul class="products-grid products-grid--max-<?php echo $_columnCount; ?>-col gravity-<?php echo $this->getBoxClass() ?>-grid">
32
  {for p in products}
33
  <li class="item" style="min-height: 200px;">
34
- <a class="product-image" href="${p.Url}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">
35
- <img id="product-collection-image-${p.itemid}'}" src='${p.ImageUrl}' />
36
  </a>
37
  <div class="recItemTitle product-name">
38
- <a class="recItemTitle product-name" href="${p.Url}" onmousedown="_gravity.push({type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title}</a>
39
  </div>
40
  </li>
41
  {/for}
@@ -48,12 +49,13 @@
48
  type: "recommendation",
49
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
50
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
 
51
  <?php if($itemIds = $this->getCartItems()) : ?>
52
  <?php foreach($itemIds as $itemId) : ?>
53
  cartItemId: "<?php echo $itemId ?>",
54
  <?php endforeach; ?>
55
  <?php endif; ?>
56
- resultNames: ["itemId", "title", "Url", "ImageUrl"],
57
  templating: {
58
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
59
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
20
+ <?php $storeId = $this->getStoreId(); ?>
21
  <?php $_columnCount = 5; ?>
22
  <div class="box box-<?php echo $this->getBoxClass() ?>">
23
  <div class="box-head">
32
  <ul class="products-grid products-grid--max-<?php echo $_columnCount; ?>-col gravity-<?php echo $this->getBoxClass() ?>-grid">
33
  {for p in products}
34
  <li class="item" style="min-height: 200px;">
35
+ <a class="product-image" href="${p.link_<?php echo $storeId ?>}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">
36
+ <img id="product-collection-image-${p.itemid}'}" src='${p.image_link_<?php echo $storeId ?>}' />
37
  </a>
38
  <div class="recItemTitle product-name">
39
+ <a class="recItemTitle product-name" href="${p.link_<?php echo $storeId ?>}" onmousedown="_gravity.push({type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title_<?php echo $storeId ?>}</a>
40
  </div>
41
  </li>
42
  {/for}
49
  type: "recommendation",
50
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
51
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
52
+ storeId: <?php echo $storeId ?>,
53
  <?php if($itemIds = $this->getCartItems()) : ?>
54
  <?php foreach($itemIds as $itemId) : ?>
55
  cartItemId: "<?php echo $itemId ?>",
56
  <?php endforeach; ?>
57
  <?php endif; ?>
58
+ resultNames: ["itemId", "title_<?php echo $storeId ?>", "link_<?php echo $storeId ?>", "image_link_<?php echo $storeId ?>"],
59
  templating: {
60
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
61
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
app/design/frontend/rwd/default/template/me/gravity/checkout/cart/boxes/sidebar.phtml CHANGED
@@ -17,6 +17,7 @@
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
 
20
  <div class="block block-<?php echo $this->getBoxClass() ?>">
21
  <div class="block-title">
22
  <?php if($title = $this->getRecommendationTitle()) : ?>
@@ -31,9 +32,9 @@
31
  {for p in products}
32
  <li class="item">
33
  <div class="product">
34
- <a href="${p.Url}" title="${p.title}" class="product-image" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});"><img src="${p.ImageUrl}" width="50" alt=">${p.title}" /></a>
35
  <div class="product-details">
36
- <p class="recItemTitle product-name"><a href="${p.Url}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title}</a></p>
37
  </div>
38
  </div>
39
  <div class="clearer"></div>
@@ -49,12 +50,13 @@
49
  type: "recommendation",
50
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
51
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
 
52
  <?php if($itemIds = $this->getCartItems()) : ?>
53
  <?php foreach($itemIds as $itemId) : ?>
54
  cartItemId: "<?php echo $itemId ?>",
55
  <?php endforeach; ?>
56
  <?php endif; ?>
57
- resultNames: ["itemId", "title", "Url", "ImageUrl"],
58
  templating: {
59
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
60
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
20
+ <?php $storeId = $this->getStoreId(); ?>
21
  <div class="block block-<?php echo $this->getBoxClass() ?>">
22
  <div class="block-title">
23
  <?php if($title = $this->getRecommendationTitle()) : ?>
32
  {for p in products}
33
  <li class="item">
34
  <div class="product">
35
+ <a href="${p.link_<?php echo $storeId ?>}" title="${p.title_<?php echo $storeId ?>}" class="product-image" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});"><img src="${p.image_link_<?php echo $storeId ?>}" width="50" alt=">${p.title_<?php echo $storeId ?>}" /></a>
36
  <div class="product-details">
37
+ <p class="recItemTitle product-name"><a href="${p.link_<?php echo $storeId ?>}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title_<?php echo $storeId ?>}</a></p>
38
  </div>
39
  </div>
40
  <div class="clearer"></div>
50
  type: "recommendation",
51
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
52
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
53
+ storeId: <?php echo $storeId ?>,
54
  <?php if($itemIds = $this->getCartItems()) : ?>
55
  <?php foreach($itemIds as $itemId) : ?>
56
  cartItemId: "<?php echo $itemId ?>",
57
  <?php endforeach; ?>
58
  <?php endif; ?>
59
+ resultNames: ["itemId", "title_<?php echo $storeId ?>", "link_<?php echo $storeId ?>", "image_link_<?php echo $storeId ?>"],
60
  templating: {
61
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
62
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
app/design/frontend/rwd/default/template/me/gravity/general/boxes/default.phtml CHANGED
@@ -17,6 +17,7 @@
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
 
20
  <?php $_columnCount = 5; ?>
21
  <div class="box box-<?php echo $this->getBoxClass() ?>">
22
  <div class="box-head">
@@ -31,11 +32,11 @@
31
  <ul class="products-grid products-grid--max-<?php echo $_columnCount; ?>-col gravity-<?php echo $this->getBoxClass() ?>-grid">
32
  {for p in products}
33
  <li class="item" style="min-height: 200px;">
34
- <a class="product-image" href="${p.Url}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">
35
- <img id="product-collection-image-${p.itemid}" src='${p.ImageUrl}' />
36
  </a>
37
  <div class="recItemTitle product-name">
38
- <a class="recItemTitle product-name" href="${p.Url}" onmousedown="_gravity.push({type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title}</a>
39
  </div>
40
  </li>
41
  {/for}
@@ -48,7 +49,8 @@
48
  type: "recommendation",
49
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
50
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
51
- resultNames: ["itemId", "title", "Url", "ImageUrl"],
 
52
  templating: {
53
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
54
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
20
+ <?php $storeId = $this->getStoreId(); ?>
21
  <?php $_columnCount = 5; ?>
22
  <div class="box box-<?php echo $this->getBoxClass() ?>">
23
  <div class="box-head">
32
  <ul class="products-grid products-grid--max-<?php echo $_columnCount; ?>-col gravity-<?php echo $this->getBoxClass() ?>-grid">
33
  {for p in products}
34
  <li class="item" style="min-height: 200px;">
35
+ <a class="product-image" href="${p.link_<?php echo $storeId ?>}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">
36
+ <img id="product-collection-image-${p.itemid}" src='${p.image_link_<?php echo $storeId ?>}' />
37
  </a>
38
  <div class="recItemTitle product-name">
39
+ <a class="recItemTitle product-name" href="${p.link_<?php echo $storeId ?>}" onmousedown="_gravity.push({type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title_<?php echo $storeId ?>}</a>
40
  </div>
41
  </li>
42
  {/for}
49
  type: "recommendation",
50
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
51
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
52
+ storeId: <?php echo $storeId ?>,
53
+ resultNames: ["itemId", "title_<?php echo $storeId ?>", "link_<?php echo $storeId ?>", "image_link_<?php echo $storeId ?>"],
54
  templating: {
55
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
56
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
app/design/frontend/rwd/default/template/me/gravity/general/boxes/sidebar.phtml CHANGED
@@ -17,6 +17,7 @@
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
 
20
  <div class="block block-<?php echo $this->getBoxClass() ?>">
21
  <div class="block-title">
22
  <?php if($title = $this->getRecommendationTitle()) : ?>
@@ -31,9 +32,9 @@
31
  {for p in products}
32
  <li class="item">
33
  <div class="product">
34
- <a href="${p.Url}" title="${p.title}" class="product-image" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});"><img src="${p.ImageUrl}" width="50" alt=">${p.title}" /></a>
35
  <div class="product-details">
36
- <p class="recItemTitle product-name"><a href="${p.Url}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title}</a></p>
37
  </div>
38
  </div>
39
  <div class="clearer"></div>
@@ -49,7 +50,8 @@
49
  type: "recommendation",
50
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
51
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
52
- resultNames: ["itemId", "title", "Url", "ImageUrl"],
 
53
  templating: {
54
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
55
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($gravityHelper->useGravityTemplate()) : ?>
20
+ <?php $storeId = $this->getStoreId(); ?>
21
  <div class="block block-<?php echo $this->getBoxClass() ?>">
22
  <div class="block-title">
23
  <?php if($title = $this->getRecommendationTitle()) : ?>
32
  {for p in products}
33
  <li class="item">
34
  <div class="product">
35
+ <a href="${p.link_<?php echo $storeId ?>}" title="${p.title_<?php echo $storeId ?>}" class="product-image" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});"><img src="${p.image_link_<?php echo $storeId ?>}" width="50" alt=">${p.title_<?php echo $storeId ?>}" /></a>
36
  <div class="product-details">
37
+ <p class="recItemTitle product-name"><a href="${p.link_<?php echo $storeId ?>}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title_<?php echo $storeId ?>}</a></p>
38
  </div>
39
  </div>
40
  <div class="clearer"></div>
50
  type: "recommendation",
51
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
52
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
53
+ storeId: <?php echo $storeId ?>,
54
+ resultNames: ["itemId", "title_<?php echo $storeId ?>", "link_<?php echo $storeId ?>", "image_link_<?php echo $storeId ?>"],
55
  templating: {
56
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
57
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
app/design/frontend/rwd/default/template/me/gravity/widget/boxes/widget.phtml CHANGED
@@ -17,6 +17,7 @@
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($this->getTemplateType()) : ?>
 
20
  <?php $_columnCount = 5; ?>
21
  <div class="widget widget-<?php echo $this->getBoxClass() ?>">
22
  <div class="widget-title">
@@ -31,12 +32,12 @@
31
  <ul class="products-grid products-grid--max-<?php echo $_columnCount; ?>-col-widget gravity-<?php echo $this->getBoxClass() ?>-grid">
32
  {for p in products}
33
  <li class="item" style="min-height: 210px;">
34
- <a class="product-image" href="${p.Url}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">
35
- <img id="product-collection-image-${p.itemid}" src='${p.ImageUrl}' style="width: 210px;" />
36
  </a>
37
  <div class="product-info">
38
  <h3 class="product-name recItemTitle">
39
- <a class="product-name" href="${p.Url}" onmousedown="_gravity.push({type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title}</a>
40
  </h3>
41
  </div>
42
  </li>
@@ -50,7 +51,8 @@
50
  type: "recommendation",
51
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
52
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
53
- resultNames: ["itemId", "title", "Url", "ImageUrl"],
 
54
  templating: {
55
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
56
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
17
  ?>
18
  <?php $gravityHelper = $this->getGravityHelper(); ?>
19
  <?php if ($this->getTemplateType()) : ?>
20
+ <?php $storeId = $this->getStoreId(); ?>
21
  <?php $_columnCount = 5; ?>
22
  <div class="widget widget-<?php echo $this->getBoxClass() ?>">
23
  <div class="widget-title">
32
  <ul class="products-grid products-grid--max-<?php echo $_columnCount; ?>-col-widget gravity-<?php echo $this->getBoxClass() ?>-grid">
33
  {for p in products}
34
  <li class="item" style="min-height: 210px;">
35
+ <a class="product-image" href="${p.link_<?php echo $storeId ?>}" onmousedown="_gravity.push({ type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">
36
+ <img id="product-collection-image-${p.itemid}" src='${p.image_link_<?php echo $storeId ?>}' style="width: 210px;" />
37
  </a>
38
  <div class="product-info">
39
  <h3 class="product-name recItemTitle">
40
+ <a class="product-name" href="${p.link_<?php echo $storeId ?>}" onmousedown="_gravity.push({type: 'event', eventType: 'REC_CLICK', itemId: '${p.itemid}'});">${p.title_<?php echo $storeId ?>}</a>
41
  </h3>
42
  </div>
43
  </li>
51
  type: "recommendation",
52
  scenarioId: "<?php echo $this->getRecommendationType() ?>",
53
  numberLimit: <?php echo $this->getRecommendationLimit() ?>,
54
+ storeId: <?php echo $storeId ?>,
55
+ resultNames: ["itemId", "title_<?php echo $storeId ?>", "link_<?php echo $storeId ?>", "image_link_<?php echo $storeId ?>"],
56
  templating: {
57
  targetElementId: "target-<?php echo $this->getBoxClass() ?>",
58
  templateElementId: "template-<?php echo $this->getBoxClass() ?>"
package.xml CHANGED
@@ -1,20 +1,20 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Me_Gravity</name>
4
- <version>1.0.0.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.gravityrd.com/">Gravity R&amp;D, Ltd.</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>The Gravity Recommendation extension provides an interface between Magento web shop and Gravity Recommendation service. The communication based on PHP or Javascript API providing by Gravity service. </summary>
10
  <description>The Gravity Recommendation extension provides an interface between Magento web shop and Gravity Recommendation service. The communication based on PHP or Javascript API providing by Gravity service. The extension responsible for displaying recommendation boxes with products using Magento templates or Gravity based templates. The boxes contains the web shop products offered by the other side, and also sends information for Gravity service to provided proper analysis of users behaviors. It also able to export products catalog and customers for Gravity service using the extension configuration panel, or run daily scheduled export by cron job.</description>
11
- <notes>Version number: 1.0.0.0&#xD;
12
  Stability: Stable&#xD;
13
  Compatibility: CE 1.6.x, 1.7.x, 1.8.x, 1.9.x </notes>
14
  <authors><author><name>Gravity Recommendations</name><user>gravity_rd</user><email>web-integration@gravityrd.com</email></author></authors>
15
- <date>2015-03-18</date>
16
- <time>18:29:28</time>
17
- <contents><target name="mageetc"><dir name="modules"><file name="Me_Gravity.xml" hash="a385bf72a5c2f0f040d2bb0850ca0b7c"/></dir></target><target name="magecommunity"><dir name="Me"><dir name="Gravity"><dir name="Block"><file name="Abstract.php" hash="586409500493a209ba021f8d471c793c"/><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><file name="Catalog.php" hash="6adcc355986762d7cc19f854c5fdd067"/><file name="Customer.php" hash="50336da73ad37e3895f82980387f6970"/><file name="Test.php" hash="07d7fce9dd15eb623918d6f01505cc32"/></dir></dir></dir></dir><dir name="Catalog"><dir name="Category"><dir name="Boxes"><file name="Category.php" hash="0e9338d55a16ddde3ae30d14695e799d"/><file name="Personal.php" hash="7ac0315f48df1a3262fc06f33d46228a"/><file name="Top.php" hash="1e44870ec677da107bed26542233ab6b"/></dir></dir><dir name="Product"><dir name="View"><dir name="Boxes"><file name="Accessories.php" hash="f118fa14b7c457985c1e9b6b96f08f2e"/><file name="Personal.php" hash="1f2af5e09efad11f36c5a08de3861aee"/><file name="Product.php" hash="f7e66be937ec442e47c7dd4d3024d7df"/><file name="Similar.php" hash="47011f4c56d0bd7d9de7e159f9aeb9bb"/></dir><dir name="Js"><file name="Gravity.php" hash="f3d150d7d6ff93507a5ebc77cf0690cb"/></dir></dir></dir></dir><dir name="Catalogsearch"><dir name="Advanced"><dir name="Js"><file name="Gravity.php" hash="55765708d00aec635e92075f8e36da04"/></dir></dir><dir name="Boxes"><file name="Result.php" hash="1c59e5b53cbef273f6cb7cd3448aa45b"/></dir><dir name="Js"><file name="Gravity.php" hash="6e16a09ec3d26793db8ca216cf349a71"/></dir></dir><dir name="Checkout"><dir name="Cart"><dir name="Boxes"><file name="Cart.php" hash="b720e576c5123f9d52ee98807cb7ac36"/></dir></dir></dir><dir name="General"><dir name="Boxes"><file name="Best.php" hash="079eabb3dbfb2167eb9b0f9497fc37b0"/><file name="History.php" hash="85e0c22619328f8d0f03dfbcb5111709"/><file name="Others.php" hash="02c2cb071acbf74ce31a545c32c69f06"/><file name="Popular.php" hash="15ceca807386ffc3c384e393e4af7244"/></dir></dir><dir name="Page"><dir name="Js"><file name="Gravity.php" hash="26944607e33371fb1f56fca8e3d41aa3"/></dir></dir><file name="Recommendation.php" hash="50dae6d63ba61f0dfd2361eda3802a65"/><dir name="Widget"><dir name="Boxes"><file name="Widget.php" hash="17560f25437bf04f2f8069b1aeee010e"/></dir></dir></dir><dir name="Helper"><file name="Boxes.php" hash="e321d569b2d6e6ff64e2ae33180b7509"/><file name="Data.php" hash="6e583dd37cadba6c986ad08dda77ae34"/></dir><dir name="Model"><dir name="Client"><file name="GravityClient.php" hash="0294939e272568ffd118db005d15563d"/></dir><file name="Customers.php" hash="7399f7fb93965a3c67f5e2c941209ffe"/><dir name="Export"><file name="Abstract.php" hash="6e3ca7274117aa652aba036e4ae31f94"/><dir name="Catalog"><file name="Product.php" hash="6d7f73b7983b65614ef29d5efb9437ff"/></dir><dir name="Customer"><file name="Customer.php" hash="d3577acc08cd3004ccfb865232eebb9c"/></dir></dir><dir name="Method"><file name="Abstract.php" hash="c907e89db6238c5001cf653b31afa56e"/><file name="Request.php" hash="329365be220707c44ccd71e5b41bdf0e"/></dir><file name="Observer.php" hash="5eb36cdd6eedd3096f636362b8bd8ccb"/><file name="Products.php" hash="c33dde68c3fd6ddfe882c7c8b1c7c80d"/><dir name="System"><dir name="Config"><dir name="Backend"><dir name="Catalog"><file name="Cron.php" hash="395fbd5f3d41223a336057b5bba6f4cc"/></dir></dir><dir name="Source"><dir name="Catalog"><file name="Attributes.php" hash="72df90bea6566c5e843c2301ba4dd6e1"/></dir><dir name="Customer"><file name="Attributes.php" hash="1e940ae61c568d83bc541b0fb8e87de1"/></dir><dir name="Layout"><file name="Layout.php" hash="18ab5c014f802bea1f6a841d062439ac"/><file name="Pages.php" hash="5e443f0c91329db385bc3d3b4e945c22"/></dir></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="GravityController.php" hash="2cf4ec00578e6c9968df13f65fdbbd84"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="91c9644e779d2dcbfced9869d5b7dd95"/><file name="config.xml" hash="b116604db1e638dad801d9d8479b0d91"/><file name="system.xml" hash="cf35a07de1996cb2fdd575f55e554935"/><file name="widget.xml" hash="9662aa456d8dcf6b38503944427c247e"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="me"><dir name="gravity"><dir name="catalog"><dir name="category"><dir name="boxes"><file name="default.phtml" hash="eda2c9883b7546a65bb085cbc9851447"/><file name="sidebar.phtml" hash="ad1ef8ff38a567d613d6df2fe1e61351"/></dir></dir><dir name="product"><dir name="view"><dir name="boxes"><file name="default.phtml" hash="45f1a4e14c8973b5338db866af836a2c"/><file name="sidebar.phtml" hash="63cfb176b76f272dfe3fd0fc18497d02"/></dir><dir name="js"><file name="gravity.phtml" hash="0b1a275b2cf0bc1b2cbee01f598d8d8e"/></dir></dir></dir></dir><dir name="catalogsearch"><dir name="advanced"><dir name="js"><file name="gravity.phtml" hash="4d83e2b1c0f9afec8f854f38d624c047"/></dir></dir><dir name="boxes"><file name="default.phtml" hash="42f09523625f41fae85fff9d09a4e9a5"/><file name="sidebar.phtml" hash="dbbbf928f09e0a7127e8a105bffe95bd"/></dir><dir name="js"><file name="gravity.phtml" hash="807b3df54dc86d0dbf79514d343f9c76"/></dir></dir><dir name="checkout"><dir name="cart"><dir name="boxes"><file name="default.phtml" hash="b5c21bd7143599bcb0bc07c9de0da2f5"/><file name="sidebar.phtml" hash="65cce0eecb91c75ab13c73670cc54253"/></dir></dir></dir><dir name="general"><dir name="boxes"><file name="default.phtml" hash="5b6c62685bfaf9cb3cb5ee3bdb269cdc"/><file name="sidebar.phtml" hash="19d65f6dee86527c22653000d2c4a441"/></dir></dir><dir name="page"><dir name="js"><file name="body-end.phtml" hash="5b642b64e8bb15d8bfe23b13400a7e63"/><file name="gravity.phtml" hash="c8aed3ec9f69f27d968658663edb057b"/></dir></dir><dir name="widget"><dir name="boxes"><file name="widget.phtml" hash="101ad504c26e31f7c0de32ff7b013bab"/></dir></dir></dir></dir></dir><dir name="layout"><dir name="me"><file name="gravity.xml" hash="47f5ea1f53290cfd3f6a48bd2c64a7fc"/></dir></dir></dir></dir><dir name="rwd"><dir name="default"><dir name="template"><dir name="me"><dir name="gravity"><dir name="catalog"><dir name="category"><dir name="boxes"><file name="default.phtml" hash="b3bd837ffb622c8c7163a4e3993104ca"/><file name="sidebar.phtml" hash="6bf41ed9c9bcd53432096c406453a462"/></dir></dir><dir name="product"><dir name="view"><dir name="boxes"><file name="default.phtml" hash="a49be0589c25ee62e72c1aeda6006c74"/><file name="sidebar.phtml" hash="b665b51090c6ec95af587cce0143d7e9"/></dir></dir></dir></dir><dir name="catalogsearch"><dir name="boxes"><file name="default.phtml" hash="8e83769eec038539c52247dcfd382c9f"/><file name="sidebar.phtml" hash="467a06716cf0cef4b3cf46e4feda77d2"/></dir></dir><dir name="checkout"><dir name="cart"><dir name="boxes"><file name="default.phtml" hash="f85c6f7aeb721e342e4da691849ef9c3"/><file name="sidebar.phtml" hash="265075974a3c2e16f37f42675fd689c7"/></dir></dir></dir><dir name="general"><dir name="boxes"><file name="default.phtml" hash="e9294af9142139744e9f9dcf69e73c62"/><file name="sidebar.phtml" hash="19d65f6dee86527c22653000d2c4a441"/></dir></dir><dir name="widget"><dir name="boxes"><file name="widget.phtml" hash="14606716bc55ce6e1223f53b2eb4ab43"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="me"><dir name="gravity"><dir name="system"><dir name="config"><dir name="form"><file name="test.phtml" hash="d9d972a23b04a34ab5f4d70a732d65b3"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="me"><dir name="gravity"><file name="gravity.css" hash="c2c4c7d30bced9a311c98032e38e0e11"/></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Me_Gravity.csv" hash="cf7233d08a92c8891d62c60b000953c4"/></dir></target></contents>
18
  <compatible/>
19
  <dependencies><required><php><min>5.3.0</min><max>5.6.4</max></php></required></dependencies>
20
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Me_Gravity</name>
4
+ <version>1.0.0.9</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.gravityrd.com/">Gravity R&amp;D, Ltd.</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>The Gravity Recommendation extension provides an interface between Magento web shop and Gravity Recommendation service. The communication based on PHP or Javascript API providing by Gravity service. </summary>
10
  <description>The Gravity Recommendation extension provides an interface between Magento web shop and Gravity Recommendation service. The communication based on PHP or Javascript API providing by Gravity service. The extension responsible for displaying recommendation boxes with products using Magento templates or Gravity based templates. The boxes contains the web shop products offered by the other side, and also sends information for Gravity service to provided proper analysis of users behaviors. It also able to export products catalog and customers for Gravity service using the extension configuration panel, or run daily scheduled export by cron job.</description>
11
+ <notes>Version number: 1.0.0.9&#xD;
12
  Stability: Stable&#xD;
13
  Compatibility: CE 1.6.x, 1.7.x, 1.8.x, 1.9.x </notes>
14
  <authors><author><name>Gravity Recommendations</name><user>gravity_rd</user><email>web-integration@gravityrd.com</email></author></authors>
15
+ <date>2015-05-25</date>
16
+ <time>11:03:08</time>
17
+ <contents><target name="mageetc"><dir name="modules"><file name="Me_Gravity.xml" hash="a385bf72a5c2f0f040d2bb0850ca0b7c"/></dir></target><target name="magecommunity"><dir name="Me"><dir name="Gravity"><dir name="Block"><file name="Abstract.php" hash="586409500493a209ba021f8d471c793c"/><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><file name="Catalog.php" hash="6adcc355986762d7cc19f854c5fdd067"/><file name="Customer.php" hash="50336da73ad37e3895f82980387f6970"/><file name="Test.php" hash="07d7fce9dd15eb623918d6f01505cc32"/></dir></dir></dir></dir><dir name="Catalog"><dir name="Category"><dir name="Boxes"><file name="Category.php" hash="0e9338d55a16ddde3ae30d14695e799d"/><file name="Personal.php" hash="7ac0315f48df1a3262fc06f33d46228a"/><file name="Top.php" hash="1e44870ec677da107bed26542233ab6b"/></dir></dir><dir name="Product"><dir name="View"><dir name="Boxes"><file name="Accessories.php" hash="f118fa14b7c457985c1e9b6b96f08f2e"/><file name="Personal.php" hash="1f2af5e09efad11f36c5a08de3861aee"/><file name="Product.php" hash="f7e66be937ec442e47c7dd4d3024d7df"/><file name="Similar.php" hash="47011f4c56d0bd7d9de7e159f9aeb9bb"/></dir><dir name="Js"><file name="Gravity.php" hash="cba4e59a726e2ff10d746748731ac35e"/></dir></dir></dir></dir><dir name="Catalogsearch"><dir name="Advanced"><dir name="Js"><file name="Gravity.php" hash="a37130181b430d057fa2dcb76de0ff60"/></dir></dir><dir name="Boxes"><file name="Result.php" hash="1c59e5b53cbef273f6cb7cd3448aa45b"/></dir><dir name="Js"><file name="Gravity.php" hash="d065f4ef6555312988c2e165621ea2a8"/></dir></dir><dir name="Checkout"><dir name="Cart"><dir name="Boxes"><file name="Cart.php" hash="b720e576c5123f9d52ee98807cb7ac36"/></dir></dir></dir><dir name="General"><dir name="Boxes"><file name="Best.php" hash="079eabb3dbfb2167eb9b0f9497fc37b0"/><file name="History.php" hash="85e0c22619328f8d0f03dfbcb5111709"/><file name="Others.php" hash="02c2cb071acbf74ce31a545c32c69f06"/><file name="Popular.php" hash="15ceca807386ffc3c384e393e4af7244"/></dir></dir><dir name="Page"><dir name="Js"><file name="Gravity.php" hash="26944607e33371fb1f56fca8e3d41aa3"/></dir></dir><file name="Recommendation.php" hash="7de37448b8fbd617a4c714d8fbbdfed3"/><dir name="Widget"><dir name="Boxes"><file name="Widget.php" hash="17560f25437bf04f2f8069b1aeee010e"/></dir></dir></dir><dir name="Helper"><file name="Boxes.php" hash="e321d569b2d6e6ff64e2ae33180b7509"/><file name="Data.php" hash="6e583dd37cadba6c986ad08dda77ae34"/></dir><dir name="Model"><dir name="Client"><file name="GravityClient.php" hash="0294939e272568ffd118db005d15563d"/></dir><file name="Customers.php" hash="7399f7fb93965a3c67f5e2c941209ffe"/><dir name="Export"><file name="Abstract.php" hash="9f42701355b6bb288b4ead0eadcf19f0"/><dir name="Catalog"><file name="Product.php" hash="febaee9a21632ed127624adba95ef1ee"/></dir><dir name="Customer"><file name="Customer.php" hash="d3577acc08cd3004ccfb865232eebb9c"/></dir></dir><dir name="Method"><file name="Abstract.php" hash="c907e89db6238c5001cf653b31afa56e"/><file name="Request.php" hash="7a7d5dce5e55a961df28e18b67dc50dc"/></dir><file name="Observer.php" hash="4dca95a8440ed92084592b219396ca9f"/><file name="Products.php" hash="576c47e7977d9ae0a8d9700d38f6eb17"/><dir name="System"><dir name="Config"><dir name="Backend"><dir name="Catalog"><file name="Cron.php" hash="395fbd5f3d41223a336057b5bba6f4cc"/></dir></dir><dir name="Source"><dir name="Catalog"><file name="Attributes.php" hash="72df90bea6566c5e843c2301ba4dd6e1"/></dir><dir name="Customer"><file name="Attributes.php" hash="1e940ae61c568d83bc541b0fb8e87de1"/></dir><dir name="Layout"><file name="Layout.php" hash="18ab5c014f802bea1f6a841d062439ac"/><file name="Pages.php" hash="5e443f0c91329db385bc3d3b4e945c22"/></dir></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="GravityController.php" hash="c6237b4322d5a7a33d191789325b8036"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="91c9644e779d2dcbfced9869d5b7dd95"/><file name="config.xml" hash="ad9d9de83123f56946a8a4f37ad6ff08"/><file name="system.xml" hash="cf35a07de1996cb2fdd575f55e554935"/><file name="widget.xml" hash="9662aa456d8dcf6b38503944427c247e"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="me"><dir name="gravity"><dir name="catalog"><dir name="category"><dir name="boxes"><file name="default.phtml" hash="767fe3f58ab7398d38e5e9a0610b7e9b"/><file name="sidebar.phtml" hash="07624b8f1c51740734961788c8d1d4c1"/></dir></dir><dir name="product"><dir name="view"><dir name="boxes"><file name="default.phtml" hash="e6c523725a96b738a5f8586d7a3e8cf5"/><file name="sidebar.phtml" hash="7fc068d92da4d133929bf345a16f2bc3"/></dir><dir name="js"><file name="gravity.phtml" hash="21b1752933f49d4fdf77c1dff3e8accb"/></dir></dir></dir></dir><dir name="catalogsearch"><dir name="advanced"><dir name="js"><file name="gravity.phtml" hash="ed37b5368abb0e5e1fddaf7d94f1634f"/></dir></dir><dir name="boxes"><file name="default.phtml" hash="600f331b3ef8772b652cc7fcde0270d6"/><file name="sidebar.phtml" hash="f9b64de7698f8d5a30da7dda56ef8f1d"/></dir><dir name="js"><file name="gravity.phtml" hash="a77756580b0a6577f9431194e88ce0f3"/></dir></dir><dir name="checkout"><dir name="cart"><dir name="boxes"><file name="default.phtml" hash="20aedc8eed8ab7e4c139f06cd6c0266f"/><file name="sidebar.phtml" hash="1b1f4c63788bfc9f9e338f664c50af64"/></dir></dir></dir><dir name="general"><dir name="boxes"><file name="default.phtml" hash="aa41e16c11bfd37f4bf56a2a21967980"/><file name="sidebar.phtml" hash="0566509571da516c033e081009d007e9"/></dir></dir><dir name="page"><dir name="js"><file name="body-end.phtml" hash="5b642b64e8bb15d8bfe23b13400a7e63"/><file name="gravity.phtml" hash="c8aed3ec9f69f27d968658663edb057b"/></dir></dir><dir name="widget"><dir name="boxes"><file name="widget.phtml" hash="80fd5994cde6c34f862e2850caa2beb1"/></dir></dir></dir></dir></dir><dir name="layout"><dir name="me"><file name="gravity.xml" hash="47f5ea1f53290cfd3f6a48bd2c64a7fc"/></dir></dir></dir></dir><dir name="rwd"><dir name="default"><dir name="template"><dir name="me"><dir name="gravity"><dir name="catalog"><dir name="category"><dir name="boxes"><file name="default.phtml" hash="ea2934a0f784adff2bf09d5e86653968"/><file name="sidebar.phtml" hash="f5ba9de470ce1f18720ccabe8cff5316"/></dir></dir><dir name="product"><dir name="view"><dir name="boxes"><file name="default.phtml" hash="3c27be164e795fb7077c27006dde739a"/><file name="sidebar.phtml" hash="ef52c04a0b0251c23bce81f871181910"/></dir></dir></dir></dir><dir name="catalogsearch"><dir name="boxes"><file name="default.phtml" hash="8dc241f668fad3b36e1a26d8c3b01802"/><file name="sidebar.phtml" hash="6aa688d961dfc9818001ae39866a4992"/></dir></dir><dir name="checkout"><dir name="cart"><dir name="boxes"><file name="default.phtml" hash="c81b3af4fe4fc03444da83f7416d0fc7"/><file name="sidebar.phtml" hash="d78a9160cbeded38e6a989eefe3c3753"/></dir></dir></dir><dir name="general"><dir name="boxes"><file name="default.phtml" hash="aaa00a090cef33df9d882edfd6dadc9f"/><file name="sidebar.phtml" hash="0566509571da516c033e081009d007e9"/></dir></dir><dir name="widget"><dir name="boxes"><file name="widget.phtml" hash="41552aa04ba7810eada0706a8ee7f5ec"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="me"><dir name="gravity"><dir name="system"><dir name="config"><dir name="form"><file name="test.phtml" hash="d9d972a23b04a34ab5f4d70a732d65b3"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="me"><dir name="gravity"><file name="gravity.css" hash="c2c4c7d30bced9a311c98032e38e0e11"/></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Me_Gravity.csv" hash="cf7233d08a92c8891d62c60b000953c4"/></dir></target></contents>
18
  <compatible/>
19
  <dependencies><required><php><min>5.3.0</min><max>5.6.4</max></php></required></dependencies>
20
  </package>