Salesoar_Feed - Version 1.2.8

Version Notes

Bug fixed

Download this release

Release Info

Developer Salesoar
Extension Salesoar_Feed
Version 1.2.8
Comparing to
See all releases


Code changes from version 1.2.7 to 1.2.8

app/code/community/Salesoar/Feed/Block/Config/Advertise.php CHANGED
@@ -10,16 +10,11 @@ class Salesoar_Feed_Block_Config_Advertise
10
  extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
11
 
12
  {
13
-
14
- //protected $_groupRenderer;
15
- //protected $_groupRenderer2;
16
-
17
  protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
18
  {
19
  $html = '
20
  <span class="comment" style="color:red;">If you want to use this option you must choose a specific store of yours. (Top left)</span>';
21
 
22
-
23
  return $html;
24
  }
25
  }
10
  extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
11
 
12
  {
 
 
 
 
13
  protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
14
  {
15
  $html = '
16
  <span class="comment" style="color:red;">If you want to use this option you must choose a specific store of yours. (Top left)</span>';
17
 
 
18
  return $html;
19
  }
20
  }
app/code/community/Salesoar/Feed/Block/Config/TableMapping.php CHANGED
@@ -8,9 +8,7 @@
8
 
9
  class Salesoar_Feed_Block_Config_TableMapping
10
  extends Mage_Adminhtml_Block_System_Config_Form_Field
11
-
12
  {
13
-
14
  protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
15
  {
16
  $html ='';
@@ -80,7 +78,7 @@ class Salesoar_Feed_Block_Config_TableMapping
80
  $resource = Mage::getSingleton('core/resource');
81
  $readConnection = $resource->getConnection('core_read');
82
  $prefix = Mage::getConfig()->getTablePrefix();
83
- $query = 'SELECT * FROM `'.$prefix.'Salesoar_Feed` ';
84
  $results = $readConnection->fetchAll($query);
85
  foreach($results as $item => $value){ //Format array [id_category] => (0 => [google_name], [1] => [google_id])
86
  $arraySalesoar[$value['id_category']][0] = $value['google_name'];
@@ -119,7 +117,7 @@ class Salesoar_Feed_Block_Config_TableMapping
119
  var arraySalesoar = <?php echo $arraySalesoar ?>;
120
  $j("#storeSelect").on("change", function() {
121
  var $array = <?php echo $array ?>;
122
- $j("#salesoar_feed_map_google_categories").append('<table id="addElement" style="width:100%"></table>');
123
  $j("#addElement").html("");
124
  for (i = 0; i < $array[$j(this).val()].length; i++) {
125
  var id = $array[$j(this).val()][i]["value"];
8
 
9
  class Salesoar_Feed_Block_Config_TableMapping
10
  extends Mage_Adminhtml_Block_System_Config_Form_Field
 
11
  {
 
12
  protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
13
  {
14
  $html ='';
78
  $resource = Mage::getSingleton('core/resource');
79
  $readConnection = $resource->getConnection('core_read');
80
  $prefix = Mage::getConfig()->getTablePrefix();
81
+ $query = 'SELECT * FROM `'.$prefix.'salesoar_feed` ';
82
  $results = $readConnection->fetchAll($query);
83
  foreach($results as $item => $value){ //Format array [id_category] => (0 => [google_name], [1] => [google_id])
84
  $arraySalesoar[$value['id_category']][0] = $value['google_name'];
117
  var arraySalesoar = <?php echo $arraySalesoar ?>;
118
  $j("#storeSelect").on("change", function() {
119
  var $array = <?php echo $array ?>;
120
+ $j("#Salesoar_Feed_map_google_categories").append('<table id="addElement" style="width:100%"></table>');
121
  $j("#addElement").html("");
122
  for (i = 0; i < $array[$j(this).val()].length; i++) {
123
  var id = $array[$j(this).val()][i]["value"];
app/code/community/Salesoar/Feed/Model/Atom.php CHANGED
@@ -41,7 +41,7 @@ class Salesoar_Feed_Model_Atom
41
  <updated>%s</updated>
42
  <link rel="self" href="%s" hreflang="%s"/>\n
43
  EOT;
44
- fwrite($this->output, utf8_encode(preg_replace('/[\x00-\x09\x0B\x0C\x0E-\x1F\x7F]/', '', sprintf($format,
45
  $data['charset'],
46
  Salesoar_Feed_Model_Atom::NAMESPACE_TAG_GMERCHANT_FEED,
47
  Salesoar_Feed_Model_Atom::NAMESPACE_URI_GMERCHANT_FEED,
@@ -51,7 +51,7 @@ EOT;
51
  $data['title'],
52
  date("Y-m-d H:i:s"),
53
  $data['link'],
54
- $data['language']))));
55
  }
56
 
57
  public function addLandings($landings_group, $landings) {
@@ -71,9 +71,9 @@ EOT;
71
  }
72
 
73
  public function _addLandingConcept($concept) {
74
- fwrite($this->output, utf8_encode(" <sr:concept>"));
75
- fwrite($this->output, utf8_encode(preg_replace('/[\x00-\x09\x0B\x0C\x0E-\x1F\x7F]/', '', $concept['sr:concept'])));
76
- fwrite($this->output, utf8_encode("</sr:concept>\n"));
77
  }
78
 
79
 
@@ -91,11 +91,11 @@ EOT;
91
  </sr:landing>\n
92
  EOT;
93
  $landing = $landing['sr:landing'];
94
- fwrite($this->output, utf8_encode(preg_replace('/[\x00-\x09\x0B\x0C\x0E-\x1F\x7F]/', '', sprintf($formatBegin, $landing['sr:name']))));
95
  foreach ($landing['sr:concepts'] as $concept) {
96
  $this->_addLandingConcept($concept);
97
  }
98
- fwrite($this->output, utf8_encode(sprintf($formatEnd, $landing['sr:url'])));
99
  }
100
 
101
  public function _addLanding($landing) {
@@ -110,11 +110,11 @@ EOT;
110
  </sr:landing>\n
111
  EOT;
112
  $landing = $landing['sr:landing'];
113
- fwrite($this->output, utf8_encode(preg_replace('/[\x00-\x09\x0B\x0C\x0E-\x1F\x7F]/', '', sprintf($formatBegin, $landing['sr:name']))));
114
  foreach ($landing['sr:concepts'] as $concept) {
115
  $this->_addLandingConcept($concept);
116
  }
117
- fwrite($this->output, utf8_encode(sprintf($formatEnd, $landing['sr:url'])));
118
  }
119
 
120
  public function addEntry($entry) {
@@ -138,7 +138,7 @@ EOT;
138
  </sr:concepts>
139
  </entry>\n
140
  EOT;
141
- fwrite($this->output, utf8_encode(preg_replace('/[\x00-\x09\x0B\x0C\x0E-\x1F\x7F]/', '',sprintf($formatBegin,
142
  $entry['guid'],
143
  $entry['title'],
144
  date("Y-m-d H:i:s"),
@@ -148,11 +148,11 @@ EOT;
148
  $entry['g:product_type'],
149
  $entry['g:price'],
150
  $entry['g:sale_price'],
151
- $entry['g:brand']))));
152
  foreach ($entry['sr:concepts'] as $concept) {
153
  $this->_addConcept($concept);
154
  }
155
- fwrite($this->output, utf8_encode(preg_replace('/[\x00-\x09\x0B\x0C\x0E-\x1F\x7F]/', '', sprintf($formatEnd))));
156
  }
157
  else{
158
  $formatBegin = <<<EOT
@@ -175,7 +175,7 @@ EOT;
175
  </sr:concepts>
176
  </entry>\n
177
  EOT;
178
- fwrite($this->output, utf8_encode(preg_replace('/[\x00-\x09\x0B\x0C\x0E-\x1F\x7F]/', '', sprintf($formatBegin,
179
  $entry['guid'],
180
  $entry['title'],
181
  date("Y-m-d H:i:s"),
@@ -186,27 +186,42 @@ EOT;
186
  $entry['g:product_type'],
187
  $entry['g:price'],
188
  $entry['g:sale_price'],
189
- $entry['g:brand']))));
190
  foreach ($entry['sr:concepts'] as $concept) {
191
  $this->_addConcept($concept);
192
  }
193
- fwrite($this->output, utf8_encode(sprintf($formatEnd)));
194
  }
195
  }
196
 
197
  public function _addConcept($concept) {
198
- $format = <<<EOT
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
199
  <sr:concept>
200
  <sr:name>%s</sr:name>
201
  <sr:value>%s</sr:value>
202
  <sr:label><![CDATA[%s]]></sr:label>
203
  </sr:concept>\n
204
  EOT;
205
- $concept = $concept['sr:concept'];
206
- fwrite($this->output, utf8_encode(preg_replace('/[\x00-\x09\x0B\x0C\x0E-\x1F\x7F]/', '', sprintf($format,
207
- $concept['sr:name'],
208
- $concept['sr:value'],
209
- $concept['sr:label']))));
210
  }
211
 
212
  public function addXMLEnd() {
41
  <updated>%s</updated>
42
  <link rel="self" href="%s" hreflang="%s"/>\n
43
  EOT;
44
+ fwrite($this->output, sprintf($format,
45
  $data['charset'],
46
  Salesoar_Feed_Model_Atom::NAMESPACE_TAG_GMERCHANT_FEED,
47
  Salesoar_Feed_Model_Atom::NAMESPACE_URI_GMERCHANT_FEED,
51
  $data['title'],
52
  date("Y-m-d H:i:s"),
53
  $data['link'],
54
+ $data['language']));
55
  }
56
 
57
  public function addLandings($landings_group, $landings) {
71
  }
72
 
73
  public function _addLandingConcept($concept) {
74
+ fwrite($this->output, " <sr:concept>");
75
+ fwrite($this->output, $concept['sr:concept']);
76
+ fwrite($this->output, "</sr:concept>\n");
77
  }
78
 
79
 
91
  </sr:landing>\n
92
  EOT;
93
  $landing = $landing['sr:landing'];
94
+ fwrite($this->output, sprintf($formatBegin, $landing['sr:name']));
95
  foreach ($landing['sr:concepts'] as $concept) {
96
  $this->_addLandingConcept($concept);
97
  }
98
+ fwrite($this->output, sprintf($formatEnd, $landing['sr:url']));
99
  }
100
 
101
  public function _addLanding($landing) {
110
  </sr:landing>\n
111
  EOT;
112
  $landing = $landing['sr:landing'];
113
+ fwrite($this->output, sprintf($formatBegin, $landing['sr:name']));
114
  foreach ($landing['sr:concepts'] as $concept) {
115
  $this->_addLandingConcept($concept);
116
  }
117
+ fwrite($this->output, sprintf($formatEnd, $landing['sr:url']));
118
  }
119
 
120
  public function addEntry($entry) {
138
  </sr:concepts>
139
  </entry>\n
140
  EOT;
141
+ fwrite($this->output, sprintf($formatBegin,
142
  $entry['guid'],
143
  $entry['title'],
144
  date("Y-m-d H:i:s"),
148
  $entry['g:product_type'],
149
  $entry['g:price'],
150
  $entry['g:sale_price'],
151
+ $entry['g:brand']));
152
  foreach ($entry['sr:concepts'] as $concept) {
153
  $this->_addConcept($concept);
154
  }
155
+ fwrite($this->output, sprintf($formatEnd));
156
  }
157
  else{
158
  $formatBegin = <<<EOT
175
  </sr:concepts>
176
  </entry>\n
177
  EOT;
178
+ fwrite($this->output, sprintf($formatBegin,
179
  $entry['guid'],
180
  $entry['title'],
181
  date("Y-m-d H:i:s"),
186
  $entry['g:product_type'],
187
  $entry['g:price'],
188
  $entry['g:sale_price'],
189
+ $entry['g:brand']));
190
  foreach ($entry['sr:concepts'] as $concept) {
191
  $this->_addConcept($concept);
192
  }
193
+ fwrite($this->output, $formatEnd);
194
  }
195
  }
196
 
197
  public function _addConcept($concept) {
198
+ $concept = $concept['sr:concept'];
199
+ if (array_key_exists('sr:parent', $concept)){
200
+ $format = <<<EOT
201
+ <sr:concept>
202
+ <sr:name>%s</sr:name>
203
+ <sr:value>%s</sr:value>
204
+ <sr:label><![CDATA[%s]]></sr:label>
205
+ <sr:parent>
206
+ <sr:name><![CDATA[%s]]></sr:name>
207
+ <sr:value><![CDATA[%s]]></sr:value>
208
+ <sr:label><![CDATA[%s]]></sr:label>
209
+ </sr:parent>
210
+ </sr:concept>\n
211
+ EOT;
212
+ $format = sprintf($format, $concept['sr:name'], $concept['sr:value'], $concept['sr:label'],
213
+ $concept['sr:parent']['sr:name'], $concept['sr:parent']['sr:value'], $concept['sr:parent']['sr:label']);
214
+ } else {
215
+ $format = <<<EOT
216
  <sr:concept>
217
  <sr:name>%s</sr:name>
218
  <sr:value>%s</sr:value>
219
  <sr:label><![CDATA[%s]]></sr:label>
220
  </sr:concept>\n
221
  EOT;
222
+ $format = sprintf($format, $concept['sr:name'], $concept['sr:value'], $concept['sr:label']);
223
+ }
224
+ fwrite($this->output, $format);
 
 
225
  }
226
 
227
  public function addXMLEnd() {
app/code/community/Salesoar/Feed/Model/Observer.php CHANGED
@@ -28,7 +28,7 @@ class Salesoar_Feed_Model_Observer
28
  $idGoogle = (int)substr($string,0,strpos($string, '£$%&'));
29
  $nameGoogle = (string)trim(substr($string, strpos($string, '£$%&')+5));
30
  }
31
- $sql .= 'INSERT INTO `'.$prefix.'Salesoar_Feed` (`id_category`, `google_id`, `google_name`) VALUES ('.$idCat.', '. $idGoogle.', \''.$nameGoogle.'\' )
32
  ON DUPLICATE KEY UPDATE `google_id` = '.$idGoogle.', `google_name` = \''.$nameGoogle.'\' ; ';
33
  }
34
  if ($sql != '') {
28
  $idGoogle = (int)substr($string,0,strpos($string, '£$%&'));
29
  $nameGoogle = (string)trim(substr($string, strpos($string, '£$%&')+5));
30
  }
31
+ $sql .= 'INSERT INTO `'.$prefix.'salesoar_feed` (`id_category`, `google_id`, `google_name`) VALUES ('.$idCat.', '. $idGoogle.', \''.$nameGoogle.'\' )
32
  ON DUPLICATE KEY UPDATE `google_id` = '.$idGoogle.', `google_name` = \''.$nameGoogle.'\' ; ';
33
  }
34
  if ($sql != '') {
app/code/community/Salesoar/Feed/Model/Xml.php CHANGED
@@ -163,7 +163,7 @@ class Salesoar_Feed_Model_Xml
163
  $resource = Mage::getSingleton('core/resource');
164
  $readConnection = $resource->getConnection('core_read');
165
  $prefix = Mage::getConfig()->getTablePrefix();
166
- $query = 'SELECT * FROM `'.$prefix.'Salesoar_Feed` ';
167
  $readConnection->fetchAll($query);
168
  $array = $readConnection->fetchAll($query);
169
  $this->arraySalesoar = array();
@@ -237,6 +237,23 @@ class Salesoar_Feed_Model_Xml
237
  );
238
  }
239
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
240
  /**
241
  * Preparing data and adding to rss object
242
  *
@@ -286,11 +303,19 @@ class Salesoar_Feed_Model_Xml
286
  $cat = $this->all_categories[$path[$i]];
287
  $label = $cat->getName();
288
  $value = substr($cat->getUrl(), $this->domainLength);
289
-
290
  array_push($concepts, $this->_createConcept(
291
  "category", $value, $label));
292
- array_push($concepts, $this->_createConcept(
293
- "category_L" . ($i - 2), $value, $label));
 
 
 
 
 
 
 
 
 
294
 
295
  ////GOOGLE_CATEGORY////
296
  if ($i == count($path) - 1 && $this->arraySalesoar != null) {
163
  $resource = Mage::getSingleton('core/resource');
164
  $readConnection = $resource->getConnection('core_read');
165
  $prefix = Mage::getConfig()->getTablePrefix();
166
+ $query = 'SELECT * FROM `'.$prefix.'salesoar_feed` ';
167
  $readConnection->fetchAll($query);
168
  $array = $readConnection->fetchAll($query);
169
  $this->arraySalesoar = array();
237
  );
238
  }
239
 
240
+ protected function _createConceptWithParent($name, $value, $label, $parent)
241
+ {
242
+ $concept = array(
243
+ Salesoar_Feed_Model_Atom::NAMESPACE_TAG_SALESOAR_FEED . ':name' => $name,
244
+ Salesoar_Feed_Model_Atom::NAMESPACE_TAG_SALESOAR_FEED . ':value' => $value,
245
+ Salesoar_Feed_Model_Atom::NAMESPACE_TAG_SALESOAR_FEED . ':label' => $label,
246
+ Salesoar_Feed_Model_Atom::NAMESPACE_TAG_SALESOAR_FEED . ':parent' =>
247
+ array(
248
+ Salesoar_Feed_Model_Atom::NAMESPACE_TAG_SALESOAR_FEED . ':name' => $parent['name'],
249
+ Salesoar_Feed_Model_Atom::NAMESPACE_TAG_SALESOAR_FEED . ':value' => $parent['value'],
250
+ Salesoar_Feed_Model_Atom::NAMESPACE_TAG_SALESOAR_FEED . ':label' => $parent['label'])
251
+ );
252
+ return array(
253
+ Salesoar_Feed_Model_Atom::NAMESPACE_TAG_SALESOAR_FEED . ':concept' => $concept
254
+ );
255
+ }
256
+
257
  /**
258
  * Preparing data and adding to rss object
259
  *
303
  $cat = $this->all_categories[$path[$i]];
304
  $label = $cat->getName();
305
  $value = substr($cat->getUrl(), $this->domainLength);
 
306
  array_push($concepts, $this->_createConcept(
307
  "category", $value, $label));
308
+ if ($i -2 > 0){
309
+ $parent = $this->all_categories[$path[$i-1]];
310
+ $parent_label = $parent->getName();
311
+ $parent_value = substr($parent->getUrl(), $this->domainLength);
312
+ $parent_to_print = array('name' => "category_L". ($i-3) , 'value' => $parent_value, 'label' => $parent_label);
313
+ array_push($concepts, $this->_createConceptWithParent(
314
+ "category_L" . ($i - 2), $value, $label, $parent_to_print));
315
+ } else {
316
+ array_push($concepts, $this->_createConcept(
317
+ "category_L" . ($i - 2), $value, $label));
318
+ }
319
 
320
  ////GOOGLE_CATEGORY////
321
  if ($i == count($path) - 1 && $this->arraySalesoar != null) {
app/code/community/Salesoar/Feed/controllers/FeedController.php CHANGED
@@ -17,13 +17,12 @@
17
 
18
  class Salesoar_Feed_FeedController extends Mage_Core_Controller_Front_Action
19
  {
20
-
21
  /**
22
  * Index action--- action : Click to open Feeds
23
  */
24
  public function indexAction()
25
  {
26
- if (Mage::getStoreConfig('salesoar_feed/config/salesoar_feed_create_enable')) {
27
  $this->getResponse()->setHeader('Content-type', 'application/json; charset=UTF-8', true);
28
  $this->loadLayout(false);
29
  $this->renderLayout();
@@ -39,7 +38,7 @@ class Salesoar_Feed_FeedController extends Mage_Core_Controller_Front_Action
39
  */
40
  public function xmlAction()
41
  {
42
- if (Mage::getStoreConfig('salesoar_feed/config/salesoar_feed_create_enable')) {
43
  $jsonResp = true;
44
  if ($this->getRequest()->getParam('store')) {
45
  if (is_numeric($this->getRequest()->getParam('store'))) {
@@ -50,7 +49,7 @@ class Salesoar_Feed_FeedController extends Mage_Core_Controller_Front_Action
50
  }
51
  }
52
  if ($jsonResp) {
53
- $this->_redirect("salesoar_feed/feed");
54
  }
55
  else {
56
  header('Content-Type: text/xml; charset=UTF-8');
@@ -70,7 +69,7 @@ class Salesoar_Feed_FeedController extends Mage_Core_Controller_Front_Action
70
  */
71
  public function createAction()
72
  {
73
- if (Mage::getStoreConfig('salesoar_feed/config/salesoar_feed_create_enable')) {
74
  $this->loadLayout(false);
75
  $this->renderLayout();
76
  } else {
17
 
18
  class Salesoar_Feed_FeedController extends Mage_Core_Controller_Front_Action
19
  {
 
20
  /**
21
  * Index action--- action : Click to open Feeds
22
  */
23
  public function indexAction()
24
  {
25
+ if (Mage::getStoreConfig('Salesoar_Feed/config/Salesoar_Feed_create_enable')) {
26
  $this->getResponse()->setHeader('Content-type', 'application/json; charset=UTF-8', true);
27
  $this->loadLayout(false);
28
  $this->renderLayout();
38
  */
39
  public function xmlAction()
40
  {
41
+ if (Mage::getStoreConfig('Salesoar_Feed/config/Salesoar_Feed_create_enable')) {
42
  $jsonResp = true;
43
  if ($this->getRequest()->getParam('store')) {
44
  if (is_numeric($this->getRequest()->getParam('store'))) {
49
  }
50
  }
51
  if ($jsonResp) {
52
+ $this->_redirect("Salesoar_Feed/feed");
53
  }
54
  else {
55
  header('Content-Type: text/xml; charset=UTF-8');
69
  */
70
  public function createAction()
71
  {
72
+ if (Mage::getStoreConfig('Salesoar_Feed/config/Salesoar_Feed_create_enable')) {
73
  $this->loadLayout(false);
74
  $this->renderLayout();
75
  } else {
app/code/community/Salesoar/Feed/etc/adminhtml.xml CHANGED
@@ -18,10 +18,10 @@
18
  <children>
19
  <config>
20
  <children>
21
- <salesoar_feed translate="title">
22
  <title>Salesoar Feeds Section</title>
23
  <sort_order>135</sort_order>
24
- </salesoar_feed>
25
  </children>
26
  </config>
27
  </children>
18
  <children>
19
  <config>
20
  <children>
21
+ <Salesoar_Feed translate="title" module="Salesoar_Feed">
22
  <title>Salesoar Feeds Section</title>
23
  <sort_order>135</sort_order>
24
+ </Salesoar_Feed>
25
  </children>
26
  </config>
27
  </children>
app/code/community/Salesoar/Feed/etc/config.xml CHANGED
@@ -12,34 +12,25 @@
12
  <config>
13
  <modules>
14
  <Salesoar_Feed>
15
- <version>1.2.7</version>
16
  </Salesoar_Feed>
17
  </modules>
18
  <default>
19
- <salesoar_feed>
20
  <config>
21
- <salesoar_feed_enable>1</salesoar_feed_enable>
22
- <salesoar_feed_create_enable>1</salesoar_feed_create_enable>
23
- <salesoar_feed_all_categories>1</salesoar_feed_all_categories>
24
- <salesoar_feed_add_attributes>1</salesoar_feed_add_attributes>
25
  <cron_settings>0 1 * * *</cron_settings>
26
  </config>
27
- </salesoar_feed>
28
  </default>
29
  <global>
30
  <models>
31
  <Salesoar_Feed>
32
  <class>Salesoar_Feed_Model</class>
33
- <resourceModel>Salesoar_Feed_mysql4</resourceModel>
34
  </Salesoar_Feed>
35
- <Salesoar_Feed__mysql4>
36
- <class>Salesoar_Feed_Model_Mysql4</class>
37
- <entities>
38
- <Salesoar_Feed>
39
- <table>Salesoar_Feed</table> <!-- Db table name -->
40
- </Salesoar_Feed>
41
- </entities>
42
- </Salesoar_Feed__mysql4>
43
  </models>
44
  <events>
45
  <admin_system_config_changed_section_salesoar_feed>
@@ -100,15 +91,15 @@
100
  <layout>
101
  <updates>
102
  <Salesoar_Feed>
103
- <file>salesoar_feed.xml</file>
104
  </Salesoar_Feed>
105
  </updates>
106
  </layout>
107
  <layout>
108
  <updates>
109
- <salesoar_feed>
110
- <file>salesoar_feed.xml</file>
111
- </salesoar_feed>
112
  </updates>
113
  </layout>
114
  </adminhtml>
@@ -124,19 +115,19 @@
124
  </modules>
125
  </translate>
126
  <routers>
127
- <salesoar_feed>
128
  <use>standard</use>
129
  <args>
130
  <module>Salesoar_Feed</module>
131
  <frontName>salesoar</frontName>
132
  </args>
133
- </salesoar_feed>
134
  </routers>
135
  <layout>
136
  <updates>
137
- <salesoar_feed>
138
- <file>salesoar_feed.xml</file>
139
- </salesoar_feed>
140
  </updates>
141
  </layout>
142
  </frontend>
@@ -144,12 +135,11 @@
144
  <jobs>
145
  <Salesoar_Feed_create_feeds>
146
  <config>
147
- <config_path>salesoar_feed/schedule/cron_settings</config_path>
148
  </config>
149
  <run>
150
  <model>Salesoar_Feed/All::createAllXml</model>
151
  </run>
152
- </Salesoar_Feed_create_feeds>
153
- </jobs>
154
  </crontab>
155
  </config>
12
  <config>
13
  <modules>
14
  <Salesoar_Feed>
15
+ <version>1.2.8</version>
16
  </Salesoar_Feed>
17
  </modules>
18
  <default>
19
+ <Salesoar_Feed>
20
  <config>
21
+ <Salesoar_Feed_enable>1</Salesoar_Feed_enable>
22
+ <Salesoar_Feed_create_enable>1</Salesoar_Feed_create_enable>
23
+ <Salesoar_Feed_all_categories>1</Salesoar_Feed_all_categories>
24
+ <Salesoar_Feed_add_attributes>1</Salesoar_Feed_add_attributes>
25
  <cron_settings>0 1 * * *</cron_settings>
26
  </config>
27
+ </Salesoar_Feed>
28
  </default>
29
  <global>
30
  <models>
31
  <Salesoar_Feed>
32
  <class>Salesoar_Feed_Model</class>
 
33
  </Salesoar_Feed>
 
 
 
 
 
 
 
 
34
  </models>
35
  <events>
36
  <admin_system_config_changed_section_salesoar_feed>
91
  <layout>
92
  <updates>
93
  <Salesoar_Feed>
94
+ <file>Salesoar_Feed.xml</file>
95
  </Salesoar_Feed>
96
  </updates>
97
  </layout>
98
  <layout>
99
  <updates>
100
+ <Salesoar_Feed>
101
+ <file>Salesoar_Feed.xml</file>
102
+ </Salesoar_Feed>
103
  </updates>
104
  </layout>
105
  </adminhtml>
115
  </modules>
116
  </translate>
117
  <routers>
118
+ <Salesoar_Feed>
119
  <use>standard</use>
120
  <args>
121
  <module>Salesoar_Feed</module>
122
  <frontName>salesoar</frontName>
123
  </args>
124
+ </Salesoar_Feed>
125
  </routers>
126
  <layout>
127
  <updates>
128
+ <Salesoar_Feed>
129
+ <file>Salesoar_Feed.xml</file>
130
+ </Salesoar_Feed>
131
  </updates>
132
  </layout>
133
  </frontend>
135
  <jobs>
136
  <Salesoar_Feed_create_feeds>
137
  <config>
138
+ <config_path>Salesoar_Feed/schedule/cron_settings</config_path>
139
  </config>
140
  <run>
141
  <model>Salesoar_Feed/All::createAllXml</model>
142
  </run>
143
+ </Salesoar_Feed_create_feeds></jobs>
 
144
  </crontab>
145
  </config>
app/code/community/Salesoar/Feed/etc/system.xml CHANGED
@@ -12,9 +12,8 @@
12
  */
13
  -->
14
  <config>
15
-
16
  <sections>
17
- <salesoar_feed translate="label" model="Salesoar_Feed">
18
  <label>Salesoar Feed</label>
19
  <tab>sales</tab>
20
  <frontend_type>text</frontend_type>
@@ -32,7 +31,7 @@
32
  <show_in_store>1</show_in_store>
33
  <expanded>1</expanded>
34
  <fields>
35
- <salesoar_feed_enable translate="label">
36
  <label>Enable Feeds</label>
37
  <frontend_type>select</frontend_type>
38
  <source_model>adminhtml/system_config_source_enabledisable</source_model>
@@ -41,8 +40,8 @@
41
  <show_in_default>1</show_in_default>
42
  <show_in_website>1</show_in_website>
43
  <show_in_store>1</show_in_store>
44
- </salesoar_feed_enable>
45
- <salesoar_feed_create_enable translate="label">
46
  <label>Enable the "Create Feed" Link</label>
47
  <frontend_type>select</frontend_type>
48
  <source_model>adminhtml/system_config_source_enabledisable</source_model>
@@ -51,8 +50,8 @@
51
  <show_in_default>1</show_in_default>
52
  <show_in_website>1</show_in_website>
53
  <show_in_store>1</show_in_store>
54
- </salesoar_feed_create_enable>
55
- <salesoar_feed_show_feed translate="label">
56
  <label>Feed Links</label>
57
  <frontend_type>label</frontend_type>
58
  <frontend_model>Salesoar_Feed/adminhtml_frontend_links</frontend_model>
@@ -60,8 +59,8 @@
60
  <show_in_default>1</show_in_default>
61
  <show_in_website>1</show_in_website>
62
  <show_in_store>1</show_in_store>
63
- </salesoar_feed_show_feed>
64
- <salesoar_feed_create_feed translate="label">
65
  <label>Create Feeds</label>
66
  <frontend_type>label</frontend_type>
67
  <frontend_model>Salesoar_Feed/adminhtml_frontend_create</frontend_model>
@@ -69,7 +68,7 @@
69
  <show_in_default>1</show_in_default>
70
  <show_in_website>1</show_in_website>
71
  <show_in_store>1</show_in_store>
72
- </salesoar_feed_create_feed>
73
  <cron_settings>
74
  <label>How often do you want the creation feed to run?</label>
75
  <frontend_type>text</frontend_type>
@@ -132,7 +131,7 @@
132
  </fields>
133
  </map_google_categories>
134
  </groups>
135
- </salesoar_feed>
136
  </sections>
137
  </config>
138
 
12
  */
13
  -->
14
  <config>
 
15
  <sections>
16
+ <Salesoar_Feed translate="label" model="Salesoar_Feed">
17
  <label>Salesoar Feed</label>
18
  <tab>sales</tab>
19
  <frontend_type>text</frontend_type>
31
  <show_in_store>1</show_in_store>
32
  <expanded>1</expanded>
33
  <fields>
34
+ <Salesoar_Feed_enable translate="label">
35
  <label>Enable Feeds</label>
36
  <frontend_type>select</frontend_type>
37
  <source_model>adminhtml/system_config_source_enabledisable</source_model>
40
  <show_in_default>1</show_in_default>
41
  <show_in_website>1</show_in_website>
42
  <show_in_store>1</show_in_store>
43
+ </Salesoar_Feed_enable>
44
+ <Salesoar_Feed_create_enable translate="label">
45
  <label>Enable the "Create Feed" Link</label>
46
  <frontend_type>select</frontend_type>
47
  <source_model>adminhtml/system_config_source_enabledisable</source_model>
50
  <show_in_default>1</show_in_default>
51
  <show_in_website>1</show_in_website>
52
  <show_in_store>1</show_in_store>
53
+ </Salesoar_Feed_create_enable>
54
+ <Salesoar_Feed_show_feed translate="label">
55
  <label>Feed Links</label>
56
  <frontend_type>label</frontend_type>
57
  <frontend_model>Salesoar_Feed/adminhtml_frontend_links</frontend_model>
59
  <show_in_default>1</show_in_default>
60
  <show_in_website>1</show_in_website>
61
  <show_in_store>1</show_in_store>
62
+ </Salesoar_Feed_show_feed>
63
+ <Salesoar_Feed_create_feed translate="label">
64
  <label>Create Feeds</label>
65
  <frontend_type>label</frontend_type>
66
  <frontend_model>Salesoar_Feed/adminhtml_frontend_create</frontend_model>
68
  <show_in_default>1</show_in_default>
69
  <show_in_website>1</show_in_website>
70
  <show_in_store>1</show_in_store>
71
+ </Salesoar_Feed_create_feed>
72
  <cron_settings>
73
  <label>How often do you want the creation feed to run?</label>
74
  <frontend_type>text</frontend_type>
131
  </fields>
132
  </map_google_categories>
133
  </groups>
134
+ </Salesoar_Feed>
135
  </sections>
136
  </config>
137
 
app/code/community/Salesoar/Feed/sql/Salesoar_Feed_setup/{mysql4-install-1.2.0.php → mysql4-install-1.2.8.php} RENAMED
@@ -8,8 +8,8 @@
8
 
9
  $installer = $this;
10
  $installer->startSetup();
11
- $installer->run("-- DROP TABLE IF EXISTS {$this->getTable('Salesoar_Feed')};
12
- CREATE TABLE {$this->getTable('Salesoar_Feed')} (
13
  `id_category` INT(11) UNSIGNED NOT NULL ,
14
  `google_id` INT(11) UNSIGNED ,
15
  `google_name` VARCHAR( 100 ) DEFAULT '',
@@ -17,7 +17,6 @@ CREATE TABLE {$this->getTable('Salesoar_Feed')} (
17
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
18
  ");
19
 
20
- $popolateSalesoarCategory ="INSERT INTO {$this->getTable('Salesoar_Feed')} (id_category) SELECT cs.entity_id FROM {$this->getTable('catalog_category_entity')} as cs GROUP BY cs.entity_id ";
21
  $installer->run($popolateSalesoarCategory);
22
  $installer->endSetup();
23
-
8
 
9
  $installer = $this;
10
  $installer->startSetup();
11
+ $installer->run("DROP TABLE IF EXISTS {$this->getTable('salesoar_feed')};
12
+ CREATE TABLE {$this->getTable('salesoar_feed')} (
13
  `id_category` INT(11) UNSIGNED NOT NULL ,
14
  `google_id` INT(11) UNSIGNED ,
15
  `google_name` VARCHAR( 100 ) DEFAULT '',
17
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
18
  ");
19
 
20
+ $popolateSalesoarCategory ="INSERT INTO {$this->getTable('salesoar_feed')} (id_category) SELECT cs.entity_id FROM {$this->getTable('catalog_category_entity')} as cs GROUP BY cs.entity_id ";
21
  $installer->run($popolateSalesoarCategory);
22
  $installer->endSetup();
 
app/design/frontend/base/default/layout/{salesoar_feed.xml → Salesoar_Feed.xml} RENAMED
File without changes
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Salesoar_Feed</name>
4
- <version>1.2.7</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
@@ -10,9 +10,9 @@
10
  <description>Salesoar is the perfect marketing assistant for your ecommerce. Simply connect your ecommerce with Salesoar and you can easily create, monitor and manage your campaigns. Create your account on https://salesoar.com and start promoting your products</description>
11
  <notes>Bug fixed</notes>
12
  <authors><author><name>Salesoar</name><user>MAG003095121</user><email>hello@salesoar.com</email></author></authors>
13
- <date>2016-11-23</date>
14
- <time>15:04:57</time>
15
- <contents><target name="magecommunity"><dir name="Salesoar"><dir name="Feed"><dir name="Block"><file name="Abstract.php" hash="6fda60e05280624dec374de5f3c64037"/><dir name="Adminhtml"><dir name="Frontend"><file name="Create.php" hash="81fabd5aa53a2fce34b8a7ab9d7b3bda"/><file name="Links.php" hash="63c49a5db2ddb48863ad266e011d66a1"/></dir></dir><file name="All.php" hash="d2bd66cdf271831bcdeaaa19c1b1e5b4"/><dir name="Config"><dir name="Adminhtml"><dir name="Form"><dir name="Field"><file name="Category.php" hash="bcdde546cb8af3872caeb14013784441"/><file name="GoogleCategory.php" hash="19c1e94bea04fd18dbd8b4ae9a6c3df4"/></dir></dir></dir><file name="Advertise.php" hash="42965df1c1f77fa13687c612230a4395"/><file name="TableMapping.php" hash="2819596b25566b2028f3a01da1922a5d"/></dir><file name="Create.php" hash="6aff617ab94eb0af390c8b5d9d3841e2"/><file name="Xml.php" hash="d604971f2d6f55905b1cad3835d2fb81"/></dir><dir name="Helper"><file name="Data.php" hash="452fdf447086d40354753b37b8cf2702"/></dir><dir name="Model"><file name="All.php" hash="0c72ab1b243919fc90c3971e7a4ebd6e"/><file name="Atom.php" hash="80d92927d60bf2aead1e21b6327b0536"/><file name="Feed.php" hash="0a9593319f5f5335aaf1d29e7af33d4a"/><file name="Observer.php" hash="079b5607bff314004a511732053655fa"/><file name="Session.php" hash="cc6f2ec572d56eb882d0269b55f4f796"/><dir name="System"><dir name="Config"><dir name="Backend"><file name="Attributes.php" hash="9d1264a5207425f0b0154966ffdc2ee2"/><file name="Categories.php" hash="888d4035a1f0eefe7fe73ccf465d2ef7"/><file name="Create.php" hash="5441649de14854fcbfedceb87aebc688"/><file name="CurrencyMap.php" hash="4485a6403b4c5cddfe6ac4f9cd9e4c9c"/><file name="Links.php" hash="3a7c2cfef5e92ba736ddbf8af06ba2e4"/><file name="SelectCategory.php" hash="37ff5211b10ae7e143fa78bfb0bd66ff"/><file name="SelectGoogleCategory.php" hash="15ca98755661d24ae0eac911b956bb89"/><dir name="Taxonomy"><file name="taxonomy_br.txt" hash="399d492d03c2c35ad1e174edf0d1f4a0"/><file name="taxonomy_de.txt" hash="6b1fc333d89fa26ba431e1658ac9364e"/><file name="taxonomy_dk.txt" hash="402a30fe21119c18af0ccd6ecbf99474"/><file name="taxonomy_en_US.txt" hash="5bc8bc4863a7d7bf1c8a68ccc54a731c"/><file name="taxonomy_es.txt" hash="57c9dad37ea984adcfd280550c338382"/><file name="taxonomy_fr.txt" hash="eb00ab5d99e1d0fdd64b2eccbd1a3700"/><file name="taxonomy_it.txt" hash="c2e5c5fcdff87033826ef908165ad48c"/><file name="taxonomy_nl.txt" hash="cd3bf4c7e879fee47f3d8f5fa0ee6477"/><file name="taxonomy_pl.txt" hash="711372a31920120e8d11d971ad186e5e"/><file name="taxonomy_se.txt" hash="fe03b123ab99796ccd24f2cbec07818e"/></dir></dir></dir></dir><file name="Xml.php" hash="4e500fb89393d67cd4fdd41f197ec687"/></dir><dir name="controllers"><file name="FeedController.php" hash="2d568887a82d5f8424f8b379271914f4"/><file name="IndexController.php" hash="2975c0be5a94694435771defc7c48835"/></dir><dir name="etc"><file name="adminhtml.xml" hash="a84e1e3df9ee1808ea254bcedc424a41"/><file name="config.xml" hash="57f0b2ea6b2162b27e53b0d8d5b1b3db"/><file name="system.xml" hash="5e6552778998c9a2e63bef954e214f06"/></dir><dir name="sql"><dir name="Salesoar_Feed_setup"><file name="mysql4-install-1.2.0.php" hash="f5d29abb803035586af7f11a39f85e92"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Salesoar_Feed.csv" hash="f99bd663f6b7becac87c8be1720f14b3"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="salesoar_feed.xml" hash="2aef7579109252e53f6653a2f337b8c1"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Salesoar_Feed.xml" hash="06e2e706952847a75cc1045a61067755"/></dir></target></contents>
16
  <compatible/>
17
- <dependencies><required><php><min>5.4.0</min><max>6.0.0</max></php><package><name>Mage_Catalog</name><channel>community</channel><min>1.6.0.0</min><max>1.9.2.4</max></package><package><name>Mage_CatalogInventory</name><channel>community</channel><min>1.6.0.0</min><max>1.9.2.4</max></package><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.6.0.0</min><max>1.9.2.4</max></package><extension><name>Core</name><min>1.6.0.0</min><max>1.9.2.4</max></extension><extension><name>PDO</name><min>1.6.0.0</min><max>1.9.2.4</max></extension></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Salesoar_Feed</name>
4
+ <version>1.2.8</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
10
  <description>Salesoar is the perfect marketing assistant for your ecommerce. Simply connect your ecommerce with Salesoar and you can easily create, monitor and manage your campaigns. Create your account on https://salesoar.com and start promoting your products</description>
11
  <notes>Bug fixed</notes>
12
  <authors><author><name>Salesoar</name><user>MAG003095121</user><email>hello@salesoar.com</email></author></authors>
13
+ <date>2016-12-02</date>
14
+ <time>14:27:18</time>
15
+ <contents><target name="magecommunity"><dir name="Salesoar"><dir name="Feed"><dir name="Block"><file name="Abstract.php" hash="6fda60e05280624dec374de5f3c64037"/><dir name="Adminhtml"><dir name="Frontend"><file name="Create.php" hash="81fabd5aa53a2fce34b8a7ab9d7b3bda"/><file name="Links.php" hash="63c49a5db2ddb48863ad266e011d66a1"/></dir></dir><file name="All.php" hash="d2bd66cdf271831bcdeaaa19c1b1e5b4"/><dir name="Config"><dir name="Adminhtml"><dir name="Form"><dir name="Field"><file name="Category.php" hash="bcdde546cb8af3872caeb14013784441"/><file name="GoogleCategory.php" hash="19c1e94bea04fd18dbd8b4ae9a6c3df4"/></dir></dir></dir><file name="Advertise.php" hash="461f4850ed76f1def82531489d4bf7fc"/><file name="TableMapping.php" hash="3cbc7107e3e17edabb5c76b13a5d4c42"/></dir><file name="Create.php" hash="6aff617ab94eb0af390c8b5d9d3841e2"/><file name="Xml.php" hash="d604971f2d6f55905b1cad3835d2fb81"/></dir><dir name="Helper"><file name="Data.php" hash="452fdf447086d40354753b37b8cf2702"/></dir><dir name="Model"><file name="All.php" hash="0c72ab1b243919fc90c3971e7a4ebd6e"/><file name="Atom.php" hash="1644c2269cee62d56ddd304e35d7b212"/><file name="Feed.php" hash="0a9593319f5f5335aaf1d29e7af33d4a"/><file name="Observer.php" hash="6c18a0874b46f9da96d3a77a44edfb03"/><file name="Session.php" hash="cc6f2ec572d56eb882d0269b55f4f796"/><dir name="System"><dir name="Config"><dir name="Backend"><file name="Attributes.php" hash="9d1264a5207425f0b0154966ffdc2ee2"/><file name="Categories.php" hash="888d4035a1f0eefe7fe73ccf465d2ef7"/><file name="Create.php" hash="5441649de14854fcbfedceb87aebc688"/><file name="CurrencyMap.php" hash="4485a6403b4c5cddfe6ac4f9cd9e4c9c"/><file name="Links.php" hash="3a7c2cfef5e92ba736ddbf8af06ba2e4"/><file name="SelectCategory.php" hash="37ff5211b10ae7e143fa78bfb0bd66ff"/><file name="SelectGoogleCategory.php" hash="15ca98755661d24ae0eac911b956bb89"/><dir name="Taxonomy"><file name="taxonomy_br.txt" hash="399d492d03c2c35ad1e174edf0d1f4a0"/><file name="taxonomy_de.txt" hash="6b1fc333d89fa26ba431e1658ac9364e"/><file name="taxonomy_dk.txt" hash="402a30fe21119c18af0ccd6ecbf99474"/><file name="taxonomy_en_US.txt" hash="5bc8bc4863a7d7bf1c8a68ccc54a731c"/><file name="taxonomy_es.txt" hash="57c9dad37ea984adcfd280550c338382"/><file name="taxonomy_fr.txt" hash="eb00ab5d99e1d0fdd64b2eccbd1a3700"/><file name="taxonomy_it.txt" hash="c2e5c5fcdff87033826ef908165ad48c"/><file name="taxonomy_nl.txt" hash="cd3bf4c7e879fee47f3d8f5fa0ee6477"/><file name="taxonomy_pl.txt" hash="711372a31920120e8d11d971ad186e5e"/><file name="taxonomy_se.txt" hash="fe03b123ab99796ccd24f2cbec07818e"/></dir></dir></dir></dir><file name="Xml.php" hash="89db3874bc317da6f883de8691d94593"/></dir><dir name="controllers"><file name="FeedController.php" hash="40a2e26be99da27a0adf7b84664648e4"/><file name="IndexController.php" hash="2975c0be5a94694435771defc7c48835"/></dir><dir name="etc"><file name="adminhtml.xml" hash="d856d0fe6a3c649c1b9c2dff5b84756a"/><file name="config.xml" hash="a9abfa1cf4d9d4575dd50fef1e0d04b9"/><file name="system.xml" hash="bcce01881725b0d6e8c9d27d8f63c82e"/></dir><dir name="sql"><dir name="Salesoar_Feed_setup"><file name="mysql4-install-1.2.8.php" hash="82b03a43952de64a83e02f67a62bab48"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Salesoar_Feed.csv" hash="f99bd663f6b7becac87c8be1720f14b3"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="Salesoar_Feed.xml" hash="2aef7579109252e53f6653a2f337b8c1"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Salesoar_Feed.xml" hash="06e2e706952847a75cc1045a61067755"/></dir></target></contents>
16
  <compatible/>
17
+ <dependencies><required><php><min>5.4.0</min><max>6.0.0</max></php><extension><name>Core</name><min>1.6.0.0</min><max>1.9.2.4</max></extension><extension><name>PDO</name><min>1.6.0.0</min><max>1.9.2.4</max></extension></required></dependencies>
18
  </package>