epoqRS - Version 1.2.9

Version Notes

- export all categories of product
- minor bugfixes

Download this release

Release Info

Developer Flagbit GmbH
Extension epoqRS
Version 1.2.9
Comparing to
See all releases


Code changes from version 1.2.8 to 1.2.9

app/code/community/Flagbit/EpoqInterface/Block/Export/Productlist.php CHANGED
@@ -18,7 +18,7 @@
18
  class Flagbit_EpoqInterface_Block_Export_Productlist extends Flagbit_EpoqInterface_Block_Abstract
19
  {
20
 
21
-
22
  /**
23
  * Product Type Instances singletons
24
  *
@@ -33,25 +33,25 @@ class Flagbit_EpoqInterface_Block_Export_Productlist extends Flagbit_EpoqInterfa
33
  */
34
  protected function _toHtml()
35
  {
36
- // create XML Object
37
- $xmlObj = new DOMDocument("1.0", "UTF-8");
38
- $xmlObj->formatOutput = true;
39
-
40
- // add RSS Element and Namespace
41
- $elemRss = $xmlObj->createElement( 'rss' );
42
- $elemRss->setAttribute ( 'version' , '2.0' );
43
- $elemRss->setAttribute ( 'xmlns:g' , 'http://base.google.com/ns/1.0' );
44
- $elemRss->setAttribute ( 'xmlns:e' , 'http://base.google.com/cns/1.0' );
45
- $elemRss->setAttribute ( 'xmlns:c' , 'http://base.google.com/cns/1.0' );
46
- $elemRss->setAttribute ( 'magento' , Mage::getVersion() );
47
- $elemRss->setAttribute ( 'epoq' , (string) Mage::getConfig()->getNode()->modules->Flagbit_EpoqInterface->version );
48
- $xmlObj->appendChild( $elemRss );
49
-
50
- // add Channel Element
51
- $elemChannel = $xmlObj->createElement( 'channel' );
52
- $elemRss->appendChild( $elemChannel );
53
-
54
- // get Products
55
  $product = Mage::getModel('catalog/product');
56
 
57
  /*@var $products Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection */
@@ -68,7 +68,7 @@ class Flagbit_EpoqInterface_Block_Export_Productlist extends Flagbit_EpoqInterfa
68
 
69
  // split Export in Parts
70
  if($this->getRequest()->getParam('part')){
71
- $products->getSelect()->limitPage($this->getRequest()->getParam('part', 1), $this->getRequest()->getParam('limit', 1000));
72
  }
73
 
74
  Mage::helper('epoqinterface/debug')->log('Export select query: '.(string) $products->getSelect());
@@ -88,7 +88,7 @@ class Flagbit_EpoqInterface_Block_Export_Productlist extends Flagbit_EpoqInterfa
88
  $this->addNewItemXmlCallback(array('product' => $product, 'xmlObj' => $xmlObj));
89
  }
90
 
91
- return $xmlObj->saveXML();
92
  }
93
 
94
  /**
@@ -103,27 +103,32 @@ class Flagbit_EpoqInterface_Block_Export_Productlist extends Flagbit_EpoqInterfa
103
  $this->setData('product', $product);
104
 
105
  // reset time limit
106
- @set_time_limit(30);
107
 
108
  /*@var $product Mage_Catalog_Model_Product */
109
- $product->setData($args['row']);
110
- $product->load($product->getId());
111
 
112
  $this->setProductTypeInstance($product);
113
 
114
  $parentProduct = array();
115
  if(method_exists($product, 'getParentProductIds')){
116
- $product->loadParentProductIds();
117
- $parentProduct = $product->getParentProductIds();
118
  } elseif (method_exists($product, 'getParentIdsByChild')) {
119
  $objConfigurableProduct = Mage::getModel('catalog/product_type_configurable');
120
  $parentProduct = $objConfigurableProduct->getParentIdsByChild($product);
121
  }
122
 
123
- // get Productcategory
124
- $category = $product->getCategoryCollection()->load()->getFirstItem();
125
- $this->setData('category', $category);
126
-
 
 
 
 
 
 
127
  /*@var $xmlObj DOMDocument*/
128
  $xmlObj = $args['xmlObj'];
129
 
@@ -131,50 +136,50 @@ class Flagbit_EpoqInterface_Block_Export_Productlist extends Flagbit_EpoqInterfa
131
  $elemItem = $xmlObj->createElement('item');
132
 
133
  $data = array(
134
- 'title' => $product->getName(),
135
- 'link' => $product->getProductUrl(),
136
 
137
- // g Namespace
138
- 'g:entity_id' => $product->getId(),
139
- 'g:id' => $product->getData(Mage::helper('epoqinterface')->getIdFieldName()),
140
- 'description' => $product->getShortDescription(),
141
- 'g:price' => $this->getProductPrice($product),
142
- 'g:image_link' => (string) $this->helper('catalog/image')->init($product, 'image'),
143
- 'g:product_type'=> implode('>', $this->getCategoryPath(true)),
144
- 'g:brand' => is_object($this->getProduct()->getResource()
145
- ->getAttribute('manufacturer')) ? $this->getProduct()->getAttributeText('manufacturer') : '',
146
- 'g:upc' => $this->getProduct()->getSku(),
147
- 'g:quantity' => $this->getProduct()->isSaleable(),
148
- 'g:visibility' => $this->getProduct()->getVisibility(),
149
 
150
- // e Namespace
151
- 'e:locakey' => substr(Mage::getSingleton('core/locale')->getLocale(), 0, 2),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
152
 
153
- // c Namespace
154
- 'c:mgtproducttype' => $product->getTypeId(),
155
-
156
- );
157
-
158
-
159
-
160
- // set Product variant
161
- if(isset($parentProduct[0])){
162
- $data['e:variant_of'] = $parentProduct[0];
163
- $data['c:mgt_parents'] = implode(';', $parentProduct);
164
- }
165
- if($product->isConfigurable()
166
- && $product->getTypeInstance(true) instanceof Mage_Catalog_Model_Product_Type_Configurable){
167
- $data['e:variants_id'] = implode(';', $this->_getVariantIds($product));
168
- $data['e:variants_sku'] = implode(';', $this->_getVariantIds($product, 'sku'));
169
- }
170
-
171
- // add Product Attributes
172
- $attributes = $this->getProductAttributes();
173
- foreach($attributes as $key => $value){
174
- $data['c:'.$key] = $value;
175
- }
176
-
177
- // translate array to XML
178
  $this->dataToXml($data, 'data', $elemItem, $xmlObj);
179
 
180
  // add Product to Channel Element
@@ -209,18 +214,16 @@ class Flagbit_EpoqInterface_Block_Export_Productlist extends Flagbit_EpoqInterfa
209
  */
210
  protected function _getVariantIds($product, $type = 'id'){
211
 
212
- $childProducts = $product->getTypeInstance(true)->getUsedProducts(null, $product);
213
- $childProductIds = array();
214
- foreach((array) $childProducts as $childProduct){
215
- if ($childProduct->isSaleable()) {
216
- if ($type == 'id') {
217
- $childProductIds[] = $childProduct->getId();
218
- } else {
219
- $childProductIds[] = $childProduct->getSku();
220
- }
221
- }
222
- }
223
- return $childProductIds;
224
  }
225
 
226
  /**
@@ -230,7 +233,7 @@ class Flagbit_EpoqInterface_Block_Export_Productlist extends Flagbit_EpoqInterfa
230
  */
231
  public function getProduct()
232
  {
233
- return $this->getData('product');
234
  }
235
 
236
 
@@ -241,72 +244,72 @@ class Flagbit_EpoqInterface_Block_Export_Productlist extends Flagbit_EpoqInterfa
241
  */
242
  public function getCategory()
243
  {
244
- return $this->getData('category');
245
  }
246
 
247
 
248
- /**
249
- * The main function for converting to an XML document.
250
- * Pass in a multi dimensional array and this recrusively loops through and builds up an XML document.
251
- *
252
- * @param array $data
253
- * @param string $rootNodeName - what you want the root node to be - defaultsto data.
254
- * @param DomElement $elem - should only be used recursively
255
- * @param DOMDocument $xml - should only be used recursively
256
- * @return object DOMDocument
257
- */
258
- protected function dataToXml($data, $rootNodeName = 'data', $elem=null, $xml=null)
259
- {
260
-
261
- if ($xml === null)
262
- {
263
- $xml = new DOMDocument("1.0", "UTF-8");
264
- $xml->formatOutput = true;
265
- $elem = $xml->createElement( $rootNodeName );
266
- $xml->appendChild( $elem );
267
- }
268
-
269
- // loop through the data passed in.
270
- foreach($data as $key => $value)
271
- {
272
- // no numeric keys in our xml please!
273
- if (is_numeric($key))
274
- {
275
- // make string key...
276
- $key = "node_". (string) $key;
277
- }
278
-
279
- // replace anything not alpha numeric
280
- $key = preg_replace('/[^a-z0-9\_\:]/i', '', $key);
281
-
282
- // if there is another array found recrusively call this function
283
- if (is_array($value))
284
- {
285
- $subelem = $xml->createElement( $key );
286
- $elem->appendChild( $subelem);
287
-
288
- // recrusive call.
289
- $this->DataToXml($value, $rootNodeName, $subelem, $xml);
290
- }
291
- else
292
- {
293
- $subelem = $xml->createElement( $key );
294
- $subelem->appendChild(
295
- (
296
- strpos($value, '<')
297
- or strpos($value, '>')
298
- or strpos($value, '&')
299
- )
300
- ? $xml->createCDATASection( $value )
301
- : $xml->createTextNode( $value )
302
- );
303
- $elem->appendChild( $subelem );
304
 
305
- }
306
- }
307
-
308
- // pass back as DOMDocument object
309
- return $xml;
310
- }
311
 
312
  }
18
  class Flagbit_EpoqInterface_Block_Export_Productlist extends Flagbit_EpoqInterface_Block_Abstract
19
  {
20
 
21
+
22
  /**
23
  * Product Type Instances singletons
24
  *
33
  */
34
  protected function _toHtml()
35
  {
36
+ // create XML Object
37
+ $xmlObj = new DOMDocument("1.0", "UTF-8");
38
+ $xmlObj->formatOutput = true;
39
+
40
+ // add RSS Element and Namespace
41
+ $elemRss = $xmlObj->createElement( 'rss' );
42
+ $elemRss->setAttribute ( 'version' , '2.0' );
43
+ $elemRss->setAttribute ( 'xmlns:g' , 'http://base.google.com/ns/1.0' );
44
+ $elemRss->setAttribute ( 'xmlns:e' , 'http://base.google.com/cns/1.0' );
45
+ $elemRss->setAttribute ( 'xmlns:c' , 'http://base.google.com/cns/1.0' );
46
+ $elemRss->setAttribute ( 'magento' , Mage::getVersion() );
47
+ $elemRss->setAttribute ( 'epoq' , (string) Mage::getConfig()->getNode()->modules->Flagbit_EpoqInterface->version );
48
+ $xmlObj->appendChild( $elemRss );
49
+
50
+ // add Channel Element
51
+ $elemChannel = $xmlObj->createElement( 'channel' );
52
+ $elemRss->appendChild( $elemChannel );
53
+
54
+ // get Products
55
  $product = Mage::getModel('catalog/product');
56
 
57
  /*@var $products Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection */
68
 
69
  // split Export in Parts
70
  if($this->getRequest()->getParam('part')){
71
+ $products->getSelect()->limitPage($this->getRequest()->getParam('part', 1), $this->getRequest()->getParam('limit', 1000));
72
  }
73
 
74
  Mage::helper('epoqinterface/debug')->log('Export select query: '.(string) $products->getSelect());
88
  $this->addNewItemXmlCallback(array('product' => $product, 'xmlObj' => $xmlObj));
89
  }
90
 
91
+ return $xmlObj->saveXML();
92
  }
93
 
94
  /**
103
  $this->setData('product', $product);
104
 
105
  // reset time limit
106
+ @set_time_limit(30);
107
 
108
  /*@var $product Mage_Catalog_Model_Product */
109
+ $product->load($product->getId());
 
110
 
111
  $this->setProductTypeInstance($product);
112
 
113
  $parentProduct = array();
114
  if(method_exists($product, 'getParentProductIds')){
115
+ $product->loadParentProductIds();
116
+ $parentProduct = $product->getParentProductIds();
117
  } elseif (method_exists($product, 'getParentIdsByChild')) {
118
  $objConfigurableProduct = Mage::getModel('catalog/product_type_configurable');
119
  $parentProduct = $objConfigurableProduct->getParentIdsByChild($product);
120
  }
121
 
122
+ // get Productcategories
123
+ $categories = $product->getCategoryCollection()->load();
124
+
125
+ $categoryPaths = array();
126
+ // get path for each category
127
+ foreach ($categories as $category) {
128
+ $this->setData('category', $category);
129
+ $categoryPaths[] = implode('>', $this->getCategoryPath(true));
130
+ }
131
+
132
  /*@var $xmlObj DOMDocument*/
133
  $xmlObj = $args['xmlObj'];
134
 
136
  $elemItem = $xmlObj->createElement('item');
137
 
138
  $data = array(
139
+ 'title' => $product->getName(),
140
+ 'link' => $product->getProductUrl(),
141
 
142
+ // g Namespace
143
+ 'g:entity_id' => $product->getId(),
144
+ 'g:id' => $product->getData(Mage::helper('epoqinterface')->getIdFieldName()),
145
+ 'description' => $product->getShortDescription(),
146
+ 'g:price' => $this->getProductPrice($product),
147
+ 'g:image_link' => (string) $this->helper('catalog/image')->init($product, 'image'),
148
+ 'g:product_type' => implode('|', $categoryPaths),
149
+ 'g:brand' => is_object($this->getProduct()->getResource()
150
+ ->getAttribute('manufacturer')) ? $this->getProduct()->getAttributeText('manufacturer') : '',
151
+ 'g:upc' => $this->getProduct()->getSku(),
152
+ 'g:quantity' => $this->getProduct()->isSaleable(),
153
+ 'g:visibility' => $this->getProduct()->getVisibility(),
154
 
155
+ // e Namespace
156
+ 'e:locakey' => substr(Mage::getSingleton('core/locale')->getLocale(), 0, 2),
157
+
158
+ // c Namespace
159
+ 'c:mgtproducttype' => $product->getTypeId(),
160
+
161
+ );
162
+
163
+
164
+
165
+ // set Product variant
166
+ if(isset($parentProduct[0])){
167
+ $data['e:variant_of'] = $parentProduct[0];
168
+ $data['c:mgt_parents'] = implode(';', $parentProduct);
169
+ }
170
+ if($product->isConfigurable()
171
+ && $product->getTypeInstance(true) instanceof Mage_Catalog_Model_Product_Type_Configurable){
172
+ $data['e:variants_id'] = implode(';', $this->_getVariantIds($product));
173
+ $data['e:variants_sku'] = implode(';', $this->_getVariantIds($product, 'sku'));
174
+ }
175
+
176
+ // add Product Attributes
177
+ $attributes = $this->getProductAttributes();
178
+ foreach($attributes as $key => $value){
179
+ $data['c:'.$key] = $value;
180
+ }
181
 
182
+ // translate array to XML
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
  $this->dataToXml($data, 'data', $elemItem, $xmlObj);
184
 
185
  // add Product to Channel Element
214
  */
215
  protected function _getVariantIds($product, $type = 'id'){
216
 
217
+ $childProducts = $product->getTypeInstance(true)->getUsedProducts(null, $product);
218
+ $childProductIds = array();
219
+ foreach((array) $childProducts as $childProduct){
220
+ if ($type == 'id') {
221
+ $childProductIds[] = $childProduct->getId();
222
+ } else {
223
+ $childProductIds[] = $childProduct->getSku();
224
+ }
225
+ }
226
+ return $childProductIds;
 
 
227
  }
228
 
229
  /**
233
  */
234
  public function getProduct()
235
  {
236
+ return $this->getData('product');
237
  }
238
 
239
 
244
  */
245
  public function getCategory()
246
  {
247
+ return $this->getData('category');
248
  }
249
 
250
 
251
+ /**
252
+ * The main function for converting to an XML document.
253
+ * Pass in a multi dimensional array and this recrusively loops through and builds up an XML document.
254
+ *
255
+ * @param array $data
256
+ * @param string $rootNodeName - what you want the root node to be - defaultsto data.
257
+ * @param DomElement $elem - should only be used recursively
258
+ * @param DOMDocument $xml - should only be used recursively
259
+ * @return object DOMDocument
260
+ */
261
+ protected function dataToXml($data, $rootNodeName = 'data', $elem=null, $xml=null)
262
+ {
263
+
264
+ if ($xml === null)
265
+ {
266
+ $xml = new DOMDocument("1.0", "UTF-8");
267
+ $xml->formatOutput = true;
268
+ $elem = $xml->createElement( $rootNodeName );
269
+ $xml->appendChild( $elem );
270
+ }
271
+
272
+ // loop through the data passed in.
273
+ foreach($data as $key => $value)
274
+ {
275
+ // no numeric keys in our xml please!
276
+ if (is_numeric($key))
277
+ {
278
+ // make string key...
279
+ $key = "node_". (string) $key;
280
+ }
281
+
282
+ // replace anything not alpha numeric
283
+ $key = preg_replace('/[^a-z0-9\_\:]/i', '', $key);
284
+
285
+ // if there is another array found recrusively call this function
286
+ if (is_array($value))
287
+ {
288
+ $subelem = $xml->createElement( $key );
289
+ $elem->appendChild( $subelem);
290
+
291
+ // recrusive call.
292
+ $this->DataToXml($value, $rootNodeName, $subelem, $xml);
293
+ }
294
+ else
295
+ {
296
+ $subelem = $xml->createElement( $key );
297
+ $subelem->appendChild(
298
+ (
299
+ strpos($value, '<')
300
+ or strpos($value, '>')
301
+ or strpos($value, '&')
302
+ )
303
+ ? $xml->createCDATASection( $value )
304
+ : $xml->createTextNode( $value )
305
+ );
306
+ $elem->appendChild( $subelem );
307
 
308
+ }
309
+ }
310
+
311
+ // pass back as DOMDocument object
312
+ return $xml;
313
+ }
314
 
315
  }
app/code/community/Flagbit/EpoqInterface/Block/Track/User.php CHANGED
@@ -1,56 +1,56 @@
1
- <?php
2
- /* *
3
- * This script is part of the epoq Recommendation Service project *
4
- * *
5
- * epoqinterface is free software; you can redistribute it and/or modify *
6
- * it under the terms of the GNU General Public License version 2 as *
7
- * published by the Free Software Foundation. *
8
- * *
9
- * This script is distributed in the hope that it will be useful, but *
10
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- *
11
- * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General *
12
- * Public License for more details. *
13
- * *
14
- * @version $Id: Product.php 583 2010-11-26 10:08:21Z weller $
15
- * @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2
16
- */
17
- class Flagbit_EpoqInterface_Block_Track_User extends Flagbit_EpoqInterface_Block_Abstract
18
- {
19
- /**
20
- * (non-PHPdoc)
21
- * @see Mage_Core_Block_Abstract::_toHtml()
22
- */
23
- protected function _toHtml()
24
- {
25
-
26
- if (!$this->_beforeToHtml()
27
- or !$this->getProduct() instanceof Mage_Catalog_Model_Product) {
28
- return '';
29
- }
30
-
31
- return $this->getJavascriptOutput(
32
- $this->arrayToString(
33
- $this->getParamsArray()
34
- ),
35
- '');
36
- }
37
-
38
- /**
39
- * (non-PHPdoc)
40
- * @see Flagbit_EpoqInterface_Block_Abstract::getParamsArray()
41
- */
42
- protected function getParamsArray(){
43
-
44
- $variables = array(
45
- 'epoq_productId' => '',
46
- 'epoq_d_rules' => Mage::getStoreConfig(Flagbit_EpoqInterface_Block_Abstract::XML_RULE_CUSTOMER),
47
- 'epoq_section' => 'user',
48
- 'epoq_customerId' => Mage::getSingleton('customer/session')->getId(),
49
- );
50
-
51
- return array_merge(parent::getParamsArray(), $variables);
52
- }
53
-
54
-
55
-
56
  }
1
+ <?php
2
+ /* *
3
+ * This script is part of the epoq Recommendation Service project *
4
+ * *
5
+ * epoqinterface is free software; you can redistribute it and/or modify *
6
+ * it under the terms of the GNU General Public License version 2 as *
7
+ * published by the Free Software Foundation. *
8
+ * *
9
+ * This script is distributed in the hope that it will be useful, but *
10
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- *
11
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General *
12
+ * Public License for more details. *
13
+ * *
14
+ * @version $Id: Product.php 583 2010-11-26 10:08:21Z weller $
15
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2
16
+ */
17
+ class Flagbit_EpoqInterface_Block_Track_User extends Flagbit_EpoqInterface_Block_Abstract
18
+ {
19
+ /**
20
+ * (non-PHPdoc)
21
+ * @see Mage_Core_Block_Abstract::_toHtml()
22
+ */
23
+ protected function _toHtml()
24
+ {
25
+
26
+ if (!$this->_beforeToHtml()
27
+ or !$this->getProduct() instanceof Mage_Catalog_Model_Product) {
28
+ return '';
29
+ }
30
+
31
+ return $this->getJavascriptOutput(
32
+ $this->arrayToString(
33
+ $this->getParamsArray()
34
+ ),
35
+ '');
36
+ }
37
+
38
+ /**
39
+ * (non-PHPdoc)
40
+ * @see Flagbit_EpoqInterface_Block_Abstract::getParamsArray()
41
+ */
42
+ protected function getParamsArray(){
43
+
44
+ $variables = array(
45
+ 'epoq_productId' => '',
46
+ 'epoq_d_rules' => Mage::getStoreConfig(Flagbit_EpoqInterface_Block_Abstract::XML_RULE_CUSTOMER),
47
+ 'epoq_section' => 'user',
48
+ 'epoq_customerId' => Mage::getSingleton('customer/session')->getId(),
49
+ );
50
+
51
+ return array_merge(parent::getParamsArray(), $variables);
52
+ }
53
+
54
+
55
+
56
  }
app/code/community/Flagbit/EpoqInterface/controllers/RecommendationController.php CHANGED
@@ -1,28 +1,32 @@
1
  <?php
2
  class Flagbit_EpoqInterface_RecommendationController extends Mage_Core_Controller_Front_Action
3
  {
4
- public function listAction()
5
  {
6
  // indicate the template to load
7
  if (!$section = Mage::app()->getRequest()->getParam('section')) {
8
  $section = 'product';
9
  }
10
-
11
- echo $this->getLayout()->createBlock('epoqinterface/recommendation_ajaxproduct')
12
- ->setProductIds(Mage::app()->getRequest()->getParam('pid'))
13
- ->setTemplate('epoqinterface/recommendation/'.$section.'.phtml')
14
- ->toHtml();
 
 
15
  }
16
-
17
  /**
18
  * list recommendations to use in email. template include inline-css to provide the layout
19
  */
20
- public function maillistAction()
21
- {
22
- echo $this->getLayout()->createBlock('epoqinterface/recommendation_ajaxproduct')
23
- ->setProductIds(Mage::app()->getRequest()->getParam('pid'))
24
- ->setTemplate('epoqinterface/recommendation/mailproduct.phtml')
25
- ->toHtml();
26
- }
27
-
28
- }
 
 
1
  <?php
2
  class Flagbit_EpoqInterface_RecommendationController extends Mage_Core_Controller_Front_Action
3
  {
4
+ public function listAction()
5
  {
6
  // indicate the template to load
7
  if (!$section = Mage::app()->getRequest()->getParam('section')) {
8
  $section = 'product';
9
  }
10
+
11
+ $html = $this->getLayout()->createBlock('epoqinterface/recommendation_ajaxproduct')
12
+ ->setProductIds(Mage::app()->getRequest()->getParam('pid'))
13
+ ->setTemplate('epoqinterface/recommendation/'.$section.'.phtml')
14
+ ->toHtml();
15
+
16
+ $this->getResponse()->setBody($html);
17
  }
18
+
19
  /**
20
  * list recommendations to use in email. template include inline-css to provide the layout
21
  */
22
+ public function maillistAction()
23
+ {
24
+ $html = $this->getLayout()->createBlock('epoqinterface/recommendation_ajaxproduct')
25
+ ->setProductIds(Mage::app()->getRequest()->getParam('pid'))
26
+ ->setTemplate('epoqinterface/recommendation/mailproduct.phtml')
27
+ ->toHtml();
28
+
29
+ $this->getResponse()->setBody($html);
30
+ }
31
+
32
+ }
app/code/community/Flagbit/EpoqInterface/etc/config.xml CHANGED
@@ -20,7 +20,7 @@
20
  <modules>
21
  <Flagbit_EpoqInterface>
22
  <active>true</active>
23
- <version>1.2.8</version>
24
  </Flagbit_EpoqInterface>
25
  </modules>
26
 
20
  <modules>
21
  <Flagbit_EpoqInterface>
22
  <active>true</active>
23
+ <version>1.2.9</version>
24
  </Flagbit_EpoqInterface>
25
  </modules>
26
 
js/epoqinterface/epoq_recommendations.js CHANGED
@@ -1,5 +1,3 @@
1
- jQuery.noConflict();
2
-
3
  function addRecommendationsToPage(recommendationPids, recommendationId, data, section)
4
  {
5
  var recWidgetFromShopURL = epoq_baseUrl + "epoqinterface/recommendation/list?";
@@ -16,10 +14,17 @@ function addRecommendationsToPage(recommendationPids, recommendationId, data, se
16
  cache: false,
17
  success: function(html){
18
  jQuery("#epoqWidget1").append(html); //alter here for auto tracking clicks on recommendations
19
- jQuery("#epoqWidget1 a").each( function()
20
- {
21
- this.href = this.href + "&eqrecqid=" + recommendationId;
22
- });
 
 
 
 
 
 
 
23
  },
24
  reccommands: {}
25
  });
 
 
1
  function addRecommendationsToPage(recommendationPids, recommendationId, data, section)
2
  {
3
  var recWidgetFromShopURL = epoq_baseUrl + "epoqinterface/recommendation/list?";
14
  cache: false,
15
  success: function(html){
16
  jQuery("#epoqWidget1").append(html); //alter here for auto tracking clicks on recommendations
17
+ jQuery("#epoqWidget1 a").each( function()
18
+ {
19
+ if(this.href.indexOf("?") !== -1) {
20
+ this.href+="&";
21
+ } else {
22
+ this.href+="?";
23
+ }
24
+
25
+ this.href += "recommendation_id=" + recommendationId;
26
+ });
27
+
28
  },
29
  reccommands: {}
30
  });
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>epoqRS</name>
4
- <version>1.2.8</version>
5
  <stability>stable</stability>
6
  <license>GPL</license>
7
  <channel>community</channel>
@@ -12,11 +12,12 @@
12
  The quick and easy integration of epoq RS makes your Magento sell more within a few hours. You do not have to submit and update your product data and there is no need to connect to any internal systems - all available information - click stream, product data, cart information - are automatically processed for maximum quality recommendations.&#xD;
13
  &#xD;
14
  Try epoq Recommendation Service - free and without obligation in our 30-day trial version.</description>
15
- <notes>Export Bugfix: Products without images were not exported.</notes>
 
16
  <authors><author><name>FlagbitFlagbit GmbH Co. KG</name><user>flagbit</user><email>magento@flagbit.de</email></author></authors>
17
- <date>2012-10-31</date>
18
- <time>15:43:57</time>
19
- <contents><target name="magecommunity"><dir name="Flagbit"><dir name="EpoqInterface"><dir name="Block"><file name="Abstract.php" hash="8d96815ddd6899c68bb127d1314276c5"/><dir name="Export"><file name="Productlist.php" hash="577d44c60c9b4c3ed0466cc13d4190f1"/></dir><file name="Head.php" hash="a898e39f4f86c0fcb8555c8d37e7ea2f"/><dir name="Recommendation"><file name="Abstract.php" hash="7fa68d2d34701511f60bbfe22931fd98"/><file name="Ajaxproduct.php" hash="558658147d6227436ff64996798e1fca"/><file name="Cart.php" hash="4bbe3e8abedbf4313db25b941b4f3e51"/><file name="Product.php" hash="94752b4f0837337862bb7d5ad692f21c"/><file name="User.php" hash="27d90f93b2a157bbb999a38136234407"/></dir><file name="Recommendation.php" hash="33875c34bffc6c50b8d894aea542cd63"/><dir name="Result"><file name="List.php" hash="247ba01688e5d9f89cf21fd0d73faf1f"/></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Version.php" hash="71e3964c13333a57929221aa8e2edf07"/></dir></dir></dir></dir><dir name="Track"><file name="Cart.php" hash="401061ad5b1d3bf279019c0803497178"/><file name="Order.php" hash="5280a5644c6fb62493d6853dafb887e5"/><file name="Product.php" hash="fbc499387ab0a20a0e702d4752056218"/><file name="User.php" hash="4f13de8744f15cbb2567b1ec0d1564e8"/></dir></dir><dir name="Helper"><file name="Data.php" hash="9d0d756bce4953b90624ba97ae6c63aa"/><file name="Debug.php" hash="7ab1e3121471d87ee59f02d129f308be"/></dir><dir name="Model"><file name="Abstract.php" hash="6d369b3b01ccaa3c796c37484e95a85f"/><dir name="Container"><file name="Product.php" hash="bb25e96a4159584c9701854d51962e52"/><file name="TrackProduct.php" hash="f95bbb60d7344859f71bd13b22d587c7"/></dir><dir name="Customer"><file name="Profiles.php" hash="fbedb6a3259a29db05b2c8783d02957b"/></dir><file name="Observer.php" hash="fa554bcc512f2c7d3b383b16ce41ebee"/><file name="Order.php" hash="9ff6141bb8a1a8b5070570310e1266e5"/><dir name="Recommendation"><file name="Abstract.php" hash="e7a8846905e453f5880b2362a9bbfe90"/><file name="Cart.php" hash="d46124c4c546c69ea64713e9402d6d25"/><file name="Product.php" hash="0e412fe277f5ef9d3e6a493dbfecc3fd"/><file name="User.php" hash="88e6b07cf2d0ba35441d95bc2d87f3d5"/></dir><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><dir name="Product"><file name="Collection.php" hash="9a302cf7cdfec28370d7c9afa31dac8a"/></dir></dir></dir></dir><file name="Session.php" hash="413f7d31ad2d5878f20a7db7adf5d207"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Attemps.php" hash="c01ebd5c76fd4d51305ed7111326d57d"/><file name="Identifier.php" hash="9e56f688a92a5691a5934e47f42144b6"/><file name="Idletime.php" hash="957ec9d0c4af2d52add60a9765c4e573"/><file name="Timeout.php" hash="95c38625ad50dc44ba2b2d371de1db65"/></dir></dir></dir></dir><dir name="controllers"><file name="IndexController.php" hash="6ea3c2de180540e082f0598133355e69"/><file name="RecommendationController.php" hash="004b36c79f662928170177b14985ec2a"/></dir><dir name="documentation"><file name="epoqRS_Magento Installation Guide 1.2.4.pdf" hash="364abe5d2e44ce8aa31d08384dc54e1a"/></dir><dir name="etc"><file name="cache.xml" hash="7ed329563d8914670ae1ddeb399de34d"/><file name="config.xml" hash="5ee96bf59cd4ff0b5d25bf7dd689653b"/><file name="system.xml" hash="a5d70a49602cd9d14f542d515cde30bb"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Flagbit_EpoqInterface.xml" hash="8ada99bfdbcc7727ad36339bc11da6ec"/></dir></target><target name="magelocale"><dir name="de_DE"><file name="Flagbit_EpoqInterface.csv" hash="222d5eaedfde0639dd26f91c52dc395e"/></dir></target><target name="mageweb"><dir name="js"><dir name="epoqinterface"><file name="epoq_recommendations.js" hash="9797defb9c645a8d4d809c226f29fe26"/><file name="jQuery_init.js" hash="3179f2255b046d5f2e9a71e365287bef"/></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="epoqinterface.xml" hash="444ae31a25a3fc4f9df6e335a5e2e15d"/></dir><dir name="template"><dir name="epoqinterface"><dir name="recommendation"><file name="cart.phtml" hash="91fe1e5178fd79249dade5391952f9fa"/><file name="list.phtml" hash="c6c9c45f81993542dd182abea8c88f43"/><file name="mailproduct.phtml" hash="a81b28b9bee47f9e63a58ef87b7bb898"/><file name="product.phtml" hash="a558cf1a1dec1de784e7f05405dd83be"/><file name="user.phtml" hash="a3e884ce1f8ca6ab5ed4383e43b044d8"/></dir></dir></dir></dir></dir><dir name="default"><dir name="default"><dir name="layout"><file name="epoqinterface.xml" hash="444ae31a25a3fc4f9df6e335a5e2e15d"/></dir><dir name="template"><dir name="epoqinterface"><dir name="recommendation"><file name="cart.phtml" hash="71bd2c1724743d995d31df4b96a24e87"/><file name="list.phtml" hash="92158be9c3dddca88cbd202aab666d39"/><file name="product.phtml" hash="a558cf1a1dec1de784e7f05405dd83be"/><file name="user.phtml" hash="90043a07221d19dcb079b86615eafa3b"/></dir></dir></dir></dir></dir></dir></target></contents>
20
  <compatible/>
21
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
22
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>epoqRS</name>
4
+ <version>1.2.9</version>
5
  <stability>stable</stability>
6
  <license>GPL</license>
7
  <channel>community</channel>
12
  The quick and easy integration of epoq RS makes your Magento sell more within a few hours. You do not have to submit and update your product data and there is no need to connect to any internal systems - all available information - click stream, product data, cart information - are automatically processed for maximum quality recommendations.&#xD;
13
  &#xD;
14
  Try epoq Recommendation Service - free and without obligation in our 30-day trial version.</description>
15
+ <notes>- export all categories of product&#xD;
16
+ - minor bugfixes</notes>
17
  <authors><author><name>FlagbitFlagbit GmbH Co. KG</name><user>flagbit</user><email>magento@flagbit.de</email></author></authors>
18
+ <date>2013-01-31</date>
19
+ <time>10:51:34</time>
20
+ <contents><target name="magecommunity"><dir name="Flagbit"><dir name="EpoqInterface"><dir name="Block"><file name="Abstract.php" hash="8d96815ddd6899c68bb127d1314276c5"/><dir name="Export"><file name="Productlist.php" hash="ca9caa63c95e73ea5deb888c11b10277"/></dir><file name="Head.php" hash="a898e39f4f86c0fcb8555c8d37e7ea2f"/><dir name="Recommendation"><file name="Abstract.php" hash="7fa68d2d34701511f60bbfe22931fd98"/><file name="Ajaxproduct.php" hash="558658147d6227436ff64996798e1fca"/><file name="Cart.php" hash="4bbe3e8abedbf4313db25b941b4f3e51"/><file name="Product.php" hash="94752b4f0837337862bb7d5ad692f21c"/><file name="User.php" hash="27d90f93b2a157bbb999a38136234407"/></dir><file name="Recommendation.php" hash="33875c34bffc6c50b8d894aea542cd63"/><dir name="Result"><file name="List.php" hash="247ba01688e5d9f89cf21fd0d73faf1f"/></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Version.php" hash="71e3964c13333a57929221aa8e2edf07"/></dir></dir></dir></dir><dir name="Track"><file name="Cart.php" hash="401061ad5b1d3bf279019c0803497178"/><file name="Order.php" hash="5280a5644c6fb62493d6853dafb887e5"/><file name="Product.php" hash="fbc499387ab0a20a0e702d4752056218"/><file name="User.php" hash="0d16615628d7df944976db9c3f02bb09"/></dir></dir><dir name="Helper"><file name="Data.php" hash="9d0d756bce4953b90624ba97ae6c63aa"/><file name="Debug.php" hash="7ab1e3121471d87ee59f02d129f308be"/></dir><dir name="Model"><file name="Abstract.php" hash="6d369b3b01ccaa3c796c37484e95a85f"/><dir name="Container"><file name="Product.php" hash="bb25e96a4159584c9701854d51962e52"/><file name="TrackProduct.php" hash="f95bbb60d7344859f71bd13b22d587c7"/></dir><dir name="Customer"><file name="Profiles.php" hash="fbedb6a3259a29db05b2c8783d02957b"/></dir><file name="Observer.php" hash="fa554bcc512f2c7d3b383b16ce41ebee"/><file name="Order.php" hash="9ff6141bb8a1a8b5070570310e1266e5"/><dir name="Recommendation"><file name="Abstract.php" hash="e7a8846905e453f5880b2362a9bbfe90"/><file name="Cart.php" hash="d46124c4c546c69ea64713e9402d6d25"/><file name="Product.php" hash="0e412fe277f5ef9d3e6a493dbfecc3fd"/><file name="User.php" hash="88e6b07cf2d0ba35441d95bc2d87f3d5"/></dir><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><dir name="Product"><file name="Collection.php" hash="9a302cf7cdfec28370d7c9afa31dac8a"/></dir></dir></dir></dir><file name="Session.php" hash="413f7d31ad2d5878f20a7db7adf5d207"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Attemps.php" hash="c01ebd5c76fd4d51305ed7111326d57d"/><file name="Identifier.php" hash="9e56f688a92a5691a5934e47f42144b6"/><file name="Idletime.php" hash="957ec9d0c4af2d52add60a9765c4e573"/><file name="Timeout.php" hash="95c38625ad50dc44ba2b2d371de1db65"/></dir></dir></dir></dir><dir name="controllers"><file name="IndexController.php" hash="6ea3c2de180540e082f0598133355e69"/><file name="RecommendationController.php" hash="a5930a94e2195adb07caac0bcac7cf5f"/></dir><dir name="documentation"><file name="epoqRS_Magento Installation Guide 1.2.4.pdf" hash="364abe5d2e44ce8aa31d08384dc54e1a"/></dir><dir name="etc"><file name="cache.xml" hash="7ed329563d8914670ae1ddeb399de34d"/><file name="config.xml" hash="622a1cdd5176b4cfa95b13cd552fb39c"/><file name="system.xml" hash="a5d70a49602cd9d14f542d515cde30bb"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Flagbit_EpoqInterface.xml" hash="8ada99bfdbcc7727ad36339bc11da6ec"/></dir></target><target name="magelocale"><dir name="de_DE"><file name="Flagbit_EpoqInterface.csv" hash="222d5eaedfde0639dd26f91c52dc395e"/></dir></target><target name="mageweb"><dir name="js"><dir name="epoqinterface"><file name="epoq_recommendations.js" hash="1b460589f83e228683ff2f610dfd13fc"/><file name="jQuery_init.js" hash="3179f2255b046d5f2e9a71e365287bef"/></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="epoqinterface.xml" hash="444ae31a25a3fc4f9df6e335a5e2e15d"/></dir><dir name="template"><dir name="epoqinterface"><dir name="recommendation"><file name="cart.phtml" hash="91fe1e5178fd79249dade5391952f9fa"/><file name="list.phtml" hash="c6c9c45f81993542dd182abea8c88f43"/><file name="mailproduct.phtml" hash="a81b28b9bee47f9e63a58ef87b7bb898"/><file name="product.phtml" hash="a558cf1a1dec1de784e7f05405dd83be"/><file name="user.phtml" hash="a3e884ce1f8ca6ab5ed4383e43b044d8"/></dir></dir></dir></dir></dir><dir name="default"><dir name="default"><dir name="layout"><file name="epoqinterface.xml" hash="444ae31a25a3fc4f9df6e335a5e2e15d"/></dir><dir name="template"><dir name="epoqinterface"><dir name="recommendation"><file name="cart.phtml" hash="71bd2c1724743d995d31df4b96a24e87"/><file name="list.phtml" hash="92158be9c3dddca88cbd202aab666d39"/><file name="product.phtml" hash="a558cf1a1dec1de784e7f05405dd83be"/><file name="user.phtml" hash="90043a07221d19dcb079b86615eafa3b"/></dir></dir></dir></dir></dir></dir></target></contents>
21
  <compatible/>
22
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
23
  </package>