Buscape_Sitemap - Version 0.1.7

Version Notes

Correção na captura de categorias

Download this release

Release Info

Developer Magento Core Team
Extension Buscape_Sitemap
Version 0.1.7
Comparing to
See all releases


Code changes from version 0.1.6 to 0.1.7

app/code/community/Buscape/Sitemap/Model/Sitemap.php CHANGED
@@ -153,7 +153,7 @@ class Buscape_Sitemap_Model_Sitemap extends Mage_Sitemap_Model_Sitemap
153
 
154
  foreach($collection as $item) {
155
 
156
- // Mage::log($item, null, 'item.log', true);
157
 
158
  try {
159
 
@@ -188,7 +188,13 @@ class Buscape_Sitemap_Model_Sitemap extends Mage_Sitemap_Model_Sitemap
188
  }
189
 
190
  $product = Mage::getModel("catalog/product")->load($item->getId());
191
-
 
 
 
 
 
 
192
  $template = <<<EOT
193
  <produto>
194
  <descricao>%s</descricao>
@@ -210,7 +216,7 @@ EOT;
210
  $product->getSku(),
211
  $product->getProductUrl(),
212
  ($product->getImage()=="no_selection")?"":$product->getImageUrl(),
213
- str_replace("/", ":", $product->getCategoryCollection()->getFirstItem()->getPath()),
214
  intval($product->getStockItem()->getQty()),
215
  $this->_getConfig()->getAccount()
216
  );
153
 
154
  foreach($collection as $item) {
155
 
156
+ //Mage::log($item, null, 'item.log', true);
157
 
158
  try {
159
 
188
  }
189
 
190
  $product = Mage::getModel("catalog/product")->load($item->getId());
191
+
192
+ $categoryIds= $product->getCategoryIds();
193
+ $category = Mage::getModel('catalog/category')->load($categoryIds[0]);
194
+
195
+ // Mage::log($categoryName, null, 'categ.log', true);
196
+
197
+
198
  $template = <<<EOT
199
  <produto>
200
  <descricao>%s</descricao>
216
  $product->getSku(),
217
  $product->getProductUrl(),
218
  ($product->getImage()=="no_selection")?"":$product->getImageUrl(),
219
+ $categoryName = $category -> getName(),
220
  intval($product->getStockItem()->getQty()),
221
  $this->_getConfig()->getAccount()
222
  );
app/code/community/Buscape/Sitemap/etc/config.xml CHANGED
@@ -22,7 +22,7 @@
22
  <config>
23
  <modules>
24
  <Buscape_Sitemap>
25
- <version>0.1.6</version>
26
  </Buscape_Sitemap>
27
  </modules>
28
  <global>
22
  <config>
23
  <modules>
24
  <Buscape_Sitemap>
25
+ <version>0.1.7</version>
26
  </Buscape_Sitemap>
27
  </modules>
28
  <global>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Buscape_Sitemap</name>
4
- <version>0.1.6</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
@@ -23,11 +23,11 @@
23
  Para suporte:&#xD;
24
  &#xD;
25
  - &lt;a href="http://suporte.devbuscapecompany.com/anonymous_requests/new"&gt; Clique Aqui! &lt;/a&gt;&lt;/p&gt;</description>
26
- <notes>Melhoria em performance e na captura de imagens</notes>
27
  <authors><author><name>Buscap&#xE9; Developer</name><user>auto-converted</user><email>suporte@devbuscapecompany.com</email></author></authors>
28
- <date>2013-11-14</date>
29
- <time>17:44:11</time>
30
- <contents><target name="mageetc"><dir name="modules"><file name="Buscape_Sitemap.xml" hash="e49a3a6d37df6cd56928f2ba4d517559"/></dir></target><target name="magecommunity"><dir name="Buscape"><dir name="Sitemap"><dir name="Block"><dir name="Admin"><dir name="Edit"><file name="Form.php" hash="4eabebc5239ba40ef9d7ed01b87338de"/></dir><dir name="Grid"><dir name="Renderer"><file name="Link.php" hash="c3fc7d89a673e8eba245240eeca1eba0"/></dir></dir><dir name="Main"><file name="Grid.php" hash="a1708e4296c4963f920d4218b7009e0e"/></dir><dir name="New"><file name="Form.php" hash="98e92a67cd4fbd3d7a4e65704f542f2e"/></dir><file name="Edit.php" hash="fe15ceb6569bcdcd99a08d53599aaca9"/><file name="Main.php" hash="a6c4688b7cbe3a5d2fd18733e9f1a56e"/><file name="New.php" hash="74afbf19d3a6bdb83cf345de916a0242"/></dir></dir><dir name="Helper"><file name="Data.php" hash="fe038765e31661ba27cf8784a1559d6b"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Sitemap"><file name="Collection.php" hash="28c00c86c4fe5aa87325643a5255b32a"/></dir><file name="Sitemap.php" hash="c78328a3a52da29e242b00822935a615"/></dir><file name="Config.php" hash="4386e1c98918d5a114b7a9d31afea296"/><file name="Observer.php" hash="ff2c01550acf78584d6ab56bfbf9b579"/><file name="Sitemap.php" hash="bf5d41b96cde225774ef4510c196a1f0"/></dir><dir name="controllers"><file name="AdminController.php" hash="c1efb71e16840a721f775f4fb480405d"/></dir><dir name="etc"><file name="config.xml" hash="dd66b68c909c91cba118d08846d4df38"/><file name="system.xml" hash="11d6d0609d435447bf1f2c5229f78158"/></dir><dir name="sql"><dir name="buscapemap_setup"><file name="mysql4-install-0.1.0.php" hash="915a5dc3b7a2ba4d5c634db00780303c"/></dir></dir></dir></dir></target></contents>
31
  <compatible/>
32
  <dependencies/>
33
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Buscape_Sitemap</name>
4
+ <version>0.1.7</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
23
  Para suporte:&#xD;
24
  &#xD;
25
  - &lt;a href="http://suporte.devbuscapecompany.com/anonymous_requests/new"&gt; Clique Aqui! &lt;/a&gt;&lt;/p&gt;</description>
26
+ <notes>Corre&#xE7;&#xE3;o na captura de categorias</notes>
27
  <authors><author><name>Buscap&#xE9; Developer</name><user>auto-converted</user><email>suporte@devbuscapecompany.com</email></author></authors>
28
+ <date>2013-11-19</date>
29
+ <time>12:41:40</time>
30
+ <contents><target name="mageetc"><dir name="modules"><file name="Buscape_Sitemap.xml" hash="e49a3a6d37df6cd56928f2ba4d517559"/></dir></target><target name="magecommunity"><dir name="Buscape"><dir name="Sitemap"><dir name="Block"><dir name="Admin"><dir name="Edit"><file name="Form.php" hash="4eabebc5239ba40ef9d7ed01b87338de"/></dir><dir name="Grid"><dir name="Renderer"><file name="Link.php" hash="c3fc7d89a673e8eba245240eeca1eba0"/></dir></dir><dir name="Main"><file name="Grid.php" hash="a1708e4296c4963f920d4218b7009e0e"/></dir><dir name="New"><file name="Form.php" hash="98e92a67cd4fbd3d7a4e65704f542f2e"/></dir><file name="Edit.php" hash="fe15ceb6569bcdcd99a08d53599aaca9"/><file name="Main.php" hash="a6c4688b7cbe3a5d2fd18733e9f1a56e"/><file name="New.php" hash="74afbf19d3a6bdb83cf345de916a0242"/></dir></dir><dir name="Helper"><file name="Data.php" hash="fe038765e31661ba27cf8784a1559d6b"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Sitemap"><file name="Collection.php" hash="28c00c86c4fe5aa87325643a5255b32a"/></dir><file name="Sitemap.php" hash="c78328a3a52da29e242b00822935a615"/></dir><file name="Config.php" hash="4386e1c98918d5a114b7a9d31afea296"/><file name="Observer.php" hash="ff2c01550acf78584d6ab56bfbf9b579"/><file name="Sitemap.php" hash="8ae95dcfaa8cf903e8f91c08415c6b30"/></dir><dir name="controllers"><file name="AdminController.php" hash="c1efb71e16840a721f775f4fb480405d"/></dir><dir name="etc"><file name="config.xml" hash="74baa495b74e96dc90c664e43b5a9d3a"/><file name="system.xml" hash="11d6d0609d435447bf1f2c5229f78158"/></dir><dir name="sql"><dir name="buscapemap_setup"><file name="mysql4-install-0.1.0.php" hash="915a5dc3b7a2ba4d5c634db00780303c"/></dir></dir></dir></dir></target></contents>
31
  <compatible/>
32
  <dependencies/>
33
  </package>