YMLExportYandexMarket - Version 1.0.5

Version Notes

Missing slash in product url

Download this release

Release Info

Developer Gurusmart.ru
Extension YMLExportYandexMarket
Version 1.0.5
Comparing to
See all releases


Code changes from version 1.0.3 to 1.0.5

app/code/local/Gurusmart/YandexMarket/controllers/Adminhtml/IndexController.php CHANGED
@@ -23,7 +23,8 @@ class Gurusmart_YandexMarket_Adminhtml_IndexController extends Mage_Adminhtml_Co
23
  $result = array(
24
  'shop_data' => array(
25
  'name' => Mage::getModel('core/store')->load(1)->getName(),
26
- 'url' => Mage::app()->getStore()->getUrl(),
 
27
  )
28
  );
29
 
@@ -89,11 +90,15 @@ class Gurusmart_YandexMarket_Adminhtml_IndexController extends Mage_Adminhtml_Co
89
  $picUrl = (string)Mage::getModel('catalog/product_media_config')->getMediaUrl($_product->getImage());
90
  }
91
 
 
 
 
 
92
  // Save product data into result array
93
  $result['products'][] = array(
94
  'id' => $_product->getId(),
95
  'in_stock' => (bool)Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getIsInStock(),
96
- 'url' => str_replace('/index.php', null, $result['shop_data']['url']) . $_product->getUrlKey(),
97
  'price' => $_product->getPrice(),
98
  'currencyId' => $currencyCode,
99
  'categoryId' => $_category->getId(),
23
  $result = array(
24
  'shop_data' => array(
25
  'name' => Mage::getModel('core/store')->load(1)->getName(),
26
+ //'url' => Mage::app()->getStore()->getUrl(),
27
+ 'url' => Mage::getBaseUrl( Mage_Core_Model_Store::URL_TYPE_WEB, true ),
28
  )
29
  );
30
 
90
  $picUrl = (string)Mage::getModel('catalog/product_media_config')->getMediaUrl($_product->getImage());
91
  }
92
 
93
+ // product suffix
94
+ $helper = Mage::helper('catalog/product');
95
+ $suffix = $helper->getProductUrlSuffix(); // may have particular store ID
96
+
97
  // Save product data into result array
98
  $result['products'][] = array(
99
  'id' => $_product->getId(),
100
  'in_stock' => (bool)Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getIsInStock(),
101
+ 'url' => str_replace('/index.php', null, $result['shop_data']['url']) . $_product->getUrlKey() . $suffix,
102
  'price' => $_product->getPrice(),
103
  'currencyId' => $currencyCode,
104
  'categoryId' => $_category->getId(),
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>YMLExportYandexMarket</name>
4
- <version>1.0.3</version>
5
  <stability>stable</stability>
6
  <license>GPL</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Magento extension to generate Yandex.Market YML feed</summary>
10
  <description>Magento extension to generate Yandex.Market YML feed</description>
11
- <notes>Using original images for pictures</notes>
12
  <authors><author><name>Gurusmart.ru</name><user>mit686</user><email>info@gurusmart.ru</email></author></authors>
13
  <date>2015-10-23</date>
14
- <time>03:46:12</time>
15
- <contents><target name="mageetc"><dir name="modules"><file name="Gurusmart_YandexMarket.xml" hash="8a3364501cd3951d9c13c1fcdf063a7b"/></dir></target><target name="magelocal"><dir name="Gurusmart"><dir name="YandexMarket"><dir name="Block"><dir name="Adminhtml"><file name="Export.php" hash="3736651ce4b019bb8b3ea8d6027c97dd"/></dir></dir><dir name="Helper"><file name="Data.php" hash="b38d0589ad412de64813106ec15a243f"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="IndexController.php" hash="6289c1270a1e3b42f1e3ce0566f2cae2"/></dir></dir><dir name="etc"><file name="config.xml" hash="f4b1fdf4ebaf6e736cdb222cb04f61fa"/></dir><dir name="sql"><dir name="gmyandexmarket_setup"><file name="install-0.0.1.php" hash="b6a62bd3e463263cc7dac76347c25ac7"/></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>YMLExportYandexMarket</name>
4
+ <version>1.0.5</version>
5
  <stability>stable</stability>
6
  <license>GPL</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Magento extension to generate Yandex.Market YML feed</summary>
10
  <description>Magento extension to generate Yandex.Market YML feed</description>
11
+ <notes>Missing slash in product url</notes>
12
  <authors><author><name>Gurusmart.ru</name><user>mit686</user><email>info@gurusmart.ru</email></author></authors>
13
  <date>2015-10-23</date>
14
+ <time>07:03:53</time>
15
+ <contents><target name="mageetc"><dir name="modules"><file name="Gurusmart_YandexMarket.xml" hash="8a3364501cd3951d9c13c1fcdf063a7b"/></dir></target><target name="magelocal"><dir name="Gurusmart"><dir name="YandexMarket"><dir name="Block"><dir name="Adminhtml"><file name="Export.php" hash="3736651ce4b019bb8b3ea8d6027c97dd"/></dir></dir><dir name="Helper"><file name="Data.php" hash="b38d0589ad412de64813106ec15a243f"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="IndexController.php" hash="60a7f869162ac78c36045459c7bb2a19"/></dir></dir><dir name="etc"><file name="config.xml" hash="f4b1fdf4ebaf6e736cdb222cb04f61fa"/></dir><dir name="sql"><dir name="gmyandexmarket_setup"><file name="install-0.0.1.php" hash="b6a62bd3e463263cc7dac76347c25ac7"/></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>