Version Notes
- Added mapping by EAN/UPC codes
- Added support of Multilanguage stores
- Added new setting Description
- Added loading products description from DB when icecat info is missing and config setting product descr source is set to icecat
- Added saving icecat images to server and display from there
- Added saving product title to db from file and display it on list page
- Fixed problems with Icecat names
- Fixed problems with images on product listing/shopping cart.
- Fixed problems with correct displaying attributes on product detail page
- Fixed problems with description on product detail page
- Fixed product info in breadcrumbs
- Fixed problems with loading icecat data for each product on product listing page
Download this release
Release Info
Developer | IceShop |
Extension | IcecatLive |
Version | 1.3.0 |
Comparing to | |
See all releases |
Code changes from version 1.2.0 to 1.3.0
- app/code/local/Bintime/Icecatimport/Block/Attributes.php +78 -78
- app/code/local/Bintime/Icecatimport/Block/Media.php +50 -41
- app/code/local/Bintime/Icecatimport/Block/Related.php +59 -59
- app/code/local/Bintime/Icecatimport/Block/Upsell.php +50 -50
- app/code/local/Bintime/Icecatimport/Helper/Catalog/Image.php +56 -49
- app/code/local/Bintime/Icecatimport/Helper/Getdata.php +190 -187
- app/code/local/Bintime/Icecatimport/Helper/Image.php +47 -45
- app/code/local/Bintime/Icecatimport/Helper/Output.php +146 -109
- app/code/local/Bintime/Icecatimport/Model/Catalog/Category.php +18 -18
- app/code/local/Bintime/Icecatimport/Model/Catalog/Product.php +199 -134
- app/code/local/Bintime/Icecatimport/Model/Catalog/Search.php +14 -14
- app/code/local/Bintime/Icecatimport/Model/Imagescollection.php +45 -45
- app/code/local/Bintime/Icecatimport/Model/Import.php +515 -374
- app/code/local/Bintime/Icecatimport/Model/Observer.php +138 -33
- app/code/local/Bintime/Icecatimport/Model/Relatedcollection.php +71 -71
- app/code/local/Bintime/Icecatimport/Model/System/Config/Attributes.php +20 -20
- app/code/local/Bintime/Icecatimport/Model/System/Config/Descriptionpriority.php +13 -13
- app/code/local/Bintime/Icecatimport/Model/System/Config/LanguageList.xml +399 -399
- app/code/local/Bintime/Icecatimport/Model/System/Config/Locales.php +45 -45
- app/code/local/Bintime/Icecatimport/Model/System/Config/Subscription.php +18 -18
- app/code/local/Bintime/Icecatimport/controllers/ImageController.php +15 -15
- app/code/local/Bintime/Icecatimport/etc/config.xml +147 -147
- app/code/local/Bintime/Icecatimport/etc/system.xml +97 -97
- app/code/local/Bintime/Icecatimport/sql/icecatimport_setup/mysql4-install-0.1.0.php +24 -24
- app/code/local/Bintime/Icecatimport/sql/icecatimport_setup/mysql4-upgrade-0.1.0-0.1.1.php +11 -11
- package.xml +10 -4
app/code/local/Bintime/Icecatimport/Block/Attributes.php
CHANGED
@@ -1,78 +1,78 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Bintime_Icecatimport_Block_Attributes extends Mage_Catalog_Block_Product_View_Attributes
|
4 |
-
{
|
5 |
-
public function getAdditionalData(array $excludeAttr = array())
|
6 |
-
{
|
7 |
-
$data = $this->getAttributesArray();
|
8 |
-
$data2 = array();
|
9 |
-
foreach($data as $_data)
|
10 |
-
{
|
11 |
-
if( $_data['label'] != '' && $_data['value'] != '' && $_data['code'] == 'descript'){
|
12 |
-
$data2[] = array(
|
13 |
-
'label'=>$_data['label'],
|
14 |
-
'value'=>$_data['value'],
|
15 |
-
'code'=>''
|
16 |
-
);}
|
17 |
-
|
18 |
-
if( $_data['label'] == '' && $_data['value'] != '' && $_data['code'] == 'header')
|
19 |
-
{
|
20 |
-
$data2[] = array(
|
21 |
-
'label'=>$_data['label'],
|
22 |
-
'value'=>$_data['value'],
|
23 |
-
'code'=>''
|
24 |
-
);}
|
25 |
-
//
|
26 |
-
}
|
27 |
-
return $data2;
|
28 |
-
}
|
29 |
-
|
30 |
-
public function formatValue($value) {
|
31 |
-
if($value == "Y"){
|
32 |
-
return '<img border="0" alt="" src="http://prf.icecat.biz/imgs/yes.gif"/>';
|
33 |
-
}
|
34 |
-
else if ($value == "N"){
|
35 |
-
return '<img border="0" alt="" src="http://prf.icecat.biz/imgs/no.gif"/>';
|
36 |
-
}
|
37 |
-
|
38 |
-
return
|
39 |
-
str_replace("\\n", "<br>",
|
40 |
-
htmlspecialchars($value)
|
41 |
-
);
|
42 |
-
}
|
43 |
-
|
44 |
-
public function getAttributesArray() {
|
45 |
-
$iceModel = Mage::getSingleton('icecatimport/import');
|
46 |
-
$descriptionsListArray = $iceModel->getProductDescriptionList();
|
47 |
-
foreach($descriptionsListArray as $ma)
|
48 |
-
{
|
49 |
-
foreach($ma as $key=>$value)
|
50 |
-
{
|
51 |
-
$arr[$key] = $value;
|
52 |
-
}
|
53 |
-
}
|
54 |
-
|
55 |
-
$data = array();
|
56 |
-
foreach ($arr as $key => $value) {
|
57 |
-
//$attributes = Mage::getModel('catalog/product')->getAttributesFromIcecat($this->getProduct()->getEntityId(), $value);
|
58 |
-
// @todo @someday @maybe make headers
|
59 |
-
$data[] = array(
|
60 |
-
'label'=>'',
|
61 |
-
'value'=>'<h1>'.$key.'</h1>',
|
62 |
-
'code'=>'header'
|
63 |
-
);
|
64 |
-
$attributes = $value;
|
65 |
-
foreach ($attributes as $attributeLabel => $attributeValue) {
|
66 |
-
$data[] = array(
|
67 |
-
'label'=>$attributeLabel,
|
68 |
-
'value'=>$this->formatValue($attributeValue),
|
69 |
-
'code'=>'descript'
|
70 |
-
);
|
71 |
-
}
|
72 |
-
}
|
73 |
-
return $data;
|
74 |
-
}
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Bintime_Icecatimport_Block_Attributes extends Mage_Catalog_Block_Product_View_Attributes
|
4 |
+
{
|
5 |
+
public function getAdditionalData(array $excludeAttr = array())
|
6 |
+
{
|
7 |
+
$data = $this->getAttributesArray();
|
8 |
+
$data2 = array();
|
9 |
+
foreach($data as $_data)
|
10 |
+
{
|
11 |
+
if( $_data['label'] != '' && $_data['value'] != '' && $_data['code'] == 'descript'){
|
12 |
+
$data2[] = array(
|
13 |
+
'label'=>$_data['label'],
|
14 |
+
'value'=>$_data['value'],
|
15 |
+
'code'=>''
|
16 |
+
);}
|
17 |
+
|
18 |
+
if( $_data['label'] == '' && $_data['value'] != '' && $_data['code'] == 'header')
|
19 |
+
{
|
20 |
+
$data2[] = array(
|
21 |
+
'label'=>$_data['label'],
|
22 |
+
'value'=>$_data['value'],
|
23 |
+
'code'=>''
|
24 |
+
);}
|
25 |
+
//
|
26 |
+
}
|
27 |
+
return $data2;
|
28 |
+
}
|
29 |
+
|
30 |
+
public function formatValue($value) {
|
31 |
+
if($value == "Y"){
|
32 |
+
return '<img border="0" alt="" src="http://prf.icecat.biz/imgs/yes.gif"/>';
|
33 |
+
}
|
34 |
+
else if ($value == "N"){
|
35 |
+
return '<img border="0" alt="" src="http://prf.icecat.biz/imgs/no.gif"/>';
|
36 |
+
}
|
37 |
+
|
38 |
+
return
|
39 |
+
str_replace("\\n", "<br>",
|
40 |
+
htmlspecialchars($value)
|
41 |
+
);
|
42 |
+
}
|
43 |
+
|
44 |
+
public function getAttributesArray() {
|
45 |
+
$iceModel = Mage::getSingleton('icecatimport/import');
|
46 |
+
$descriptionsListArray = $iceModel->getProductDescriptionList();
|
47 |
+
foreach($descriptionsListArray as $ma)
|
48 |
+
{
|
49 |
+
foreach($ma as $key=>$value)
|
50 |
+
{
|
51 |
+
$arr[$key] = $value;
|
52 |
+
}
|
53 |
+
}
|
54 |
+
|
55 |
+
$data = array();
|
56 |
+
foreach ($arr as $key => $value) {
|
57 |
+
//$attributes = Mage::getModel('catalog/product')->getAttributesFromIcecat($this->getProduct()->getEntityId(), $value);
|
58 |
+
// @todo @someday @maybe make headers
|
59 |
+
$data[] = array(
|
60 |
+
'label'=>'',
|
61 |
+
'value'=>'<h1>'.$key.'</h1>',
|
62 |
+
'code'=>'header'
|
63 |
+
);
|
64 |
+
$attributes = $value;
|
65 |
+
foreach ($attributes as $attributeLabel => $attributeValue) {
|
66 |
+
$data[] = array(
|
67 |
+
'label'=>$attributeLabel,
|
68 |
+
'value'=>$this->formatValue($attributeValue),
|
69 |
+
'code'=>'descript'
|
70 |
+
);
|
71 |
+
}
|
72 |
+
}
|
73 |
+
return $data;
|
74 |
+
}
|
75 |
+
|
76 |
+
|
77 |
+
|
78 |
+
}
|
app/code/local/Bintime/Icecatimport/Block/Media.php
CHANGED
@@ -1,41 +1,50 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Bintime_Icecatimport_Block_Media extends Mage_Catalog_Block_Product_View_Media
|
4 |
-
{
|
5 |
-
protected $_isGalleryDisabled;
|
6 |
-
|
7 |
-
public function getGalleryImages()
|
8 |
-
{
|
9 |
-
if ($this->_isGalleryDisabled) {
|
10 |
-
return array();
|
11 |
-
}
|
12 |
-
$iceCatModel = Mage::getSingleton('icecatimport/import');
|
13 |
-
$icePhotos = $iceCatModel->getGalleryPhotos();
|
14 |
-
|
15 |
-
$
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
else{
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Bintime_Icecatimport_Block_Media extends Mage_Catalog_Block_Product_View_Media
|
4 |
+
{
|
5 |
+
protected $_isGalleryDisabled;
|
6 |
+
|
7 |
+
public function getGalleryImages()
|
8 |
+
{
|
9 |
+
if ($this->_isGalleryDisabled) {
|
10 |
+
return array();
|
11 |
+
}
|
12 |
+
$iceCatModel = Mage::getSingleton('icecatimport/import');
|
13 |
+
$icePhotos = $iceCatModel->getGalleryPhotos();
|
14 |
+
|
15 |
+
$collection = $this->getProduct()->getMediaGalleryImages();
|
16 |
+
$items = $collection->getItems();
|
17 |
+
if(!empty($icePhotos)){
|
18 |
+
return Mage::getSingleton('Bintime_Icecatimport_Model_Imagescollection',array(
|
19 |
+
'product' => $this->getProduct()
|
20 |
+
));
|
21 |
+
} else if (count($items) == 1) {
|
22 |
+
|
23 |
+
return array();
|
24 |
+
|
25 |
+
} else{
|
26 |
+
|
27 |
+
return $collection;
|
28 |
+
|
29 |
+
}
|
30 |
+
}
|
31 |
+
|
32 |
+
|
33 |
+
|
34 |
+
public function getGalleryUrl($image=null)
|
35 |
+
{
|
36 |
+
$iceCatModel = Mage::getSingleton('icecatimport/import');
|
37 |
+
$icePhotos = $iceCatModel->getGalleryPhotos();
|
38 |
+
$collection = $this->getProduct()->getMediaGalleryImages();
|
39 |
+
$items = $collection->getItems();
|
40 |
+
if (!empty($icePhotos)) {
|
41 |
+
$product_id = $this->getProduct()->getEntityId();
|
42 |
+
$image_saved = $iceCatModel->saveImg($product_id,$image['file'],'thumb');
|
43 |
+
return Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product/'.$image_saved;
|
44 |
+
} else {
|
45 |
+
return parent::getGalleryUrl($image);
|
46 |
+
}
|
47 |
+
}
|
48 |
+
|
49 |
+
|
50 |
+
}
|
app/code/local/Bintime/Icecatimport/Block/Related.php
CHANGED
@@ -1,59 +1,59 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/osl-3.0.php
|
11 |
-
* If you did not receive a copy of the license and are unable to
|
12 |
-
* obtain it through the world-wide-web, please send an email
|
13 |
-
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
-
*
|
15 |
-
* DISCLAIMER
|
16 |
-
*
|
17 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
-
* versions in the future. If you wish to customize Magento for your
|
19 |
-
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
-
*
|
21 |
-
* @category Mage
|
22 |
-
* @package Mage_Catalog
|
23 |
-
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
-
*/
|
26 |
-
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Catalog product related items block
|
30 |
-
*
|
31 |
-
* @category Mage
|
32 |
-
* @package Mage_Catalog
|
33 |
-
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
-
*/
|
35 |
-
class Bintime_Icecatimport_Block_Related extends Mage_Catalog_Block_Product_List_Related
|
36 |
-
{
|
37 |
-
protected function _prepareData()
|
38 |
-
{
|
39 |
-
$product = Mage::registry('product');
|
40 |
-
$helper = Mage::helper('icecatimport/getdata');
|
41 |
-
$relatedProducts = $helper->getRelatedProducts();
|
42 |
-
if(!$relatedProducts)
|
43 |
-
{
|
44 |
-
return parent::_prepareData();
|
45 |
-
}
|
46 |
-
|
47 |
-
$tmp = Mage::getSingleton('Bintime_Icecatimport_Model_Relatedcollection', $relatedProducts);
|
48 |
-
$tmp = $tmp->getCollection();
|
49 |
-
$this->_itemCollection = $tmp;
|
50 |
-
$this->_addProductAttributesAndPrices($this->_itemCollection);
|
51 |
-
Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($this->_itemCollection);
|
52 |
-
$this->_itemCollection->load();
|
53 |
-
foreach ($this->_itemCollection as $product) {
|
54 |
-
$product->setDoNotUseCategoryId(true);
|
55 |
-
}
|
56 |
-
return $this;
|
57 |
-
}
|
58 |
-
|
59 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Catalog
|
23 |
+
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Catalog product related items block
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Catalog
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
class Bintime_Icecatimport_Block_Related extends Mage_Catalog_Block_Product_List_Related
|
36 |
+
{
|
37 |
+
protected function _prepareData()
|
38 |
+
{
|
39 |
+
$product = Mage::registry('product');
|
40 |
+
$helper = Mage::helper('icecatimport/getdata');
|
41 |
+
$relatedProducts = $helper->getRelatedProducts();
|
42 |
+
if(!$relatedProducts)
|
43 |
+
{
|
44 |
+
return parent::_prepareData();
|
45 |
+
}
|
46 |
+
|
47 |
+
$tmp = Mage::getSingleton('Bintime_Icecatimport_Model_Relatedcollection', $relatedProducts);
|
48 |
+
$tmp = $tmp->getCollection();
|
49 |
+
$this->_itemCollection = $tmp;
|
50 |
+
$this->_addProductAttributesAndPrices($this->_itemCollection);
|
51 |
+
Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($this->_itemCollection);
|
52 |
+
$this->_itemCollection->load();
|
53 |
+
foreach ($this->_itemCollection as $product) {
|
54 |
+
$product->setDoNotUseCategoryId(true);
|
55 |
+
}
|
56 |
+
return $this;
|
57 |
+
}
|
58 |
+
|
59 |
+
}
|
app/code/local/Bintime/Icecatimport/Block/Upsell.php
CHANGED
@@ -1,50 +1,50 @@
|
|
1 |
-
<?php
|
2 |
-
class Bintime_Icecatimport_Block_Upsell extends Mage_Catalog_Block_Product_List_Upsell{
|
3 |
-
|
4 |
-
protected function _prepareData()
|
5 |
-
{
|
6 |
-
$product = Mage::registry('product');
|
7 |
-
/* @var $product Mage_Catalog_Model_Product */
|
8 |
-
$this->_itemCollection = $product->getUpSellProductCollection()
|
9 |
-
->addAttributeToSort('position', 'asc')
|
10 |
-
->addStoreFilter()
|
11 |
-
;
|
12 |
-
$skuField = Mage::getStoreConfig('icecat_root/icecat/sku_field');
|
13 |
-
$this->_itemCollection->addAttributeToSelect($skuField);
|
14 |
-
|
15 |
-
$manufacturerId = Mage::getStoreConfig('icecat_root/icecat/manufacturer');
|
16 |
-
$this->_itemCollection->addAttributeToSelect($manufacturerId);
|
17 |
-
|
18 |
-
Mage::getResourceSingleton('checkout/cart')->addExcludeProductFilter($this->_itemCollection,
|
19 |
-
Mage::getSingleton('checkout/session')->getQuoteId()
|
20 |
-
);
|
21 |
-
|
22 |
-
|
23 |
-
$this->_addProductAttributesAndPrices($this->_itemCollection);
|
24 |
-
|
25 |
-
// Mage::getSingleton('catalog/product_status')->addSaleableFilterToCollection($this->_itemCollection);
|
26 |
-
Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($this->_itemCollection);
|
27 |
-
|
28 |
-
if ($this->getItemLimit('upsell') > 0) {
|
29 |
-
$this->_itemCollection->setPageSize($this->getItemLimit('upsell'));
|
30 |
-
}
|
31 |
-
|
32 |
-
$this->_itemCollection->load();
|
33 |
-
/**
|
34 |
-
* Updating collection with desired items
|
35 |
-
*/
|
36 |
-
Mage::dispatchEvent('catalog_product_upsell', array(
|
37 |
-
'product' => $product,
|
38 |
-
'collection' => $this->_itemCollection,
|
39 |
-
'limit' => $this->getItemLimit()
|
40 |
-
));
|
41 |
-
|
42 |
-
foreach ($this->_itemCollection as $product) {
|
43 |
-
$product->setDoNotUseCategoryId(true);
|
44 |
-
}
|
45 |
-
|
46 |
-
return $this;
|
47 |
-
}
|
48 |
-
|
49 |
-
|
50 |
-
}
|
1 |
+
<?php
|
2 |
+
class Bintime_Icecatimport_Block_Upsell extends Mage_Catalog_Block_Product_List_Upsell{
|
3 |
+
|
4 |
+
protected function _prepareData()
|
5 |
+
{
|
6 |
+
$product = Mage::registry('product');
|
7 |
+
/* @var $product Mage_Catalog_Model_Product */
|
8 |
+
$this->_itemCollection = $product->getUpSellProductCollection()
|
9 |
+
->addAttributeToSort('position', 'asc')
|
10 |
+
->addStoreFilter()
|
11 |
+
;
|
12 |
+
$skuField = Mage::getStoreConfig('icecat_root/icecat/sku_field');
|
13 |
+
$this->_itemCollection->addAttributeToSelect($skuField);
|
14 |
+
|
15 |
+
$manufacturerId = Mage::getStoreConfig('icecat_root/icecat/manufacturer');
|
16 |
+
$this->_itemCollection->addAttributeToSelect($manufacturerId);
|
17 |
+
|
18 |
+
Mage::getResourceSingleton('checkout/cart')->addExcludeProductFilter($this->_itemCollection,
|
19 |
+
Mage::getSingleton('checkout/session')->getQuoteId()
|
20 |
+
);
|
21 |
+
|
22 |
+
|
23 |
+
$this->_addProductAttributesAndPrices($this->_itemCollection);
|
24 |
+
|
25 |
+
// Mage::getSingleton('catalog/product_status')->addSaleableFilterToCollection($this->_itemCollection);
|
26 |
+
Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($this->_itemCollection);
|
27 |
+
|
28 |
+
if ($this->getItemLimit('upsell') > 0) {
|
29 |
+
$this->_itemCollection->setPageSize($this->getItemLimit('upsell'));
|
30 |
+
}
|
31 |
+
|
32 |
+
$this->_itemCollection->load();
|
33 |
+
/**
|
34 |
+
* Updating collection with desired items
|
35 |
+
*/
|
36 |
+
Mage::dispatchEvent('catalog_product_upsell', array(
|
37 |
+
'product' => $product,
|
38 |
+
'collection' => $this->_itemCollection,
|
39 |
+
'limit' => $this->getItemLimit()
|
40 |
+
));
|
41 |
+
|
42 |
+
foreach ($this->_itemCollection as $product) {
|
43 |
+
$product->setDoNotUseCategoryId(true);
|
44 |
+
}
|
45 |
+
|
46 |
+
return $this;
|
47 |
+
}
|
48 |
+
|
49 |
+
|
50 |
+
}
|
app/code/local/Bintime/Icecatimport/Helper/Catalog/Image.php
CHANGED
@@ -1,49 +1,56 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Overloaded catalog helper to substitute magento images
|
4 |
-
* @author Sergey Gozhedrianov <info@bintime.com>
|
5 |
-
*
|
6 |
-
*/
|
7 |
-
class Bintime_Icecatimport_Helper_Catalog_Image extends Mage_Catalog_Helper_Image
|
8 |
-
{
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Overriden method provides product with images from icecatimport data table
|
12 |
-
* @param $product Mage_Catalog_Model_Product
|
13 |
-
* @param $attributeName string
|
14 |
-
* @param $imageFile string
|
15 |
-
*/
|
16 |
-
public function init(Mage_Catalog_Model_Product $product, $attributeName, $imageFile=null)
|
17 |
-
{
|
18 |
-
|
19 |
-
|
20 |
-
if ($attributeName == '
|
21 |
-
|
22 |
-
}
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Overloaded catalog helper to substitute magento images
|
4 |
+
* @author Sergey Gozhedrianov <info@bintime.com>
|
5 |
+
*
|
6 |
+
*/
|
7 |
+
class Bintime_Icecatimport_Helper_Catalog_Image extends Mage_Catalog_Helper_Image
|
8 |
+
{
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Overriden method provides product with images from icecatimport data table
|
12 |
+
* @param $product Mage_Catalog_Model_Product
|
13 |
+
* @param $attributeName string
|
14 |
+
* @param $imageFile string
|
15 |
+
*/
|
16 |
+
public function init(Mage_Catalog_Model_Product $product, $attributeName, $imageFile=null)
|
17 |
+
{ $baseDir = Mage::getSingleton('catalog/product_media_config')->getBaseMediaPath().'/';
|
18 |
+
if ($attributeName == 'image' && $imageFile == null ) {
|
19 |
+
$imageFile = mage::getsingleton('icecatimport/import')->getLowPicUrl();
|
20 |
+
} else if ($attributeName == 'thumbnail' && $imageFile == null ) {
|
21 |
+
$imageFile = Mage::helper('icecatimport/image')->getImage($product);
|
22 |
+
} else if ($attributeName == 'small_image' && $imageFile == null) {
|
23 |
+
$imageFile = Mage::helper('icecatimport/image')->getImage($product);
|
24 |
+
if (!$imageFile) {
|
25 |
+
$iceImport = new Bintime_Icecatimport_Model_Import();
|
26 |
+
$imageFile = $iceImport->getImg($product->getId());
|
27 |
+
}
|
28 |
+
} else if (!empty($imageFile)) {
|
29 |
+
$iceCatModel = Mage::getSingleton('icecatimport/import');
|
30 |
+
if (!strpos($imageFile,'ttp')) {
|
31 |
+
$imageFile = $iceCatModel->saveImg($product->getEntityId(),Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product/'.$imageFile,$attributeName);
|
32 |
+
} else {
|
33 |
+
$imageFile = $iceCatModel->saveImg($product->getEntityId(),$imageFile,$attributeName);
|
34 |
+
}
|
35 |
+
}
|
36 |
+
|
37 |
+
return parent::init($product, $attributeName, $imageFile);
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Return icecat image URL if set
|
42 |
+
*/
|
43 |
+
|
44 |
+
public function __toString()
|
45 |
+
{
|
46 |
+
$url = parent::__toString();
|
47 |
+
|
48 |
+
if ( $this->getImageFile() && strpos( $this->getImageFile(), 'icecat.biz') && strpos($url, 'placeholder') ) {
|
49 |
+
$url = $this->getImageFile();
|
50 |
+
}
|
51 |
+
|
52 |
+
return $url;
|
53 |
+
}
|
54 |
+
|
55 |
+
}
|
56 |
+
?>
|
app/code/local/Bintime/Icecatimport/Helper/Getdata.php
CHANGED
@@ -1,187 +1,190 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
*
|
4 |
-
* Class achieves icecat description from Model by recieved SKU and manufacturer
|
5 |
-
* @author Sergey Gozhedrianov <info@bintime.com>
|
6 |
-
*
|
7 |
-
*/
|
8 |
-
class Bintime_Icecatimport_Helper_Getdata extends Mage_Core_Helper_Abstract
|
9 |
-
{
|
10 |
-
private $iceCatModel;
|
11 |
-
private $error;
|
12 |
-
private $systemError;
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Gets product Data and delegates it to Model
|
16 |
-
* @param Mage_Catalog_Model_Product $_product
|
17 |
-
* @return Bintime_Icecatimport_Helper_Getdata
|
18 |
-
*/
|
19 |
-
|
20 |
-
public function getEntityTypeId() {
|
21 |
-
$connection = Mage::getSingleton('core/resource')->getConnection('core_read');
|
22 |
-
$query = $connection->select()
|
23 |
-
->from(Mage::getSingleton('core/resource')
|
24 |
-
->getTableName('eav_entity_type'),'entity_type_id')
|
25 |
-
->where('entity_type_code = ?', 'catalog_product')
|
26 |
-
->limit(1);
|
27 |
-
$this->entityTypeId = $connection->fetchOne($query);
|
28 |
-
return $this->entityTypeId;
|
29 |
-
}
|
30 |
-
|
31 |
-
public function getProductDescription($_product) {
|
32 |
-
try {
|
33 |
-
$entityId = $_product->getEntityId();
|
34 |
-
$entity_type_id = $this->getEntityTypeId();
|
35 |
-
$connection = Mage::getSingleton('core/resource')->getConnection('core_read');
|
36 |
-
$mpn = $_product->getData(Mage::getStoreConfig('icecat_root/icecat/sku_field'));
|
37 |
-
$ean_code = $_product->getData(Mage::getStoreConfig('icecat_root/icecat/ean_code'));
|
38 |
-
$manufacturerId = $_product->getData(Mage::getStoreConfig('icecat_root/icecat/manufacturer'));
|
39 |
-
$attributeInfo = Mage::getResourceModel('eav/entity_attribute_collection')
|
40 |
-
->setCodeFilter(Mage::getStoreConfig('icecat_root/icecat/manufacturer'))
|
41 |
-
->setEntityTypeFilter($entity_type_id)
|
42 |
-
->getFirstItem();
|
43 |
-
if ($attributeInfo->getData('backend_type') == 'int' ||
|
44 |
-
($attributeInfo->getData('frontend_input') == 'select' && $attributeInfo->getData('backend_type') == 'static' )) {
|
45 |
-
$attribute = $attributeInfo->setEntity($_product->getResource());
|
46 |
-
$manufacturer = $attribute->getSource()->getOptionText($manufacturerId);
|
47 |
-
} else {
|
48 |
-
$manufacturer = $manufacturerId;
|
49 |
-
}
|
50 |
-
|
51 |
-
$locale = Mage::getStoreConfig('icecat_root/icecat/language');
|
52 |
-
if ($locale == '0'){
|
53 |
-
$systemLocale = explode("_", Mage::app()->getLocale()->getLocaleCode());
|
54 |
-
$locale = $systemLocale[0];
|
55 |
-
}
|
56 |
-
$userLogin = Mage::getStoreConfig('icecat_root/icecat/login');
|
57 |
-
$userPass = Mage::getStoreConfig('icecat_root/icecat/password');
|
58 |
-
$this->iceCatModel = Mage::getSingleton('icecatimport/import');
|
59 |
-
if (!$this->iceCatModel->getProductDescription($mpn, $manufacturer, $locale, $userLogin, $userPass, $entityId, $ean_code)){
|
60 |
-
$this->error = $this->iceCatModel->getErrorMessage();
|
61 |
-
$this->systemError = $this->iceCatModel->getSystemError();
|
62 |
-
return $this;
|
63 |
-
}
|
64 |
-
} catch (Exception $e) {
|
65 |
-
Mage::log('Icecat getProductDescription error'.$e);
|
66 |
-
}
|
67 |
-
return $this;
|
68 |
-
}
|
69 |
-
|
70 |
-
/**
|
71 |
-
* returns true if error during data fetch occured else false
|
72 |
-
*/
|
73 |
-
public function hasError(){
|
74 |
-
if ($this->error || $this->systemError){
|
75 |
-
return true;
|
76 |
-
}
|
77 |
-
return false;
|
78 |
-
}
|
79 |
-
|
80 |
-
/**
|
81 |
-
* return error message
|
82 |
-
*/
|
83 |
-
public function getError(){}
|
84 |
-
|
85 |
-
/**
|
86 |
-
* return system error
|
87 |
-
*/
|
88 |
-
public function hasSystemError(){
|
89 |
-
if ($this->systemError){
|
90 |
-
return $this->systemError;
|
91 |
-
}
|
92 |
-
return false;
|
93 |
-
}
|
94 |
-
|
95 |
-
public function getProductDescriptionList(){
|
96 |
-
return $this->iceCatModel->getProductDescriptionList();
|
97 |
-
}
|
98 |
-
|
99 |
-
public function getShortProductDescription(){
|
100 |
-
return $this->iceCatModel->getShortProductDescription();
|
101 |
-
}
|
102 |
-
|
103 |
-
public function getLowPicUrl(){
|
104 |
-
return $this->iceCatModel->getLowPicUrl();
|
105 |
-
}
|
106 |
-
public function getThumbPicture(){
|
107 |
-
return $this->iceCatModel->getThumbPicture();
|
108 |
-
}
|
109 |
-
|
110 |
-
public function getGalleryPhotos(){
|
111 |
-
return $this->iceCatModel->getGalleryPhotos();
|
112 |
-
}
|
113 |
-
|
114 |
-
public function getProductName(){
|
115 |
-
return $this->iceCatModel->getProductName();
|
116 |
-
}
|
117 |
-
public function getVendor(){
|
118 |
-
return $this->iceCatModel->getVendor();
|
119 |
-
}
|
120 |
-
|
121 |
-
public function getFullProductDescription(){
|
122 |
-
return $this->iceCatModel->getFullProductDescription();
|
123 |
-
}
|
124 |
-
|
125 |
-
public function getMPN(){
|
126 |
-
return $this->iceCatModel->getMPN();
|
127 |
-
}
|
128 |
-
public function getEAN(){
|
129 |
-
return $this->iceCatModel->getEAN();
|
130 |
-
}
|
131 |
-
|
132 |
-
/**
|
133 |
-
* Form related products list according to store products
|
134 |
-
*/
|
135 |
-
public function getRelatedProducts(){
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
$
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
if (
|
157 |
-
$catogoriesArray =
|
158 |
-
}
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
*
|
4 |
+
* Class achieves icecat description from Model by recieved SKU and manufacturer
|
5 |
+
* @author Sergey Gozhedrianov <info@bintime.com>
|
6 |
+
*
|
7 |
+
*/
|
8 |
+
class Bintime_Icecatimport_Helper_Getdata extends Mage_Core_Helper_Abstract
|
9 |
+
{
|
10 |
+
private $iceCatModel;
|
11 |
+
private $error;
|
12 |
+
private $systemError;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Gets product Data and delegates it to Model
|
16 |
+
* @param Mage_Catalog_Model_Product $_product
|
17 |
+
* @return Bintime_Icecatimport_Helper_Getdata
|
18 |
+
*/
|
19 |
+
|
20 |
+
public function getEntityTypeId() {
|
21 |
+
$connection = Mage::getSingleton('core/resource')->getConnection('core_read');
|
22 |
+
$query = $connection->select()
|
23 |
+
->from(Mage::getSingleton('core/resource')
|
24 |
+
->getTableName('eav_entity_type'),'entity_type_id')
|
25 |
+
->where('entity_type_code = ?', 'catalog_product')
|
26 |
+
->limit(1);
|
27 |
+
$this->entityTypeId = $connection->fetchOne($query);
|
28 |
+
return $this->entityTypeId;
|
29 |
+
}
|
30 |
+
|
31 |
+
public function getProductDescription($_product) {
|
32 |
+
try {
|
33 |
+
$entityId = $_product->getEntityId();
|
34 |
+
$entity_type_id = $this->getEntityTypeId();
|
35 |
+
$connection = Mage::getSingleton('core/resource')->getConnection('core_read');
|
36 |
+
$mpn = $_product->getData(Mage::getStoreConfig('icecat_root/icecat/sku_field'));
|
37 |
+
$ean_code = $_product->getData(Mage::getStoreConfig('icecat_root/icecat/ean_code'));
|
38 |
+
$manufacturerId = $_product->getData(Mage::getStoreConfig('icecat_root/icecat/manufacturer'));
|
39 |
+
$attributeInfo = Mage::getResourceModel('eav/entity_attribute_collection')
|
40 |
+
->setCodeFilter(Mage::getStoreConfig('icecat_root/icecat/manufacturer'))
|
41 |
+
->setEntityTypeFilter($entity_type_id)
|
42 |
+
->getFirstItem();
|
43 |
+
if ($attributeInfo->getData('backend_type') == 'int' ||
|
44 |
+
($attributeInfo->getData('frontend_input') == 'select' && $attributeInfo->getData('backend_type') == 'static' )) {
|
45 |
+
$attribute = $attributeInfo->setEntity($_product->getResource());
|
46 |
+
$manufacturer = $attribute->getSource()->getOptionText($manufacturerId);
|
47 |
+
} else {
|
48 |
+
$manufacturer = $manufacturerId;
|
49 |
+
}
|
50 |
+
|
51 |
+
$locale = Mage::getStoreConfig('icecat_root/icecat/language');
|
52 |
+
if ($locale == '0'){
|
53 |
+
$systemLocale = explode("_", Mage::app()->getLocale()->getLocaleCode());
|
54 |
+
$locale = $systemLocale[0];
|
55 |
+
}
|
56 |
+
$userLogin = Mage::getStoreConfig('icecat_root/icecat/login');
|
57 |
+
$userPass = Mage::getStoreConfig('icecat_root/icecat/password');
|
58 |
+
$this->iceCatModel = Mage::getSingleton('icecatimport/import');
|
59 |
+
if (!$this->iceCatModel->getProductDescription($mpn, $manufacturer, $locale, $userLogin, $userPass, $entityId, $ean_code)){
|
60 |
+
$this->error = $this->iceCatModel->getErrorMessage();
|
61 |
+
$this->systemError = $this->iceCatModel->getSystemError();
|
62 |
+
return $this;
|
63 |
+
}
|
64 |
+
} catch (Exception $e) {
|
65 |
+
Mage::log('Icecat getProductDescription error'.$e);
|
66 |
+
}
|
67 |
+
return $this;
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* returns true if error during data fetch occured else false
|
72 |
+
*/
|
73 |
+
public function hasError(){
|
74 |
+
if ($this->error || $this->systemError){
|
75 |
+
return true;
|
76 |
+
}
|
77 |
+
return false;
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* return error message
|
82 |
+
*/
|
83 |
+
public function getError(){}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* return system error
|
87 |
+
*/
|
88 |
+
public function hasSystemError(){
|
89 |
+
if ($this->systemError){
|
90 |
+
return $this->systemError;
|
91 |
+
}
|
92 |
+
return false;
|
93 |
+
}
|
94 |
+
|
95 |
+
public function getProductDescriptionList(){
|
96 |
+
return $this->iceCatModel->getProductDescriptionList();
|
97 |
+
}
|
98 |
+
|
99 |
+
public function getShortProductDescription(){
|
100 |
+
return $this->iceCatModel->getShortProductDescription();
|
101 |
+
}
|
102 |
+
|
103 |
+
public function getLowPicUrl(){
|
104 |
+
return $this->iceCatModel->getLowPicUrl();
|
105 |
+
}
|
106 |
+
public function getThumbPicture(){
|
107 |
+
return $this->iceCatModel->getThumbPicture();
|
108 |
+
}
|
109 |
+
|
110 |
+
public function getGalleryPhotos(){
|
111 |
+
return $this->iceCatModel->getGalleryPhotos();
|
112 |
+
}
|
113 |
+
|
114 |
+
public function getProductName(){
|
115 |
+
return $this->iceCatModel->getProductName();
|
116 |
+
}
|
117 |
+
public function getVendor(){
|
118 |
+
return $this->iceCatModel->getVendor();
|
119 |
+
}
|
120 |
+
|
121 |
+
public function getFullProductDescription(){
|
122 |
+
return $this->iceCatModel->getFullProductDescription();
|
123 |
+
}
|
124 |
+
|
125 |
+
public function getMPN(){
|
126 |
+
return $this->iceCatModel->getMPN();
|
127 |
+
}
|
128 |
+
public function getEAN(){
|
129 |
+
return $this->iceCatModel->getEAN();
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* Form related products list according to store products
|
134 |
+
*/
|
135 |
+
public function getRelatedProducts(){
|
136 |
+
if (!$this->iceCatModel) {
|
137 |
+
$this->iceCatModel = Mage::getSingleton('icecatimport/import');
|
138 |
+
}
|
139 |
+
$relatedProducts = $this->iceCatModel->getRelatedProducts();
|
140 |
+
if (empty($relatedProducts)){
|
141 |
+
return array();
|
142 |
+
}
|
143 |
+
$sku = Mage::getStoreConfig('icecat_root/icecat/sku_field');
|
144 |
+
$collection = Mage::getModel('catalog/product')->getCollection();
|
145 |
+
$filterArray = array();
|
146 |
+
foreach($relatedProducts as $mpn => $valueArray){
|
147 |
+
array_push($filterArray, array('attribute'=>$sku,'eq'=>$mpn));
|
148 |
+
}
|
149 |
+
$collection->addFieldToFilter($filterArray);
|
150 |
+
$collection->addAttributeToSelect($sku);
|
151 |
+
$collection->addAttributeToSelect('category_ids');
|
152 |
+
$relatedProductsList = array();
|
153 |
+
foreach ($collection as $product) {
|
154 |
+
$categoryIds = $product->getCategoryIds();
|
155 |
+
if (!empty($categoryIds)){
|
156 |
+
if (is_array($categoryIds)){
|
157 |
+
$catogoriesArray = $categoryIds;
|
158 |
+
}
|
159 |
+
if (is_string($categoryIds)){
|
160 |
+
$catogoriesArray = explode(",",$product->getCategoryIds());
|
161 |
+
}
|
162 |
+
foreach($catogoriesArray as $categoryId){
|
163 |
+
if (!array_key_exists($product->getData($sku), $relatedProducts)){
|
164 |
+
continue;
|
165 |
+
}
|
166 |
+
$relatedProductInfo = $relatedProducts[$product->getData($sku)];
|
167 |
+
$relatedProductInfo['mpn'] = $product->getData($sku);
|
168 |
+
$relatedProductInfo['url'] = preg_replace( '/\/\d+\/$/',"/".$categoryId."/",$product->getProductUrl());;
|
169 |
+
if (!array_key_exists($categoryId, $relatedProductsList)){
|
170 |
+
$relatedProductsList[$categoryId]= array();
|
171 |
+
}
|
172 |
+
array_push($relatedProductsList[$categoryId], $relatedProductInfo);
|
173 |
+
}
|
174 |
+
} else {
|
175 |
+
if (!array_key_exists($product->getData($sku), $relatedProducts)){
|
176 |
+
continue;
|
177 |
+
}
|
178 |
+
$relatedProductInfo = $relatedProducts[$product->getData($sku)];
|
179 |
+
$relatedProductInfo['mpn'] = $product->getData($sku);
|
180 |
+
$relatedProductInfo['url'] = preg_replace( '/category\/\d+\/$/','',$product->getProductUrl());;
|
181 |
+
if (!array_key_exists('a', $relatedProductsList)){
|
182 |
+
$relatedProductsList['a']= array();
|
183 |
+
}
|
184 |
+
array_push($relatedProductsList['a'], $relatedProductInfo);
|
185 |
+
}
|
186 |
+
return $relatedProductsList;
|
187 |
+
}
|
188 |
+
}
|
189 |
+
}
|
190 |
+
?>
|
app/code/local/Bintime/Icecatimport/Helper/Image.php
CHANGED
@@ -1,45 +1,47 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Class retrieves images from icecatimport data table
|
4 |
-
* @author Sergey Gozhedrianov <info@bintime.com>
|
5 |
-
*
|
6 |
-
*/
|
7 |
-
class Bintime_Icecatimport_Helper_Image extends Mage_Core_Helper_Abstract
|
8 |
-
{
|
9 |
-
/**
|
10 |
-
* Fetch Image URL from DB
|
11 |
-
* @param Mage_Catalog_Model_Product $_product
|
12 |
-
* @return string image URL
|
13 |
-
*/
|
14 |
-
public function getImage($_product) {
|
15 |
-
$_product = $_product->load($_product->getId());
|
16 |
-
$sku = $_product->getData(Mage::getStoreConfig('icecat_root/icecat/sku_field'));
|
17 |
-
$manufacturerId = $_product->getData(Mage::getStoreConfig('icecat_root/icecat/manufacturer'));
|
18 |
-
|
19 |
-
$
|
20 |
-
|
21 |
-
->
|
22 |
-
->
|
23 |
-
|
24 |
-
$
|
25 |
-
|
26 |
-
->
|
27 |
-
->
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
$
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
$
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Class retrieves images from icecatimport data table
|
4 |
+
* @author Sergey Gozhedrianov <info@bintime.com>
|
5 |
+
*
|
6 |
+
*/
|
7 |
+
class Bintime_Icecatimport_Helper_Image extends Mage_Core_Helper_Abstract
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Fetch Image URL from DB
|
11 |
+
* @param Mage_Catalog_Model_Product $_product
|
12 |
+
* @return string image URL
|
13 |
+
*/
|
14 |
+
public function getImage($_product) {
|
15 |
+
$_product = $_product->load($_product->getId());
|
16 |
+
$sku = $_product->getData(Mage::getStoreConfig('icecat_root/icecat/sku_field'));
|
17 |
+
$manufacturerId = $_product->getData(Mage::getStoreConfig('icecat_root/icecat/manufacturer'));
|
18 |
+
|
19 |
+
$connection = Mage::getSingleton('core/resource')->getConnection('core_read');
|
20 |
+
$query = $connection->select()
|
21 |
+
->from(Mage::getSingleton('core/resource')->getTableName('eav_entity_type'),'entity_type_id')
|
22 |
+
->where('entity_type_code = ?', 'catalog_product')
|
23 |
+
->limit(1);
|
24 |
+
$entityTypeId = $connection->fetchOne($query);
|
25 |
+
$attributeInfo = Mage::getResourceModel('eav/entity_attribute_collection')
|
26 |
+
->setCodeFilter(Mage::getStoreConfig('icecat_root/icecat/manufacturer'))
|
27 |
+
->setEntityTypeFilter($_product->getResource()->getTypeId())
|
28 |
+
->getFirstItem();
|
29 |
+
switch ($attributeInfo->getData('backend_type')) {
|
30 |
+
case 'int':
|
31 |
+
$attribute = $attributeInfo->setEntity($_product->getResource());
|
32 |
+
$manufacturer = $attribute->getSource()->getOptionText($manufacturerId);
|
33 |
+
break;
|
34 |
+
default:
|
35 |
+
$manufacturer = $manufacturerId;
|
36 |
+
break;
|
37 |
+
}
|
38 |
+
$this->observer = Mage::getSingleton('icecatimport/observer');
|
39 |
+
|
40 |
+
$url = $this->observer->getImageURL($sku, $manufacturer,$_product->getId());
|
41 |
+
return $url;
|
42 |
+
}
|
43 |
+
|
44 |
+
public function getGallery() {
|
45 |
+
return Mage::getSingleton('icecatimport/import')->getGalleryPhotos();
|
46 |
+
}
|
47 |
+
}
|
app/code/local/Bintime/Icecatimport/Helper/Output.php
CHANGED
@@ -1,109 +1,146 @@
|
|
1 |
-
<?php
|
2 |
-
class Bintime_Icecatimport_Helper_Output extends Mage_Catalog_Helper_Output
|
3 |
-
{
|
4 |
-
|
5 |
-
private $iceCatModel;
|
6 |
-
private $error = false;
|
7 |
-
private $systemError;
|
8 |
-
|
9 |
-
/**
|
10 |
-
* @var isFirstTime spike for getProductDescription that is called many times from template
|
11 |
-
*/
|
12 |
-
private $isFirstTime = true;
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Prepare product attribute html output
|
16 |
-
*
|
17 |
-
* @param Mage_Catalog_Model_Product $product
|
18 |
-
* @param string $attributeHtml
|
19 |
-
* @param string $attributeName
|
20 |
-
* @return string
|
21 |
-
*/
|
22 |
-
public function productAttribute($product, $attributeHtml, $attributeName){
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
$
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
$
|
65 |
-
|
66 |
-
$
|
67 |
-
|
68 |
-
|
69 |
-
->
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
}
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
}
|
109 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Bintime_Icecatimport_Helper_Output extends Mage_Catalog_Helper_Output
|
3 |
+
{
|
4 |
+
|
5 |
+
private $iceCatModel;
|
6 |
+
private $error = false;
|
7 |
+
private $systemError;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* @var isFirstTime spike for getProductDescription that is called many times from template
|
11 |
+
*/
|
12 |
+
private $isFirstTime = true;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Prepare product attribute html output
|
16 |
+
*
|
17 |
+
* @param Mage_Catalog_Model_Product $product
|
18 |
+
* @param string $attributeHtml
|
19 |
+
* @param string $attributeName
|
20 |
+
* @return string
|
21 |
+
*/
|
22 |
+
public function productAttribute($product, $attributeHtml, $attributeName){
|
23 |
+
|
24 |
+
$productId = $product->getId();
|
25 |
+
|
26 |
+
if (!mage::registry('product')) {
|
27 |
+
Mage::register('product', $product);
|
28 |
+
Mage::register('current_product', $product);
|
29 |
+
// return parent::productAttribute($product, $attributeHtml, $attributeName);
|
30 |
+
}
|
31 |
+
|
32 |
+
if ($attributeName == 'image') {
|
33 |
+
return parent::productAttribute($product, $attributeHtml, $attributeName);
|
34 |
+
}
|
35 |
+
|
36 |
+
$productDescriptionPriority = Mage::getStoreConfig('icecat_root/icecat/descript_priority');
|
37 |
+
$dbDescriptionPriority = false;
|
38 |
+
$current_page = Mage::app()->getFrontController()->getRequest()->getControllerName();
|
39 |
+
if ($productDescriptionPriority == 'Db' &&
|
40 |
+
( $attributeName == 'description' || $attributeName == 'short_description')) {
|
41 |
+
$dbDescriptionPriority = true;
|
42 |
+
}
|
43 |
+
|
44 |
+
if ($current_page == 'product') {
|
45 |
+
$bin_prod = new Bintime_Icecatimport_Model_Catalog_Product();
|
46 |
+
if ($attributeName == 'description' || $attributeName == 'short_description') {
|
47 |
+
$descr = $bin_prod->checkIcecatProdDescription($productId,$attributeName);
|
48 |
+
}
|
49 |
+
}
|
50 |
+
$prod_source = Bintime_Icecatimport_Model_Catalog_Product::$_product_source;
|
51 |
+
|
52 |
+
if( $prod_source == 'DB' && empty($descr) ) {
|
53 |
+
$dbDescriptionPriority = true;
|
54 |
+
}
|
55 |
+
|
56 |
+
if ($dbDescriptionPriority || ($current_page != 'product'
|
57 |
+
&& $prod_source != 'DB' && $attributeName != 'name') ) {
|
58 |
+
$attributeHtml = $product->getData('short_description');
|
59 |
+
return parent::productAttribute($product, $attributeHtml, $attributeName);
|
60 |
+
}
|
61 |
+
$this->iceCatModel = Mage::getSingleton('icecatimport/import');
|
62 |
+
if ($this->isFirstTime){
|
63 |
+
$helper = Mage::helper('icecatimport/getdata');
|
64 |
+
$helper->getProductDescription($product);
|
65 |
+
|
66 |
+
if ($helper->hasError() && !$dbDescriptionPriority) {
|
67 |
+
$this->error = true;
|
68 |
+
}
|
69 |
+
$this->isFirstTime = false;
|
70 |
+
}
|
71 |
+
|
72 |
+
if ($this->error){
|
73 |
+
if ($attributeName != 'description' && $attributeName != 'short_description') {
|
74 |
+
return parent::productAttribute($product, $attributeHtml, $attributeName);
|
75 |
+
} else {
|
76 |
+
return '';
|
77 |
+
}
|
78 |
+
|
79 |
+
}
|
80 |
+
$id = $product->getData('entity_id');
|
81 |
+
if ($attributeName == 'name'){
|
82 |
+
//if we on product page then mage::registry('product') exist
|
83 |
+
if ($product->getId() == $this->iceCatModel->entityId && $name = $this->iceCatModel->getProductName()) {
|
84 |
+
return $name;
|
85 |
+
} else if(!empty($descr)) {
|
86 |
+
return $descr;
|
87 |
+
}
|
88 |
+
$manufacturerId = Mage::getStoreConfig('icecat_root/icecat/manufacturer');
|
89 |
+
$mpn = Mage::getStoreConfig('icecat_root/icecat/sku_field');
|
90 |
+
$collection = Mage::getResourceModel('catalog/product_collection');
|
91 |
+
$collection->addAttributeToSelect($manufacturerId)->addAttributeToSelect($mpn)
|
92 |
+
->addAttributeToSelect('name')
|
93 |
+
->addAttributeToFilter('entity_id', array('eq' => $id));
|
94 |
+
$product = $collection->getFirstItem() ;
|
95 |
+
return $product->getName();
|
96 |
+
}
|
97 |
+
|
98 |
+
if ($attributeName == 'short_description') {
|
99 |
+
$icecat_descr = $this->iceCatModel->getShortProductDescription();
|
100 |
+
if (!empty($descr)) {
|
101 |
+
return $descr;
|
102 |
+
} else if(!empty($icecat_descr)) {
|
103 |
+
return $icecat_descr;
|
104 |
+
} else {
|
105 |
+
$attributeHtml = $product->getData('short_description');
|
106 |
+
return parent::productAttribute($product, $attributeHtml, $attributeName);
|
107 |
+
}
|
108 |
+
}
|
109 |
+
if ($attributeName == 'description') {
|
110 |
+
$icecat_full_descr = $this->iceCatModel->getFullProductDescription();
|
111 |
+
if (!empty($icecat_full_descr)) {
|
112 |
+
return str_replace("\\n", "<br>",$icecat_full_descr);
|
113 |
+
} else {
|
114 |
+
$attributeHtml = $product->getData('description');
|
115 |
+
}
|
116 |
+
}
|
117 |
+
return parent::productAttribute($product, $attributeHtml, $attributeName);
|
118 |
+
}
|
119 |
+
|
120 |
+
|
121 |
+
public function getWarrantyInfo(){
|
122 |
+
return $this->iceCatModel->getWarrantyInfo();
|
123 |
+
}
|
124 |
+
|
125 |
+
public function getShortSummaryDescription(){
|
126 |
+
return $this->iceCatModel->getShortSummaryDescription();
|
127 |
+
}
|
128 |
+
|
129 |
+
public function getLongSummaryDescription(){
|
130 |
+
return $this->iceCatModel->getLongSummaryDescription();
|
131 |
+
}
|
132 |
+
|
133 |
+
public function getManualPDF(){
|
134 |
+
return $this->iceCatModel->getManualPDF();
|
135 |
+
}
|
136 |
+
|
137 |
+
public function getPDF(){
|
138 |
+
return $this->iceCatModel->getPDF();
|
139 |
+
}
|
140 |
+
|
141 |
+
public function getIceCatMedia(){
|
142 |
+
$media = (array)$this->iceCatModel->getIceCatMedia();
|
143 |
+
return (array_key_exists('@attributes', $media)) ? $media['@attributes'] : array();
|
144 |
+
}
|
145 |
+
}
|
146 |
+
?>
|
app/code/local/Bintime/Icecatimport/Model/Catalog/Category.php
CHANGED
@@ -1,19 +1,19 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* class overrides category getProductCollection function to provide products with needed attributes
|
4 |
-
* @author Sergey Gozhedrianov <info@bintime.com>
|
5 |
-
*
|
6 |
-
*/
|
7 |
-
class Bintime_Icecatimport_Model_Catalog_Category extends Mage_Catalog_Model_Category
|
8 |
-
{
|
9 |
-
/**
|
10 |
-
* add product manufacturer attribute to category collection
|
11 |
-
*/
|
12 |
-
public function getProductCollection()
|
13 |
-
{
|
14 |
-
$collection = parent::getProductCollection();
|
15 |
-
$collection->addAttributeToSelect(Mage::getStoreConfig('icecat_root/icecat/manufacturer'));
|
16 |
-
return $collection;
|
17 |
-
}
|
18 |
-
}
|
19 |
?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* class overrides category getProductCollection function to provide products with needed attributes
|
4 |
+
* @author Sergey Gozhedrianov <info@bintime.com>
|
5 |
+
*
|
6 |
+
*/
|
7 |
+
class Bintime_Icecatimport_Model_Catalog_Category extends Mage_Catalog_Model_Category
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* add product manufacturer attribute to category collection
|
11 |
+
*/
|
12 |
+
public function getProductCollection()
|
13 |
+
{
|
14 |
+
$collection = parent::getProductCollection();
|
15 |
+
$collection->addAttributeToSelect(Mage::getStoreConfig('icecat_root/icecat/manufacturer'));
|
16 |
+
return $collection;
|
17 |
+
}
|
18 |
+
}
|
19 |
?>
|
app/code/local/Bintime/Icecatimport/Model/Catalog/Product.php
CHANGED
@@ -1,134 +1,199 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Class overrides base Product Model to provide products icecat data
|
4 |
-
* @author Sergey Gozhedrianov <info@bintime.com>
|
5 |
-
*
|
6 |
-
*/
|
7 |
-
class Bintime_Icecatimport_Model_Catalog_Product extends Mage_Catalog_Model_Product
|
8 |
-
{
|
9 |
-
|
10 |
-
public function getName(){
|
11 |
-
|
12 |
-
|
13 |
-
$
|
14 |
-
$
|
15 |
-
$
|
16 |
-
|
17 |
-
->
|
18 |
-
->
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
$
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
$
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Class overrides base Product Model to provide products icecat data
|
4 |
+
* @author Sergey Gozhedrianov <info@bintime.com>
|
5 |
+
*
|
6 |
+
*/
|
7 |
+
class Bintime_Icecatimport_Model_Catalog_Product extends Mage_Catalog_Model_Product
|
8 |
+
{
|
9 |
+
|
10 |
+
public function getName(){
|
11 |
+
try {
|
12 |
+
$connection = Mage::getSingleton('core/resource')->getConnection('core_read');
|
13 |
+
$manufacturerId = $this->getData(Mage::getStoreConfig('icecat_root/icecat/manufacturer'));
|
14 |
+
$mpn = $this->getData(Mage::getStoreConfig('icecat_root/icecat/sku_field'));
|
15 |
+
$attributeInfo = Mage::getResourceModel('eav/entity_attribute_collection')
|
16 |
+
->setCodeFilter(Mage::getStoreConfig('icecat_root/icecat/manufacturer'))
|
17 |
+
->setEntityTypeFilter($this->getResource()->getTypeId())
|
18 |
+
->getFirstItem();
|
19 |
+
switch ($attributeInfo->getData('backend_type')) {
|
20 |
+
case 'int':
|
21 |
+
$attribute = $attributeInfo->setEntity($this->getResource());
|
22 |
+
$manufacturer = $attribute->getSource()->getOptionText($manufacturerId);
|
23 |
+
break;
|
24 |
+
default:
|
25 |
+
$manufacturer = $manufacturerId;
|
26 |
+
break;
|
27 |
+
}
|
28 |
+
|
29 |
+
$tableName = Mage::getSingleton('core/resource')->getTableName('icecatimport/data').'_products';
|
30 |
+
$selectCondition = $connection->select()
|
31 |
+
->from(array('connector' => $tableName), new Zend_Db_Expr('connector.prod_title'))
|
32 |
+
->where('connector.prod_id = ? ', $mpn);
|
33 |
+
$icecatName = $connection->fetchOne($selectCondition);
|
34 |
+
} catch (Exception $e) {
|
35 |
+
Mage::log('Icecat getName error'.$e);
|
36 |
+
}
|
37 |
+
|
38 |
+
$product_name = $icecatName ? str_replace("|"," ",$icecatName) : $this->getData('name');
|
39 |
+
return $product_name;
|
40 |
+
}
|
41 |
+
|
42 |
+
|
43 |
+
public function getImage(){
|
44 |
+
if(!parent::getImage()||parent::getImage() == 'no_selection'){
|
45 |
+
return "true";
|
46 |
+
}else {
|
47 |
+
return parent::getImage();
|
48 |
+
}
|
49 |
+
}
|
50 |
+
|
51 |
+
public function getShortDescription() {
|
52 |
+
|
53 |
+
if( !isset(self::$_product_source) ) {
|
54 |
+
$this->checkIcecatProdDescription();
|
55 |
+
}
|
56 |
+
|
57 |
+
$source = self::$_product_source;
|
58 |
+
|
59 |
+
if ('Icecat' == Mage::getStoreConfig('icecat_root/icecat/descript_priority') and $source != 'DB') {
|
60 |
+
return true;
|
61 |
+
} else {
|
62 |
+
return parent::getShortDescription();
|
63 |
+
}
|
64 |
+
}
|
65 |
+
|
66 |
+
public function getDescription() {
|
67 |
+
|
68 |
+
if( !isset(self::$_product_source) ) {
|
69 |
+
$this->checkIcecatProdDescription();
|
70 |
+
}
|
71 |
+
|
72 |
+
$source = self::$_product_source;
|
73 |
+
|
74 |
+
|
75 |
+
if ('Icecat' == Mage::getStoreConfig('icecat_root/icecat/descript_priority') and $source != 'DB' ) {
|
76 |
+
return true;
|
77 |
+
} else {
|
78 |
+
return parent::getDescription();
|
79 |
+
}
|
80 |
+
}
|
81 |
+
|
82 |
+
public function checkIcecatProdDescription($productId = '',$attributeName = '') {
|
83 |
+
|
84 |
+
$iceImport = new Bintime_Icecatimport_Model_Import();
|
85 |
+
|
86 |
+
if (empty($productId)) {
|
87 |
+
$productId = Mage::registry('current_product')->getId();
|
88 |
+
}
|
89 |
+
|
90 |
+
//$productId = Mage::registry('current_product')->getId();
|
91 |
+
$model = Mage::getModel('catalog/product');
|
92 |
+
$_product = $model->load($productId);
|
93 |
+
|
94 |
+
$mpn = $_product->getData(Mage::getStoreConfig('icecat_root/icecat/sku_field'));
|
95 |
+
$ean_code = $_product->getData(Mage::getStoreConfig('icecat_root/icecat/ean_code'));
|
96 |
+
$manufacturer = $_product->getData(Mage::getStoreConfig('icecat_root/icecat/manufacturer'));
|
97 |
+
$locale = Mage::getStoreConfig('icecat_root/icecat/language');
|
98 |
+
if ($locale == '0'){
|
99 |
+
$systemLocale = explode("_", Mage::app()->getLocale()->getLocaleCode());
|
100 |
+
$locale = $systemLocale[0];
|
101 |
+
}
|
102 |
+
$userLogin = Mage::getStoreConfig('icecat_root/icecat/login');
|
103 |
+
$userPass = Mage::getStoreConfig('icecat_root/icecat/password');
|
104 |
+
$entityId = $_product->getEntityId();
|
105 |
+
|
106 |
+
$descr[1] = false;
|
107 |
+
|
108 |
+
$descr[0] = $iceImport->getProductDescription($mpn, $manufacturer, $locale, $userLogin, $userPass, $entityId, $ean_code);
|
109 |
+
|
110 |
+
if (!empty($iceImport->simpleDoc)){
|
111 |
+
$productTag = $iceImport->simpleDoc->Product;
|
112 |
+
$descr[1] = (string) $productTag->ProductDescription['ShortDesc'];
|
113 |
+
} else if(!empty($descr[0]) && $attributeName == 'short_description') {
|
114 |
+
$descr[1] = $iceImport->getShortProductDescription();
|
115 |
+
}
|
116 |
+
//$productTag = $iceImport->simpleDoc->Product;
|
117 |
+
// $descr[1] = (string) $productTag->ProductDescription['ShortDesc'];
|
118 |
+
if($descr[0] == false and $descr[1] == false) {
|
119 |
+
self::$_product_source = 'DB';
|
120 |
+
} else if ($attributeName == 'short_description') {
|
121 |
+
self::$_product_source = '';
|
122 |
+
return $descr[1];
|
123 |
+
} else if ($attributeName == 'name') {
|
124 |
+
return $iceImport->getProductName();
|
125 |
+
}
|
126 |
+
}
|
127 |
+
|
128 |
+
|
129 |
+
/**
|
130 |
+
* Entity code.
|
131 |
+
* Can be used as part of method name for entity processing
|
132 |
+
*/
|
133 |
+
const ENTITY = 'catalog_product';
|
134 |
+
|
135 |
+
const CACHE_TAG = 'catalog_product';
|
136 |
+
protected $_cacheTag = 'catalog_product';
|
137 |
+
protected $_eventPrefix = 'catalog_product';
|
138 |
+
protected $_eventObject = 'product';
|
139 |
+
protected $_canAffectOptions = false;
|
140 |
+
|
141 |
+
/**
|
142 |
+
* Product type instance
|
143 |
+
*
|
144 |
+
* @var Mage_Catalog_Model_Product_Type_Abstract
|
145 |
+
*/
|
146 |
+
protected $_typeInstance = null;
|
147 |
+
|
148 |
+
/**
|
149 |
+
* Product type instance as singleton
|
150 |
+
*/
|
151 |
+
protected $_typeInstanceSingleton = null;
|
152 |
+
|
153 |
+
/**
|
154 |
+
* Product link instance
|
155 |
+
*
|
156 |
+
* @var Mage_Catalog_Model_Product_Link
|
157 |
+
*/
|
158 |
+
protected $_linkInstance;
|
159 |
+
|
160 |
+
/**
|
161 |
+
* Product object customization (not stored in DB)
|
162 |
+
*
|
163 |
+
* @var array
|
164 |
+
*/
|
165 |
+
protected $_customOptions = array();
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Product Url Instance
|
169 |
+
*
|
170 |
+
* @var Mage_Catalog_Model_Product_Url
|
171 |
+
*/
|
172 |
+
protected $_urlModel = null;
|
173 |
+
protected static $_url;
|
174 |
+
protected static $_urlRewrite;
|
175 |
+
protected $_errors = array();
|
176 |
+
protected $_optionInstance;
|
177 |
+
protected $_options = array();
|
178 |
+
|
179 |
+
/**
|
180 |
+
* Product reserved attribute codes
|
181 |
+
*/
|
182 |
+
protected $_reservedAttributes;
|
183 |
+
|
184 |
+
/**
|
185 |
+
* Flag for available duplicate function
|
186 |
+
*
|
187 |
+
* @var boolean
|
188 |
+
*/
|
189 |
+
protected $_isDuplicable = true;
|
190 |
+
|
191 |
+
/**
|
192 |
+
* Source of product data
|
193 |
+
*
|
194 |
+
* @var string
|
195 |
+
*/
|
196 |
+
public static $_product_source = '';
|
197 |
+
|
198 |
+
}
|
199 |
+
?>
|
app/code/local/Bintime/Icecatimport/Model/Catalog/Search.php
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* class overrides search getProductCollection function to provide products with needed attributes
|
4 |
-
* @author Sergey Gozhedrianov <info@bintime.com>
|
5 |
-
*
|
6 |
-
*/
|
7 |
-
class Bintime_Icecatimport_Model_Catalog_Search extends Mage_CatalogSearch_Model_Mysql4_Fulltext_Collection
|
8 |
-
{
|
9 |
-
public function _beforeLoad()
|
10 |
-
{
|
11 |
-
$this->addAttributeToSelect(Mage::getStoreConfig('icecat_root/icecat/manufacturer'));
|
12 |
-
return parent::_beforeLoad();
|
13 |
-
}
|
14 |
-
}
|
15 |
?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* class overrides search getProductCollection function to provide products with needed attributes
|
4 |
+
* @author Sergey Gozhedrianov <info@bintime.com>
|
5 |
+
*
|
6 |
+
*/
|
7 |
+
class Bintime_Icecatimport_Model_Catalog_Search extends Mage_CatalogSearch_Model_Mysql4_Fulltext_Collection
|
8 |
+
{
|
9 |
+
public function _beforeLoad()
|
10 |
+
{
|
11 |
+
$this->addAttributeToSelect(Mage::getStoreConfig('icecat_root/icecat/manufacturer'));
|
12 |
+
return parent::_beforeLoad();
|
13 |
+
}
|
14 |
+
}
|
15 |
?>
|
app/code/local/Bintime/Icecatimport/Model/Imagescollection.php
CHANGED
@@ -1,45 +1,45 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Bintime_Icecatimport_Model_Imagescollection extends Varien_Data_Collection {
|
4 |
-
|
5 |
-
protected $_data = array();
|
6 |
-
|
7 |
-
public function __construct() {
|
8 |
-
parent::__construct();
|
9 |
-
|
10 |
-
// not extends Varien_Object
|
11 |
-
$args = func_get_args();
|
12 |
-
if (empty($args[0])) {
|
13 |
-
$args[0] = array();
|
14 |
-
}
|
15 |
-
$this->_data = $args[0];
|
16 |
-
if (isset($this->_data['product'])) {
|
17 |
-
|
18 |
-
$helper = new Bintime_Icecatimport_Helper_Image();
|
19 |
-
if (isset($this->_data['is_media']) && $this->_data['is_media']){
|
20 |
-
// add product main image also
|
21 |
-
// @todo @someday if needed add product image also
|
22 |
-
}
|
23 |
-
$gallery = $helper->getGallery();
|
24 |
-
foreach ($gallery as $item) {
|
25 |
-
$this->addItem($this->convertIcecatImageToVarienObject($item));
|
26 |
-
}
|
27 |
-
|
28 |
-
}
|
29 |
-
}
|
30 |
-
|
31 |
-
private function convertIcecatImageToVarienObject($image) {
|
32 |
-
$data = array(
|
33 |
-
// 'id'=>$image['product_picture_id'],
|
34 |
-
// 'value_id'=>$image['product_picture_id'],
|
35 |
-
'file'=>$image['pic'],
|
36 |
-
'thumb'=>$image['thumb']
|
37 |
-
);
|
38 |
-
$item = new Varien_Object();
|
39 |
-
$item->addData($data);
|
40 |
-
return $item;
|
41 |
-
}
|
42 |
-
|
43 |
-
}
|
44 |
-
|
45 |
-
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Bintime_Icecatimport_Model_Imagescollection extends Varien_Data_Collection {
|
4 |
+
|
5 |
+
protected $_data = array();
|
6 |
+
|
7 |
+
public function __construct() {
|
8 |
+
parent::__construct();
|
9 |
+
|
10 |
+
// not extends Varien_Object
|
11 |
+
$args = func_get_args();
|
12 |
+
if (empty($args[0])) {
|
13 |
+
$args[0] = array();
|
14 |
+
}
|
15 |
+
$this->_data = $args[0];
|
16 |
+
if (isset($this->_data['product'])) {
|
17 |
+
|
18 |
+
$helper = new Bintime_Icecatimport_Helper_Image();
|
19 |
+
if (isset($this->_data['is_media']) && $this->_data['is_media']){
|
20 |
+
// add product main image also
|
21 |
+
// @todo @someday if needed add product image also
|
22 |
+
}
|
23 |
+
$gallery = $helper->getGallery();
|
24 |
+
foreach ($gallery as $item) {
|
25 |
+
$this->addItem($this->convertIcecatImageToVarienObject($item));
|
26 |
+
}
|
27 |
+
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
private function convertIcecatImageToVarienObject($image) {
|
32 |
+
$data = array(
|
33 |
+
// 'id'=>$image['product_picture_id'],
|
34 |
+
// 'value_id'=>$image['product_picture_id'],
|
35 |
+
'file'=>$image['pic'],
|
36 |
+
'thumb'=>$image['thumb']
|
37 |
+
);
|
38 |
+
$item = new Varien_Object();
|
39 |
+
$item->addData($data);
|
40 |
+
return $item;
|
41 |
+
}
|
42 |
+
|
43 |
+
}
|
44 |
+
|
45 |
+
?>
|
app/code/local/Bintime/Icecatimport/Model/Import.php
CHANGED
@@ -1,374 +1,515 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Class performs Curl request to ICEcat and fetches xml data with product description
|
4 |
-
* @author Sergey Gozhedrianov <info@bintime.com>
|
5 |
-
*
|
6 |
-
*/
|
7 |
-
class Bintime_Icecatimport_Model_Import extends Mage_Core_Model_Abstract {
|
8 |
-
|
9 |
-
public $entityId;
|
10 |
-
private $productDescriptionList = array();
|
11 |
-
private $productDescription;
|
12 |
-
private $fullProductDescription;
|
13 |
-
private $lowPicUrl;
|
14 |
-
private $highPicUrl;
|
15 |
-
private $errorMessage;
|
16 |
-
private $galleryPhotos = array();
|
17 |
-
private $productName;
|
18 |
-
private $relatedProducts = array();
|
19 |
-
private $thumb;
|
20 |
-
private $errorSystemMessage; //depricated
|
21 |
-
private $_cacheKey = 'bintime_icecatimport_';
|
22 |
-
|
23 |
-
private $_warrantyInfo = '';
|
24 |
-
private $_shortSummaryDesc = '';
|
25 |
-
private $_longSummaryDesc = '';
|
26 |
-
|
27 |
-
private $_manualPdfUrl = '';
|
28 |
-
private $_pdfUrl = '';
|
29 |
-
private $_multimedia = '';
|
30 |
-
|
31 |
-
protected function _construct() {
|
32 |
-
$this->_init('icecatimport/import');
|
33 |
-
}
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Perform Curl request with corresponding param check and error processing
|
37 |
-
* @param int $productId
|
38 |
-
* @param string $vendorName
|
39 |
-
* @param string $locale
|
40 |
-
* @param string $userName
|
41 |
-
* @param string $userPass
|
42 |
-
*/
|
43 |
-
public function getProductDescription($productId, $vendorName, $locale, $userName, $userPass, $entityId, $ean_code){
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
if (empty($
|
54 |
-
$this->errorMessage = "No ICEcat
|
55 |
-
return false;
|
56 |
-
}
|
57 |
-
if (empty($
|
58 |
-
$this->errorMessage = "
|
59 |
-
return false;
|
60 |
-
}
|
61 |
-
if (
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
$
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
$
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
if (
|
201 |
-
$
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
return
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
$this->
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Class performs Curl request to ICEcat and fetches xml data with product description
|
4 |
+
* @author Sergey Gozhedrianov <info@bintime.com>
|
5 |
+
*
|
6 |
+
*/
|
7 |
+
class Bintime_Icecatimport_Model_Import extends Mage_Core_Model_Abstract {
|
8 |
+
|
9 |
+
public $entityId;
|
10 |
+
private $productDescriptionList = array();
|
11 |
+
private $productDescription;
|
12 |
+
private $fullProductDescription;
|
13 |
+
private $lowPicUrl;
|
14 |
+
private $highPicUrl;
|
15 |
+
private $errorMessage;
|
16 |
+
private $galleryPhotos = array();
|
17 |
+
private $productName;
|
18 |
+
private $relatedProducts = array();
|
19 |
+
private $thumb;
|
20 |
+
private $errorSystemMessage; //depricated
|
21 |
+
private $_cacheKey = 'bintime_icecatimport_';
|
22 |
+
|
23 |
+
private $_warrantyInfo = '';
|
24 |
+
private $_shortSummaryDesc = '';
|
25 |
+
private $_longSummaryDesc = '';
|
26 |
+
|
27 |
+
private $_manualPdfUrl = '';
|
28 |
+
private $_pdfUrl = '';
|
29 |
+
private $_multimedia = '';
|
30 |
+
|
31 |
+
protected function _construct() {
|
32 |
+
$this->_init('icecatimport/import');
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Perform Curl request with corresponding param check and error processing
|
37 |
+
* @param int $productId
|
38 |
+
* @param string $vendorName
|
39 |
+
* @param string $locale
|
40 |
+
* @param string $userName
|
41 |
+
* @param string $userPass
|
42 |
+
*/
|
43 |
+
public function getProductDescription($productId, $vendorName, $locale, $userName, $userPass, $entityId, $ean_code){
|
44 |
+
|
45 |
+
$this->entityId = $entityId;
|
46 |
+
$error = '';
|
47 |
+
if (null === $this->simpleDoc) {
|
48 |
+
|
49 |
+
if (true || (!$cacheDataXml = Mage::app()->getCache()->load($this->_cacheKey . $entityId . '_' . $locale))) {
|
50 |
+
|
51 |
+
$dataUrl = 'http://data.icecat.biz/xml_s3/xml_server3.cgi';
|
52 |
+
$successRespondByMPNVendorFlag = false;
|
53 |
+
if ( empty($userName)) {
|
54 |
+
$this->errorMessage = "No ICEcat login provided";
|
55 |
+
return false;
|
56 |
+
}
|
57 |
+
if (empty($userPass)){
|
58 |
+
$this->errorMessage = "No ICEcat password provided";
|
59 |
+
return false;
|
60 |
+
}
|
61 |
+
if (empty($locale)) {
|
62 |
+
$this->errorMessage = "Please specify product description locale";
|
63 |
+
return false;
|
64 |
+
}
|
65 |
+
if ((empty($productId) && empty($ean_code))
|
66 |
+
|| (empty($vendorName) && empty($ean_code))) {
|
67 |
+
$this->errorMessage = 'Given product has invalid IceCat data';
|
68 |
+
return false;
|
69 |
+
}
|
70 |
+
|
71 |
+
if (!empty($productId) && !empty($vendorName)) {
|
72 |
+
|
73 |
+
$resultString = $this->_getIceCatData($userName, $userPass, $dataUrl, array(
|
74 |
+
"prod_id" => $productId,
|
75 |
+
"lang" => $locale,
|
76 |
+
"vendor" => $vendorName,
|
77 |
+
"output" => 'productxml'
|
78 |
+
));
|
79 |
+
|
80 |
+
if ($this->parseXml($resultString)) {
|
81 |
+
if (!$this->checkIcecatResponse()) {
|
82 |
+
$successRespondByMPNVendorFlag = true;
|
83 |
+
}
|
84 |
+
}
|
85 |
+
}
|
86 |
+
|
87 |
+
// if get data by MPN & brand name wrong => trying by Ean code
|
88 |
+
if (!$successRespondByMPNVendorFlag) {
|
89 |
+
if (!empty($ean_code)) {
|
90 |
+
$resultString = $this->_getIceCatData($userName, $userPass, $dataUrl, array(
|
91 |
+
'ean_upc' => trim($ean_code),
|
92 |
+
'lang' => $locale,
|
93 |
+
'output' => 'productxml'
|
94 |
+
));
|
95 |
+
|
96 |
+
if (!$this->parseXml($resultString)) {
|
97 |
+
$error = true;
|
98 |
+
$this->simpleDoc = null;
|
99 |
+
}
|
100 |
+
if ($this->checkIcecatResponse()) {
|
101 |
+
$error = true;
|
102 |
+
$this->simpleDoc = null;
|
103 |
+
}
|
104 |
+
} else {
|
105 |
+
$error = true;
|
106 |
+
}
|
107 |
+
if ($error) {
|
108 |
+
$this->errorMessage = 'Given product has invalid IceCat data';
|
109 |
+
return false;
|
110 |
+
}
|
111 |
+
}
|
112 |
+
Mage::app()->getCache()->save($resultString, $this->_cacheKey . $entityId . '_' . $locale);
|
113 |
+
} else {
|
114 |
+
$resultString = $cacheDataXml;
|
115 |
+
|
116 |
+
if (!$this->parseXml($resultString)){
|
117 |
+
return false;
|
118 |
+
}
|
119 |
+
if ($this->checkIcecatResponse()){
|
120 |
+
return false;
|
121 |
+
}
|
122 |
+
}
|
123 |
+
|
124 |
+
$this->loadProductDescriptionList();
|
125 |
+
$this->loadOtherProductParams($productId);
|
126 |
+
$this->loadGalleryPhotos();
|
127 |
+
Varien_Profiler::start('Bintime FILE RELATED');
|
128 |
+
$this->loadRelatedProducts();
|
129 |
+
Varien_Profiler::stop('Bintime FILE RELATED');
|
130 |
+
|
131 |
+
}
|
132 |
+
return true;
|
133 |
+
}
|
134 |
+
|
135 |
+
private function _getIceCatData($userName, $userPass, $dataUrl, $productAttributes){
|
136 |
+
try{
|
137 |
+
$webClient = new Zend_Http_Client();
|
138 |
+
$webClient->setUri($dataUrl);
|
139 |
+
$webClient->setMethod(Zend_Http_Client::GET);
|
140 |
+
$webClient->setHeaders('Content-Type: text/xml; charset=UTF-8');
|
141 |
+
$webClient->setParameterGet($productAttributes);
|
142 |
+
$webClient->setAuth($userName, $userPass, Zend_Http_CLient::AUTH_BASIC);
|
143 |
+
$response = $webClient->request();
|
144 |
+
if ($response->isError()){
|
145 |
+
$this->errorMessage = 'Response Status: '.$response->getStatus()." Response Message: ".$response->getMessage();
|
146 |
+
return false;
|
147 |
+
}
|
148 |
+
} catch (Exception $e) {
|
149 |
+
$this->errorMessage = "Warning: cannot connect to ICEcat. {$e->getMessage()}";
|
150 |
+
return false;
|
151 |
+
}
|
152 |
+
return $response->getBody();
|
153 |
+
}
|
154 |
+
|
155 |
+
public function getSystemError(){
|
156 |
+
return $this->errorSystemMessage;
|
157 |
+
}
|
158 |
+
|
159 |
+
public function getProductName(){
|
160 |
+
return $this->productName;
|
161 |
+
}
|
162 |
+
|
163 |
+
public function getGalleryPhotos(){
|
164 |
+
return $this->galleryPhotos;
|
165 |
+
}
|
166 |
+
|
167 |
+
public function getThumbPicture(){
|
168 |
+
return $this->thumb;
|
169 |
+
}
|
170 |
+
|
171 |
+
public function getImg($productId) {
|
172 |
+
$model = Mage::getModel('catalog/product');
|
173 |
+
$_product = $model->load($productId);
|
174 |
+
$entity_id = $_product->getEntityId();
|
175 |
+
$ean_code = $_product->getData(Mage::getStoreConfig('icecat_root/icecat/ean_code'));
|
176 |
+
$vendorName = $_product->getData(Mage::getStoreConfig('icecat_root/icecat/manufacturer'));
|
177 |
+
$locale = Mage::getStoreConfig('icecat_root/icecat/language');
|
178 |
+
if ($locale == '0'){
|
179 |
+
$systemLocale = explode("_", Mage::app()->getLocale()->getLocaleCode());
|
180 |
+
$locale = $systemLocale[0];
|
181 |
+
}
|
182 |
+
$userLogin = Mage::getStoreConfig('icecat_root/icecat/login');
|
183 |
+
$userPass = Mage::getStoreConfig('icecat_root/icecat/password');
|
184 |
+
$mpn = $_product->getData(Mage::getStoreConfig('icecat_root/icecat/sku_field'));
|
185 |
+
$this->getProductDescription($mpn, $vendorName, $locale, $userLogin, $userPass, $entity_id, $ean_code);
|
186 |
+
if ($this->simpleDoc) {
|
187 |
+
return $this->highPicUrl;
|
188 |
+
}
|
189 |
+
}
|
190 |
+
|
191 |
+
/**
|
192 |
+
* load Gallery array from XML
|
193 |
+
*/
|
194 |
+
private function loadGalleryPhotos(){
|
195 |
+
$galleryPhotos = $this->simpleDoc->Product->ProductGallery->ProductPicture;
|
196 |
+
if (!count($galleryPhotos)){
|
197 |
+
return false;
|
198 |
+
}
|
199 |
+
foreach($galleryPhotos as $photo){
|
200 |
+
if ($photo["Size"] > 0){
|
201 |
+
$picHeight = (int)$photo["PicHeight"];
|
202 |
+
$picWidth = (int)$photo["PicWidth"];
|
203 |
+
$thumbUrl = (string)$photo["ThumbPic"];
|
204 |
+
$picUrl = (string)$photo["Pic"];
|
205 |
+
|
206 |
+
array_push($this->galleryPhotos, array(
|
207 |
+
'height' => $picHeight,
|
208 |
+
'width' => $picWidth,
|
209 |
+
'thumb' => $thumbUrl,
|
210 |
+
'pic' => $picUrl
|
211 |
+
));
|
212 |
+
}
|
213 |
+
}
|
214 |
+
}
|
215 |
+
|
216 |
+
public function getErrorMessage(){
|
217 |
+
return $this->errorMessage;
|
218 |
+
}
|
219 |
+
|
220 |
+
/**
|
221 |
+
* Checks response XML for error messages
|
222 |
+
*/
|
223 |
+
private function checkIcecatResponse(){
|
224 |
+
$errorMessage = $this->simpleDoc->Product['ErrorMessage'];
|
225 |
+
if ($errorMessage != ''){
|
226 |
+
if (preg_match('/^No xml data/', $errorMessage)){
|
227 |
+
$this->errorSystemMessage = $errorMessage;
|
228 |
+
return true;
|
229 |
+
}
|
230 |
+
if (preg_match('/^The specified vendor does not exist$/', $errorMessage)) {
|
231 |
+
$this->errorSystemMessage = $errorMessage;
|
232 |
+
return true;
|
233 |
+
}
|
234 |
+
$this->errorMessage = "Ice Cat Error: ".$errorMessage;
|
235 |
+
return true;
|
236 |
+
}
|
237 |
+
return false;
|
238 |
+
}
|
239 |
+
|
240 |
+
public function getProductDescriptionList(){
|
241 |
+
return $this->productDescriptionList;
|
242 |
+
}
|
243 |
+
|
244 |
+
public function getShortProductDescription(){
|
245 |
+
return $this->productDescription;
|
246 |
+
}
|
247 |
+
|
248 |
+
public function getFullProductDescription(){
|
249 |
+
return $this->fullProductDescription;
|
250 |
+
}
|
251 |
+
|
252 |
+
public function getLowPicUrl(){
|
253 |
+
return $this->highPicUrl;
|
254 |
+
}
|
255 |
+
|
256 |
+
public function getRelatedProducts(){
|
257 |
+
return $this->relatedProducts;
|
258 |
+
}
|
259 |
+
|
260 |
+
public function getVendor(){
|
261 |
+
return $this->vendor;
|
262 |
+
}
|
263 |
+
|
264 |
+
public function getMPN(){
|
265 |
+
return $this->productId;
|
266 |
+
}
|
267 |
+
|
268 |
+
public function getEAN(){
|
269 |
+
return $this->EAN;
|
270 |
+
}
|
271 |
+
|
272 |
+
public function getWarrantyInfo(){
|
273 |
+
return $this->_warrantyInfo;
|
274 |
+
}
|
275 |
+
|
276 |
+
public function getShortSummaryDescription(){
|
277 |
+
return $this->_shortSummaryDesc;
|
278 |
+
}
|
279 |
+
|
280 |
+
public function getLongSummaryDescription(){
|
281 |
+
return $this->_longSummaryDesc;
|
282 |
+
}
|
283 |
+
|
284 |
+
public function getManualPDF(){
|
285 |
+
return $this->_manualPdfUrl;
|
286 |
+
}
|
287 |
+
|
288 |
+
public function getPDF(){
|
289 |
+
return $this->_pdfUrl;
|
290 |
+
}
|
291 |
+
|
292 |
+
public function getIceCatMedia(){
|
293 |
+
return $this->_multimedia;
|
294 |
+
}
|
295 |
+
|
296 |
+
/**
|
297 |
+
* Form related products Array
|
298 |
+
*/
|
299 |
+
private function loadRelatedProducts(){
|
300 |
+
$relatedProductsArray = $this->simpleDoc->Product->ProductRelated;
|
301 |
+
if (count($relatedProductsArray)){
|
302 |
+
foreach($relatedProductsArray as $product){
|
303 |
+
$productArray = array();
|
304 |
+
$productNS = $product->Product;
|
305 |
+
$productArray['name'] = (string)$productNS['Name'];
|
306 |
+
$productArray['thumb'] = (string)$productNS['ThumbPic'];
|
307 |
+
$mpn = (string)$productNS['Prod_id'];
|
308 |
+
$productSupplier = $productNS->Supplier;
|
309 |
+
$productSupplierId = (int)$productSupplier['ID'];
|
310 |
+
$productArray['supplier_thumb'] = 'http://images2.icecat.biz/thumbs/SUP'.$productSupplierId.'.jpg';
|
311 |
+
$productArray['supplier_name'] = (string)$productSupplier['Name'];
|
312 |
+
$this->relatedProducts[$mpn] = $productArray;
|
313 |
+
}
|
314 |
+
}
|
315 |
+
}
|
316 |
+
|
317 |
+
/**
|
318 |
+
* Form product feature Arrray
|
319 |
+
*/
|
320 |
+
private function loadProductDescriptionList(){
|
321 |
+
$descriptionArray = array();
|
322 |
+
$specGroups = $this->simpleDoc->Product->CategoryFeatureGroup;
|
323 |
+
$specFeatures = $this->simpleDoc->Product->ProductFeature;
|
324 |
+
foreach($specFeatures as $feature){
|
325 |
+
$id = (int)$feature['CategoryFeatureGroup_ID'];
|
326 |
+
$featureText = (string)$feature["Presentation_Value"];
|
327 |
+
$featureValue = (string)$feature["Value"];
|
328 |
+
$featureName = (string)$feature->Feature->Name["Value"];
|
329 |
+
if ($featureValue == 'Y' || $featureValue == 'N') {
|
330 |
+
$featureText = $featureValue;
|
331 |
+
}
|
332 |
+
foreach($specGroups as $group){
|
333 |
+
$groupId = (int)$group["ID"];
|
334 |
+
if ($groupId == $id){
|
335 |
+
$groupName = (string) $group->FeatureGroup->Name["Value"];
|
336 |
+
$rating = (int)$group['No'];
|
337 |
+
$descriptionArray[$rating][$groupName][$featureName] = $featureText;
|
338 |
+
break;
|
339 |
+
}
|
340 |
+
}
|
341 |
+
}
|
342 |
+
krsort($descriptionArray);
|
343 |
+
$this->productDescriptionList = $descriptionArray;
|
344 |
+
}
|
345 |
+
|
346 |
+
/**
|
347 |
+
* Form Array of non feature-value product params
|
348 |
+
*/
|
349 |
+
private function loadOtherProductParams($productId){
|
350 |
+
$productTag = $this->simpleDoc->Product;
|
351 |
+
$this->productDescription = (string)$productTag->ProductDescription['ShortDesc'];
|
352 |
+
$this->fullProductDescription = (string)$productTag->ProductDescription['LongDesc'];
|
353 |
+
$this->_warrantyInfo = (string)$productTag->ProductDescription['WarrantyInfo'];
|
354 |
+
$this->_shortSummaryDesc = (string)$productTag->SummaryDescription->ShortSummaryDescription;
|
355 |
+
$this->_longSummaryDesc = (string)$productTag->SummaryDescription->LongSummaryDescription;
|
356 |
+
$this->_manualPdfUrl = (string)$productTag->ProductDescription['ManualPDFURL'];
|
357 |
+
$this->_pdfUrl = (string)$productTag->ProductDescription['PDFURL'];
|
358 |
+
$this->_multimedia = $productTag->ProductMultimediaObject->MultimediaObject;
|
359 |
+
$baseDir = Mage::getSingleton('catalog/product_media_config')->getBaseMediaPath().'/';
|
360 |
+
if (!empty($productTag["HighPic"])) {
|
361 |
+
$this->highPicUrl = $this->saveImg($this->entityId,(string)$productTag["HighPic"]);
|
362 |
+
} else if (!empty($productTag["LowPic"])) {
|
363 |
+
$this->lowPicUrl = $this->saveImg($this->entityId,(string)$productTag["LowPic"],'small');
|
364 |
+
} else {
|
365 |
+
$this->thumb = $this->saveImg($this->entityId,(string)$productTag["ThumbPic"],'thumb');
|
366 |
+
}
|
367 |
+
|
368 |
+
$this->productName = (string)$productTag["Title"];
|
369 |
+
$this->productId = (string)$productTag['Prod_id'];
|
370 |
+
$this->vendor = (string)$productTag->Supplier['Name'];
|
371 |
+
$prodEAN = $productTag->EANCode;
|
372 |
+
$EANstr = '';
|
373 |
+
$EANarr = null;
|
374 |
+
$j = 0;//counter
|
375 |
+
foreach($prodEAN as $ellEAN){
|
376 |
+
$EANarr[]=$ellEAN['EAN'];$j++;
|
377 |
+
}
|
378 |
+
$i = 0;
|
379 |
+
$str = '';
|
380 |
+
for ($i=0;$i<$j;$i++) {
|
381 |
+
$g = $i%2;
|
382 |
+
if ($g == '0') {
|
383 |
+
if($j == 1){
|
384 |
+
$str .= $EANarr[$i].'<br>';
|
385 |
+
} else {$str .= $EANarr[$i].', ';}
|
386 |
+
} else {if($i != $j-1){$str .= $EANarr[$i].', <br>';}else {$str .= $EANarr[$i].' <br>';}}
|
387 |
+
}
|
388 |
+
$this->EAN = $str;
|
389 |
+
}
|
390 |
+
|
391 |
+
/**
|
392 |
+
* parse response XML: to SimpleXml
|
393 |
+
* @param string $stringXml
|
394 |
+
*/
|
395 |
+
private function parseXml($stringXml){
|
396 |
+
libxml_use_internal_errors(true);
|
397 |
+
$this->simpleDoc = simplexml_load_string($stringXml);
|
398 |
+
if ($this->simpleDoc){
|
399 |
+
return true;
|
400 |
+
}
|
401 |
+
$this->simpleDoc = simplexml_load_string(utf8_encode($stringXml));
|
402 |
+
if ($this->simpleDoc){
|
403 |
+
return true;
|
404 |
+
}
|
405 |
+
return false;
|
406 |
+
}
|
407 |
+
|
408 |
+
/**
|
409 |
+
* save icecat img
|
410 |
+
* @param int $productId
|
411 |
+
* @param string $img_url
|
412 |
+
* @param string $img_type
|
413 |
+
*/
|
414 |
+
public function saveImg($productId,$img_url,$imgtype = '') {
|
415 |
+
$test_loader = Mage::getBaseDir('var') . $this->_connectorDir . 'test_img.txt';
|
416 |
+
|
417 |
+
$pathinfo = pathinfo($img_url);
|
418 |
+
$img_type= $pathinfo["extension"];
|
419 |
+
$img_name = md5($img_url);
|
420 |
+
//$img_name = $pathinfo["filename"];
|
421 |
+
$img = $img_name.".".$img_type;
|
422 |
+
$baseDir = Mage::getSingleton('catalog/product_media_config')->getBaseMediaPath().'/';
|
423 |
+
$local_img = strstr($img_url,Mage::getStoreConfig('web/unsecure/base_url'));
|
424 |
+
|
425 |
+
if (!file_exists($baseDir.$img) && !$local_img) {
|
426 |
+
file_put_contents($test_loader,' here 424 prod - '.$productId.' img '.$baseDir.$img.' ',FILE_APPEND);
|
427 |
+
$client = new Zend_Http_Client($img_url);
|
428 |
+
$content=$client->request();
|
429 |
+
if ($content->isError()) {
|
430 |
+
file_put_contents($test_loader,' here 428 '.$productId.' ',FILE_APPEND);
|
431 |
+
return $img_url;
|
432 |
+
}
|
433 |
+
$file = file_put_contents($baseDir.$img,$content->getBody());
|
434 |
+
if ($file) {
|
435 |
+
$this->addProductImageQuery($productId,$img,$imgtype);
|
436 |
+
file_put_contents($test_loader,' here 434 '.$productId.' ',FILE_APPEND);
|
437 |
+
return $img;
|
438 |
+
} else {
|
439 |
+
file_put_contents($test_loader,' here 437 '.$productId.' ',FILE_APPEND);
|
440 |
+
return $img_url;
|
441 |
+
}
|
442 |
+
} else if($local_img) {
|
443 |
+
file_put_contents($test_loader,' here 441 '.$productId.' ',FILE_APPEND);
|
444 |
+
return $img_url;
|
445 |
+
} else {
|
446 |
+
file_put_contents($test_loader,' here 443 '.$productId.' ',FILE_APPEND);
|
447 |
+
return $img;
|
448 |
+
}
|
449 |
+
}
|
450 |
+
|
451 |
+
public function addProductImageQuery($productId,$img,$type = '') {
|
452 |
+
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
|
453 |
+
$tablePrefix = (array)Mage::getConfig()->getTablePrefix();
|
454 |
+
if (!empty($tablePrefix[0])) {
|
455 |
+
$tablePrefix = $tablePrefix[0];
|
456 |
+
} else {
|
457 |
+
$tablePrefix = '';
|
458 |
+
}
|
459 |
+
|
460 |
+
$attr_query = "SELECT @product_entity_type_id := `entity_type_id` FROM `" .$tablePrefix . "eav_entity_type` WHERE
|
461 |
+
entity_type_code = 'catalog_product';
|
462 |
+
SELECT @attribute_set_id := `entity_type_id` FROM `" . $tablePrefix . "eav_entity_type` WHERE
|
463 |
+
entity_type_code = 'catalog_product';
|
464 |
+
SELECT @gallery := `attribute_id` FROM `" . $tablePrefix . "eav_attribute` WHERE
|
465 |
+
`attribute_code` = 'media_gallery' AND entity_type_id = @product_entity_type_id;
|
466 |
+
SELECT @base := `attribute_id` FROM `" . $tablePrefix . "eav_attribute` WHERE `attribute_code` = 'image' AND entity_type_id = @product_entity_type_id;
|
467 |
+
SELECT @small := `attribute_id` FROM `" . $tablePrefix . "eav_attribute` WHERE
|
468 |
+
`attribute_code` = 'small_image' AND entity_type_id = @product_entity_type_id;
|
469 |
+
SELECT @thumb := `attribute_id` FROM `" . $tablePrefix . "eav_attribute` WHERE
|
470 |
+
`attribute_code` = 'thumbnail' AND entity_type_id = @product_entity_type_id;";
|
471 |
+
|
472 |
+
$db->query($attr_query, array(':attribute_set' => Mage::getModel('catalog/product')->getResource()->getEntityType()->getDefaultAttributeSetId() ));
|
473 |
+
|
474 |
+
$DefaultStoreId = Mage::app()->getWebsite()->getDefaultGroup()->getDefaultStoreId();
|
475 |
+
|
476 |
+
if (empty($type) || $type == 'image') {
|
477 |
+
|
478 |
+
$db->query(" INSERT INTO `" .$tablePrefix . "catalog_product_entity_varchar`
|
479 |
+
(entity_type_id,attribute_id,store_id,entity_id,value)
|
480 |
+
VALUES(@product_entity_type_id,@base,:store_id,:entity_id,:img )
|
481 |
+
ON DUPLICATE KEY UPDATE value = :img",array(
|
482 |
+
':store_id' => $DefaultStoreId,
|
483 |
+
':entity_id' => $productId,
|
484 |
+
':img' => $img));
|
485 |
+
|
486 |
+
$db->query(" INSERT INTO `" .$tablePrefix . "catalog_product_entity_varchar`
|
487 |
+
(entity_type_id,attribute_id,store_id,entity_id,value)
|
488 |
+
VALUES(@product_entity_type_id,@small,:store_id,:entity_id,:img )
|
489 |
+
ON DUPLICATE KEY UPDATE value = :img",array(
|
490 |
+
':store_id' => $DefaultStoreId,
|
491 |
+
':entity_id' => $productId,
|
492 |
+
':img' => $img));
|
493 |
+
|
494 |
+
$db->query(" INSERT INTO `" .$tablePrefix . "catalog_product_entity_varchar`
|
495 |
+
(entity_type_id,attribute_id,store_id,entity_id,value)
|
496 |
+
VALUES(@product_entity_type_id,@thumb,:store_id,:entity_id,:img )
|
497 |
+
ON DUPLICATE KEY UPDATE value = :img",array(
|
498 |
+
':store_id' => $DefaultStoreId,
|
499 |
+
':entity_id' => $productId,
|
500 |
+
':img' => $img));
|
501 |
+
}
|
502 |
+
$db->query(" INSERT INTO `" .$tablePrefix . "catalog_product_entity_media_gallery` (attribute_id,entity_id,value)
|
503 |
+
VALUES(@gallery,:entity_id,:img )",array(
|
504 |
+
':entity_id' => $productId,
|
505 |
+
':img' => $img ));
|
506 |
+
|
507 |
+
$db->query(" INSERT INTO `" .$tablePrefix . "catalog_product_entity_media_gallery_value`
|
508 |
+
(value_id,store_id,label,position,disabled)
|
509 |
+
VALUES(LAST_INSERT_ID(),:store_id,'',1,0 )",array(
|
510 |
+
':store_id' => $DefaultStoreId));
|
511 |
+
}
|
512 |
+
|
513 |
+
}
|
514 |
+
|
515 |
+
?>
|
app/code/local/Bintime/Icecatimport/Model/Observer.php
CHANGED
@@ -12,6 +12,7 @@ class Bintime_Icecatimport_Model_Observer
|
|
12 |
|
13 |
private $freeExportURLs = 'http://data.icecat.biz/export/freeurls/export_urls_rich.txt.gz';
|
14 |
private $fullExportURLs = 'http://data.icecat.biz/export/export_urls_rich.txt.gz';
|
|
|
15 |
protected $_supplierMappingUrl = 'http://data.icecat.biz/export/freeurls/supplier_mapping.xml';
|
16 |
protected $_connectorDir = '/bintime/icecatimport/';
|
17 |
protected $_productFile;
|
@@ -25,6 +26,8 @@ class Bintime_Icecatimport_Model_Observer
|
|
25 |
* root method for uploading images to DB
|
26 |
*/
|
27 |
public function load(){
|
|
|
|
|
28 |
$loadUrl = $this->getLoadURL();
|
29 |
ini_set('max_execution_time', 0);
|
30 |
try {
|
@@ -43,8 +46,19 @@ class Bintime_Icecatimport_Model_Observer
|
|
43 |
|
44 |
$this->_loadSupplierListToDb();
|
45 |
$this->loadFileToDb();
|
46 |
-
|
47 |
echo "File Processed Succesfully<br>";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
} catch( Exception $e) {
|
49 |
echo $e->getMessage();
|
50 |
Mage::log($e->getMessage());
|
@@ -98,7 +112,7 @@ class Bintime_Icecatimport_Model_Observer
|
|
98 |
$connection->insert($mappingTable."_temp", array('supplier_id' => $supplierId, 'supplier_symbol' => $symbolName));
|
99 |
}
|
100 |
}
|
101 |
-
|
102 |
$connection->query("DROP TABLE IF EXISTS `".$mappingTable."_old`");
|
103 |
$connection->query("rename table `".$mappingTable."` to `".$mappingTable."_old`, `".$mappingTable."_temp` to ".$mappingTable);
|
104 |
$connection->commit();
|
@@ -137,21 +151,44 @@ class Bintime_Icecatimport_Model_Observer
|
|
137 |
* @param string $productSku
|
138 |
* @param string $productManufacturer
|
139 |
*/
|
140 |
-
public function getImageURL($productSku, $productManufacturer){
|
141 |
$connection = $this->getDbConnection();
|
|
|
142 |
try {
|
|
|
143 |
$tableName = Mage::getSingleton('core/resource')->getTableName('icecatimport/data');
|
144 |
$mappingTable = Mage::getSingleton('core/resource')->getTableName('icecatimport/supplier_mapping');
|
145 |
-
|
146 |
-
$
|
147 |
-
|
148 |
-
|
149 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
|
151 |
-
$imageURL = $connection->fetchOne($selectCondition);
|
152 |
if (empty($imageURL)){
|
153 |
-
$
|
154 |
-
return
|
155 |
}
|
156 |
return $imageURL;
|
157 |
} catch (Exception $e) {
|
@@ -176,51 +213,119 @@ class Bintime_Icecatimport_Model_Observer
|
|
176 |
*/
|
177 |
private function loadFileToDb(){
|
178 |
$connection = $this->getDbConnection();
|
179 |
-
|
180 |
$tableName = Mage::getSingleton('core/resource')->getTableName('icecatimport/data');
|
|
|
181 |
try {
|
182 |
$connection->beginTransaction();
|
183 |
$fileHandler = fopen($this->XMLfile, "r");
|
184 |
if ($fileHandler) {
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
`
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
$csvFileRes = fopen($csvFile, "w+");
|
198 |
-
|
199 |
while (!feof($fileHandler)) {
|
200 |
$row = fgets($fileHandler);
|
201 |
$oneLine = explode("\t", $row);
|
202 |
-
|
|
|
203 |
try{
|
|
|
204 |
$prod_id = (!empty($oneLine[1])) ? $oneLine[1] : '';
|
205 |
$prod_img = (!empty($oneLine[6])) ? $oneLine[6] : $oneLine[5];
|
206 |
$prod_name = (!empty($oneLine[12])) ? $oneLine[12] : '';
|
207 |
$supplier_id = (!empty($oneLine[4])) ? $oneLine[4] : '';
|
208 |
$line = "$prod_id\t$supplier_id\t$prod_name\t$prod_img\n";
|
|
|
209 |
fwrite($csvFileRes, $line);
|
210 |
}catch(Exception $e){
|
211 |
Mage::log("connector issue: {$e->getMessage()}");
|
212 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
213 |
}
|
214 |
}
|
|
|
|
|
|
|
|
|
215 |
|
|
|
|
|
|
|
|
|
|
|
216 |
// write csv file into temp table
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
} catch (Exception $e) {
|
225 |
$connection->rollBack();
|
226 |
throw new Exception("Icecat Import Terminated: {$e->getMessage()}");
|
12 |
|
13 |
private $freeExportURLs = 'http://data.icecat.biz/export/freeurls/export_urls_rich.txt.gz';
|
14 |
private $fullExportURLs = 'http://data.icecat.biz/export/export_urls_rich.txt.gz';
|
15 |
+
private $productinfoUrL = 'http://data.icecat.biz/prodid/prodid_d.txt.gz';
|
16 |
protected $_supplierMappingUrl = 'http://data.icecat.biz/export/freeurls/supplier_mapping.xml';
|
17 |
protected $_connectorDir = '/bintime/icecatimport/';
|
18 |
protected $_productFile;
|
26 |
* root method for uploading images to DB
|
27 |
*/
|
28 |
public function load(){
|
29 |
+
$testfile = Mage::getBaseDir('var') . $this->_connectorDir . 'newt.txt';
|
30 |
+
file_put_contents($testfile, 'here obs',FILE_APPEND);
|
31 |
$loadUrl = $this->getLoadURL();
|
32 |
ini_set('max_execution_time', 0);
|
33 |
try {
|
46 |
|
47 |
$this->_loadSupplierListToDb();
|
48 |
$this->loadFileToDb();
|
|
|
49 |
echo "File Processed Succesfully<br>";
|
50 |
+
|
51 |
+
//Start load product data file
|
52 |
+
$loadUrl = $this->productinfoUrL;
|
53 |
+
$this->_productFile = $this->_prepareFile(basename($loadUrl));
|
54 |
+
echo " Product Data file downloading started <br>";
|
55 |
+
$this->downloadFile($this->_productFile, $loadUrl);
|
56 |
+
echo "Start Unzipping Data File<br>";
|
57 |
+
$this->unzipFile();
|
58 |
+
echo "Start File Processing<br>";
|
59 |
+
$this->loadFileToDb();
|
60 |
+
|
61 |
+
echo " Product Data File Processed Succesfully<br>";
|
62 |
} catch( Exception $e) {
|
63 |
echo $e->getMessage();
|
64 |
Mage::log($e->getMessage());
|
112 |
$connection->insert($mappingTable."_temp", array('supplier_id' => $supplierId, 'supplier_symbol' => $symbolName));
|
113 |
}
|
114 |
}
|
115 |
+
|
116 |
$connection->query("DROP TABLE IF EXISTS `".$mappingTable."_old`");
|
117 |
$connection->query("rename table `".$mappingTable."` to `".$mappingTable."_old`, `".$mappingTable."_temp` to ".$mappingTable);
|
118 |
$connection->commit();
|
151 |
* @param string $productSku
|
152 |
* @param string $productManufacturer
|
153 |
*/
|
154 |
+
public function getImageURL($productSku, $productManufacturer, $productId = ''){
|
155 |
$connection = $this->getDbConnection();
|
156 |
+
$testfile = Mage::getBaseDir('var') . $this->_connectorDir . 'test_img2.txt';
|
157 |
try {
|
158 |
+
|
159 |
$tableName = Mage::getSingleton('core/resource')->getTableName('icecatimport/data');
|
160 |
$mappingTable = Mage::getSingleton('core/resource')->getTableName('icecatimport/supplier_mapping');
|
161 |
+
$model = Mage::getModel('catalog/product');
|
162 |
+
$_product = $model->load($productId);
|
163 |
+
$ean_code = $_product->getData(Mage::getStoreConfig('icecat_root/icecat/ean_code'));
|
164 |
+
$imageURL = '';
|
165 |
+
|
166 |
+
if (isset($productManufacturer) && !empty($productManufacturer)) {
|
167 |
+
$selectCondition = $connection->select()
|
168 |
+
->from(array('connector' => $tableName), new Zend_Db_Expr('connector.prod_img'))
|
169 |
+
->joinInner(array('supplier' => $mappingTable), "connector.supplier_id = supplier.supplier_id AND supplier.supplier_symbol = {$this->connection->quote($productManufacturer)}")
|
170 |
+
->where('connector.prod_id = ?', $productSku);
|
171 |
+
$imageURL = $connection->fetchOne($selectCondition);
|
172 |
+
}
|
173 |
+
if (empty($imageURL) && !empty($ean_code)) {
|
174 |
+
$selectCondition = $connection->select()
|
175 |
+
->from(array('connector' => $tableName), new Zend_Db_Expr('connector.prod_img'))
|
176 |
+
->joinLeft(array('products' => $tableName.'_products'), "connector.prod_id = products.prod_id")
|
177 |
+
->where('products.prod_ean = ?', trim($ean_code));
|
178 |
+
$imageURL = $connection->fetchOne($selectCondition);
|
179 |
+
}
|
180 |
+
|
181 |
+
if (!empty($imageURL)) {
|
182 |
+
$iceCatModel = Mage::getSingleton('icecatimport/import');
|
183 |
+
|
184 |
+
if(isset($productId) && !empty($productId)) {
|
185 |
+
$imageURL = $iceCatModel->saveImg($productId,$imageURL);
|
186 |
+
}
|
187 |
+
}
|
188 |
|
|
|
189 |
if (empty($imageURL)){
|
190 |
+
$imageURL = Mage::getStoreConfig('web/unsecure/base_url').'/skin/frontend/base/default/images/catalog/product/placeholder/image.jpg';
|
191 |
+
return $imageURL;
|
192 |
}
|
193 |
return $imageURL;
|
194 |
} catch (Exception $e) {
|
213 |
*/
|
214 |
private function loadFileToDb(){
|
215 |
$connection = $this->getDbConnection();
|
216 |
+
$testfile = Mage::getBaseDir('var') . $this->_connectorDir . 'newt.txt';
|
217 |
$tableName = Mage::getSingleton('core/resource')->getTableName('icecatimport/data');
|
218 |
+
$is_info_file = strpos($this->_productFile,'prodid_d.txt');
|
219 |
try {
|
220 |
$connection->beginTransaction();
|
221 |
$fileHandler = fopen($this->XMLfile, "r");
|
222 |
if ($fileHandler) {
|
223 |
+
if (!$is_info_file) {
|
224 |
+
$connection->query("DROP TABLE IF EXISTS `".$tableName."_temp`");
|
225 |
+
$connection->query("
|
226 |
+
CREATE TABLE `".$tableName."_temp` (
|
227 |
+
`prod_id` varchar(255) NOT NULL,
|
228 |
+
`supplier_id` int(11) DEFAULT NULL,
|
229 |
+
`prod_name` varchar(255) DEFAULT NULL,
|
230 |
+
`prod_img` varchar(255) DEFAULT NULL,
|
231 |
+
KEY `PRODUCT_MPN` (`prod_id`),
|
232 |
+
KEY `supplier_id` (`supplier_id`)
|
233 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
234 |
+
");
|
235 |
+
} else {
|
236 |
+
$connection->query("DROP TABLE IF EXISTS `".$tableName."_products`");
|
237 |
+
$connection->query("
|
238 |
+
CREATE TABLE `".$tableName."_products` (
|
239 |
+
`prod_id` varchar(255) NOT NULL,
|
240 |
+
`prod_title` varchar(255) DEFAULT NULL,
|
241 |
+
`prod_ean` varchar(255) NOT NULL,
|
242 |
+
KEY `prod_id` (`prod_id`),
|
243 |
+
KEY `PRODUCT_EAN` (`prod_ean`)
|
244 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
245 |
+
");
|
246 |
+
}
|
247 |
+
if (!$is_info_file) {
|
248 |
+
$csvFile = Mage::getBaseDir('var') . $this->_connectorDir . 'ice_cat_temp.csv';
|
249 |
+
} else {
|
250 |
+
$csvFile = Mage::getBaseDir('var') . $this->_connectorDir . 'ice_cat_temp_prod.csv';
|
251 |
+
}
|
252 |
+
|
253 |
+
$csvFile = str_replace("\\", "\\\\", $csvFile);
|
254 |
$csvFileRes = fopen($csvFile, "w+");
|
255 |
+
|
256 |
while (!feof($fileHandler)) {
|
257 |
$row = fgets($fileHandler);
|
258 |
$oneLine = explode("\t", $row);
|
259 |
+
|
260 |
+
if ($oneLine[0]!= 'product_id' && $oneLine[0]!= '' && !$is_info_file) {
|
261 |
try{
|
262 |
+
|
263 |
$prod_id = (!empty($oneLine[1])) ? $oneLine[1] : '';
|
264 |
$prod_img = (!empty($oneLine[6])) ? $oneLine[6] : $oneLine[5];
|
265 |
$prod_name = (!empty($oneLine[12])) ? $oneLine[12] : '';
|
266 |
$supplier_id = (!empty($oneLine[4])) ? $oneLine[4] : '';
|
267 |
$line = "$prod_id\t$supplier_id\t$prod_name\t$prod_img\n";
|
268 |
+
|
269 |
fwrite($csvFileRes, $line);
|
270 |
}catch(Exception $e){
|
271 |
Mage::log("connector issue: {$e->getMessage()}");
|
272 |
}
|
273 |
+
} else if ($is_info_file && $oneLine[0]!= 'Part number') {
|
274 |
+
try{
|
275 |
+
$oneLine3 = trim($oneLine[3]);
|
276 |
+
$oneLine12 = trim($oneLine[12]);
|
277 |
+
$oneLine21 = trim($oneLine[21]);
|
278 |
+
$oneLine15 = trim($oneLine[15]);
|
279 |
+
if (!empty($oneLine15)) {
|
280 |
+
$prod_ean = $oneLine15;
|
281 |
+
$eans = explode(';',$oneLine15);
|
282 |
+
if (is_array($eans) && count($eans) > 0 && array_key_exists(0,$eans)) {
|
283 |
+
$prod_ean = !empty($eans[0]) ? $eans[0] : '';
|
284 |
+
}
|
285 |
+
}
|
286 |
+
$prod_id = (!empty($oneLine[0])) ? str_replace("\t",'',$oneLine[0]) : '';
|
287 |
+
$brand = (!empty($oneLine3)) ? str_replace("\t",'',$oneLine[3]. '|') : '';
|
288 |
+
$model = (!empty($oneLine12)) ? str_replace("\t",'',$oneLine[12].'|') : '';
|
289 |
+
$family = (!empty($oneLine21)) ? preg_replace("/\s+/", "",$oneLine[21].'|') : '';
|
290 |
+
$line = "$prod_id\t$brand$family$model\t$prod_ean\n";
|
291 |
+
fwrite($csvFileRes, $line);
|
292 |
+
}catch(Exception $e){
|
293 |
+
Mage::log("connector issue: {$e->getMessage()}");
|
294 |
+
}
|
295 |
}
|
296 |
}
|
297 |
+
|
298 |
+
$connection->commit();
|
299 |
+
$config = Mage::getConfig()->getResourceConnectionConfig(Mage_Core_Model_Resource::DEFAULT_WRITE_RESOURCE);
|
300 |
+
$sql_file = Mage::getBaseDir('var') . $this->_connectorDir . 'test.sql';
|
301 |
|
302 |
+
$hostname = $config->host;
|
303 |
+
$user = $config->username;
|
304 |
+
$password = $config->password;
|
305 |
+
$dbname = $config->dbname;
|
306 |
+
|
307 |
// write csv file into temp table
|
308 |
+
if (!$is_info_file) {
|
309 |
+
$sql = 'LOAD DATA LOCAL INFILE "'.$csvFile.'" INTO TABLE '.$tableName.'_temp ( prod_id, supplier_id, prod_name, prod_img );';
|
310 |
+
file_put_contents($sql_file,$sql);
|
311 |
+
$res = system("mysql -u$user -p$password -h$hostname $dbname < \"$sql_file\" ");
|
312 |
+
file_put_contents($testfile, "mysql -u$user -p$password -h$hostname $dbname < $sql_file",FILE_APPEND);
|
313 |
+
//$connection->query('LOAD DATA LOCAL INFILE "'.$csvFile.'" INTO TABLE '.$tableName.'_temp ( prod_id, supplier_id, prod_name, prod_img )');
|
314 |
+
$connection->query("DROP TABLE IF EXISTS `".$tableName."_old`");
|
315 |
+
$connection->query("rename table `".$tableName."` to `".$tableName."_old`, `".$tableName."_temp` to ".$tableName);
|
316 |
+
$connection->commit();
|
317 |
+
fclose($fileHandler);
|
318 |
+
unlink($csvFile);
|
319 |
+
} else {
|
320 |
+
$sql = 'LOAD DATA LOCAL INFILE "'.$csvFile.'" INTO TABLE '.$tableName.'_products ( prod_id, prod_title,prod_ean );';
|
321 |
+
file_put_contents($sql_file,$sql);
|
322 |
+
$res = system("mysql -u$user -p$password -h$hostname $dbname < \"$sql_file\" ");
|
323 |
+
file_put_contents($testfile, "mysql -u$user -p$password -h$hostname $dbname < $sql_file", FILE_APPEND);
|
324 |
+
$connection->commit();
|
325 |
+
fclose($fileHandler);
|
326 |
+
unlink($csvFile);
|
327 |
+
}
|
328 |
+
}
|
329 |
} catch (Exception $e) {
|
330 |
$connection->rollBack();
|
331 |
throw new Exception("Icecat Import Terminated: {$e->getMessage()}");
|
app/code/local/Bintime/Icecatimport/Model/Relatedcollection.php
CHANGED
@@ -1,71 +1,71 @@
|
|
1 |
-
<?php
|
2 |
-
class Bintime_Icecatimport_Model_Relatedcollection extends Varien_Data_Collection {
|
3 |
-
|
4 |
-
protected $_data = array();
|
5 |
-
protected $_collection;
|
6 |
-
|
7 |
-
public function __construct() {
|
8 |
-
parent::__construct();
|
9 |
-
|
10 |
-
// not extends Varien_Object
|
11 |
-
$args = func_get_args();
|
12 |
-
if (empty($args[0])) {
|
13 |
-
$args[0] = array();
|
14 |
-
}
|
15 |
-
$this->_data = $args[0];
|
16 |
-
}
|
17 |
-
public function getCollection()
|
18 |
-
{
|
19 |
-
$sku = Mage::getStoreConfig('icecat_root/icecat/sku_field');
|
20 |
-
$model = Mage::getModel('catalog/product');
|
21 |
-
$collection = $model->getCollection();
|
22 |
-
|
23 |
-
$filterArray = array();
|
24 |
-
$rel = array();
|
25 |
-
foreach($this->_data as $res)
|
26 |
-
{
|
27 |
-
foreach($res as $r)
|
28 |
-
{
|
29 |
-
$rel[] = $r;
|
30 |
-
}
|
31 |
-
}
|
32 |
-
foreach($rel as $item){
|
33 |
-
array_push($filterArray, array('attribute' => $sku,'eq' => $item['mpn']));
|
34 |
-
}
|
35 |
-
$collection->addFieldToFilter($filterArray);
|
36 |
-
|
37 |
-
$collection->joinField('is_in_stock',
|
38 |
-
'cataloginventory/stock_item',
|
39 |
-
'is_in_stock',
|
40 |
-
'product_id=entity_id',
|
41 |
-
'is_in_stock=1',
|
42 |
-
'{{table}}.stock_id=1',
|
43 |
-
'left');
|
44 |
-
|
45 |
-
$myCollection = clone $collection;
|
46 |
-
$relCnt = count($rel);
|
47 |
-
foreach($myCollection as &$col)
|
48 |
-
{
|
49 |
-
$model->load($col->getId());
|
50 |
-
$price = $model->getPrice();
|
51 |
-
$mpn = $col->getData($sku);
|
52 |
-
$specialPrice = $model->getSpecialPrice();
|
53 |
-
|
54 |
-
for($i = 0; $i<$relCnt; $i++)
|
55 |
-
{
|
56 |
-
if($rel[$i]['mpn'] == $mpn)
|
57 |
-
{
|
58 |
-
$col->setData('name', $rel[$i]['name']);
|
59 |
-
$col->setData('thumbnail', $rel[$i]['thumb']);
|
60 |
-
$col->setData('status', Mage_Catalog_Model_Product_Status::STATUS_ENABLED);
|
61 |
-
$col->setData('price', $price);
|
62 |
-
$col->setData('special_price', $specialPrice);
|
63 |
-
}
|
64 |
-
}
|
65 |
-
}
|
66 |
-
return $myCollection;
|
67 |
-
|
68 |
-
}
|
69 |
-
}
|
70 |
-
|
71 |
-
?>
|
1 |
+
<?php
|
2 |
+
class Bintime_Icecatimport_Model_Relatedcollection extends Varien_Data_Collection {
|
3 |
+
|
4 |
+
protected $_data = array();
|
5 |
+
protected $_collection;
|
6 |
+
|
7 |
+
public function __construct() {
|
8 |
+
parent::__construct();
|
9 |
+
|
10 |
+
// not extends Varien_Object
|
11 |
+
$args = func_get_args();
|
12 |
+
if (empty($args[0])) {
|
13 |
+
$args[0] = array();
|
14 |
+
}
|
15 |
+
$this->_data = $args[0];
|
16 |
+
}
|
17 |
+
public function getCollection()
|
18 |
+
{
|
19 |
+
$sku = Mage::getStoreConfig('icecat_root/icecat/sku_field');
|
20 |
+
$model = Mage::getModel('catalog/product');
|
21 |
+
$collection = $model->getCollection();
|
22 |
+
|
23 |
+
$filterArray = array();
|
24 |
+
$rel = array();
|
25 |
+
foreach($this->_data as $res)
|
26 |
+
{
|
27 |
+
foreach($res as $r)
|
28 |
+
{
|
29 |
+
$rel[] = $r;
|
30 |
+
}
|
31 |
+
}
|
32 |
+
foreach($rel as $item){
|
33 |
+
array_push($filterArray, array('attribute' => $sku,'eq' => $item['mpn']));
|
34 |
+
}
|
35 |
+
$collection->addFieldToFilter($filterArray);
|
36 |
+
|
37 |
+
$collection->joinField('is_in_stock',
|
38 |
+
'cataloginventory/stock_item',
|
39 |
+
'is_in_stock',
|
40 |
+
'product_id=entity_id',
|
41 |
+
'is_in_stock=1',
|
42 |
+
'{{table}}.stock_id=1',
|
43 |
+
'left');
|
44 |
+
|
45 |
+
$myCollection = clone $collection;
|
46 |
+
$relCnt = count($rel);
|
47 |
+
foreach($myCollection as &$col)
|
48 |
+
{
|
49 |
+
$model->load($col->getId());
|
50 |
+
$price = $model->getPrice();
|
51 |
+
$mpn = $col->getData($sku);
|
52 |
+
$specialPrice = $model->getSpecialPrice();
|
53 |
+
|
54 |
+
for($i = 0; $i<$relCnt; $i++)
|
55 |
+
{
|
56 |
+
if($rel[$i]['mpn'] == $mpn)
|
57 |
+
{
|
58 |
+
$col->setData('name', $rel[$i]['name']);
|
59 |
+
$col->setData('thumbnail', $rel[$i]['thumb']);
|
60 |
+
$col->setData('status', Mage_Catalog_Model_Product_Status::STATUS_ENABLED);
|
61 |
+
$col->setData('price', $price);
|
62 |
+
$col->setData('special_price', $specialPrice);
|
63 |
+
}
|
64 |
+
}
|
65 |
+
}
|
66 |
+
return $myCollection;
|
67 |
+
|
68 |
+
}
|
69 |
+
}
|
70 |
+
|
71 |
+
?>
|
app/code/local/Bintime/Icecatimport/Model/System/Config/Attributes.php
CHANGED
@@ -1,21 +1,21 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Class Provides product Attributes for BO menu
|
4 |
-
* @author Sergey Gozhedrianov <info@bintime.com>
|
5 |
-
*
|
6 |
-
*/
|
7 |
-
class Bintime_Icecatimport_Model_System_Config_Attributes
|
8 |
-
{
|
9 |
-
public function toOptionArray()
|
10 |
-
{
|
11 |
-
$attributesArray = Mage::getResourceModel('eav/entity_attribute_collection')
|
12 |
-
->setAttributeSetFilter(Mage::getResourceSingleton('catalog/product')->getEntityType()->getDefaultAttributeSetId());
|
13 |
-
$outputAttributeArray = array();
|
14 |
-
foreach($attributesArray as $attribute){
|
15 |
-
$outputAttributeArray[$attribute['attribute_code']]=$attribute['attribute_code'];
|
16 |
-
}
|
17 |
-
ksort($outputAttributeArray);
|
18 |
-
return $outputAttributeArray;
|
19 |
-
}
|
20 |
-
}
|
21 |
?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Class Provides product Attributes for BO menu
|
4 |
+
* @author Sergey Gozhedrianov <info@bintime.com>
|
5 |
+
*
|
6 |
+
*/
|
7 |
+
class Bintime_Icecatimport_Model_System_Config_Attributes
|
8 |
+
{
|
9 |
+
public function toOptionArray()
|
10 |
+
{
|
11 |
+
$attributesArray = Mage::getResourceModel('eav/entity_attribute_collection')
|
12 |
+
->setAttributeSetFilter(Mage::getResourceSingleton('catalog/product')->getEntityType()->getDefaultAttributeSetId());
|
13 |
+
$outputAttributeArray = array();
|
14 |
+
foreach($attributesArray as $attribute){
|
15 |
+
$outputAttributeArray[$attribute['attribute_code']]=$attribute['attribute_code'];
|
16 |
+
}
|
17 |
+
ksort($outputAttributeArray);
|
18 |
+
return $outputAttributeArray;
|
19 |
+
}
|
20 |
+
}
|
21 |
?>
|
app/code/local/Bintime/Icecatimport/Model/System/Config/Descriptionpriority.php
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
-
<?php
|
2 |
-
class Bintime_Icecatimport_Model_System_Config_Descriptionpriority
|
3 |
-
{
|
4 |
-
public function toOptionArray()
|
5 |
-
{
|
6 |
-
return array(
|
7 |
-
'Icecat' => 'From Icecat',
|
8 |
-
'Db' => 'From Database'
|
9 |
-
);
|
10 |
-
|
11 |
-
}
|
12 |
-
}
|
13 |
-
?>
|
1 |
+
<?php
|
2 |
+
class Bintime_Icecatimport_Model_System_Config_Descriptionpriority
|
3 |
+
{
|
4 |
+
public function toOptionArray()
|
5 |
+
{
|
6 |
+
return array(
|
7 |
+
'Icecat' => 'From Icecat',
|
8 |
+
'Db' => 'From Database'
|
9 |
+
);
|
10 |
+
|
11 |
+
}
|
12 |
+
}
|
13 |
+
?>
|
app/code/local/Bintime/Icecatimport/Model/System/Config/LanguageList.xml
CHANGED
@@ -1,399 +1,399 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<!DOCTYPE ICECAT-interface SYSTEM "http://data.icecat.biz/dtd/ICECAT-interface_response.dtd">
|
3 |
-
<!-- source: ICEcat.biz 2009 -->
|
4 |
-
<ICECAT-interface>
|
5 |
-
<Response ID="50564949" Status="1" Date="Thu Oct 22 04:26:04 2009" Request_ID="1256178364">
|
6 |
-
<LanguageList>
|
7 |
-
<Language Code="portuguese" ID="11" ShortCode="PT" Sid="6184">
|
8 |
-
<Name ID="40191" Value="Portuguese-Portuguese" langid="1"/>
|
9 |
-
<Name ID="40192" Value="Portuguese-Portuguese" langid="2"/>
|
10 |
-
<Name ID="40193" Value="Portuguese-Portuguese" langid="3"/>
|
11 |
-
<Name ID="40194" Value="Portuguese-Portuguese" langid="4"/>
|
12 |
-
<Name ID="40195" Value="Portuguese-Portuguese" langid="5"/>
|
13 |
-
<Name ID="40196" Value="Portuguese-Portuguese" langid="6"/>
|
14 |
-
<Name ID="198032" Value="Португальский-португальский" langid="8"/>
|
15 |
-
<Name ID="50889" Value="" langid="12"/>
|
16 |
-
<Name ID="205069" Value="Португальcька-Португалія" langid="25"/>
|
17 |
-
</Language>
|
18 |
-
<Language Code="bulgarian" ID="21" ShortCode="BG" Sid="9218">
|
19 |
-
<Name ID="147616" Value="Bulgarian" langid="1"/>
|
20 |
-
<Name ID="198042" Value="Болгарский" langid="8"/>
|
21 |
-
<Name ID="205079" Value="Болгарська" langid="25"/>
|
22 |
-
</Language>
|
23 |
-
<Language Code="danish" ID="7" ShortCode="DK" Sid="6058">
|
24 |
-
<Name ID="39312" Value="Danish" langid="1"/>
|
25 |
-
<Name ID="39313" Value="Danish" langid="2"/>
|
26 |
-
<Name ID="39314" Value="Danish" langid="3"/>
|
27 |
-
<Name ID="39315" Value="Danish" langid="4"/>
|
28 |
-
<Name ID="39316" Value="Danish" langid="5"/>
|
29 |
-
<Name ID="39317" Value="Danish" langid="6"/>
|
30 |
-
<Name ID="39318" Value="Danish" langid="7"/>
|
31 |
-
<Name ID="198028" Value="Датский" langid="8"/>
|
32 |
-
<Name ID="40294" Value="Danish" langid="9"/>
|
33 |
-
<Name ID="40295" Value="Danish" langid="10"/>
|
34 |
-
<Name ID="40296" Value="Danish" langid="11"/>
|
35 |
-
<Name ID="40297" Value="Danish" langid="12"/>
|
36 |
-
<Name ID="40298" Value="Danish" langid="13"/>
|
37 |
-
<Name ID="40299" Value="Danish" langid="14"/>
|
38 |
-
<Name ID="40300" Value="Danish" langid="15"/>
|
39 |
-
<Name ID="40301" Value="Danish" langid="16"/>
|
40 |
-
<Name ID="40302" Value="Danish" langid="17"/>
|
41 |
-
<Name ID="205065" Value="Датська" langid="25"/>
|
42 |
-
</Language>
|
43 |
-
<Language Code="japanese" ID="26" ShortCode="JA" Sid="9635">
|
44 |
-
<Name ID="224188" Value="Japanese" langid="1"/>
|
45 |
-
<Name ID="224189" Value="Japanese" langid="2"/>
|
46 |
-
<Name ID="224190" Value="Japanese" langid="3"/>
|
47 |
-
<Name ID="224191" Value="Japanese" langid="4"/>
|
48 |
-
<Name ID="224192" Value="Japanese" langid="5"/>
|
49 |
-
<Name ID="224193" Value="Japanese" langid="6"/>
|
50 |
-
<Name ID="224194" Value="Японский" langid="8"/>
|
51 |
-
<Name ID="224195" Value="Японська" langid="25"/>
|
52 |
-
<Name ID="224196" Value="Japanese" langid="26"/>
|
53 |
-
</Language>
|
54 |
-
<Language Code="finnish" ID="17" ShortCode="FI" Sid="6190">
|
55 |
-
<Name ID="40227" Value="Finnish" langid="1"/>
|
56 |
-
<Name ID="40228" Value="Finnish" langid="2"/>
|
57 |
-
<Name ID="40229" Value="Finnish" langid="3"/>
|
58 |
-
<Name ID="40230" Value="Finnish" langid="4"/>
|
59 |
-
<Name ID="40231" Value="Finnish" langid="5"/>
|
60 |
-
<Name ID="40232" Value="Finnish" langid="6"/>
|
61 |
-
<Name ID="198038" Value="Финский" langid="8"/>
|
62 |
-
<Name ID="50895" Value="" langid="12"/>
|
63 |
-
<Name ID="205075" Value="Фінська" langid="25"/>
|
64 |
-
</Language>
|
65 |
-
<Language Code="dutch" ID="2" ShortCode="NL" Sid="3">
|
66 |
-
<Name ID="3" Value="Dutch" langid="1"/>
|
67 |
-
<Name ID="4" Value="Dutch" langid="2"/>
|
68 |
-
<Name ID="6074" Value="Dutch" langid="3"/>
|
69 |
-
<Name ID="14099" Value="Dutch" langid="4"/>
|
70 |
-
<Name ID="18231" Value="Dutch" langid="5"/>
|
71 |
-
<Name ID="22363" Value="Dutch" langid="6"/>
|
72 |
-
<Name ID="34054" Value="Hollandsk" langid="7"/>
|
73 |
-
<Name ID="198023" Value="Голландский" langid="8"/>
|
74 |
-
<Name ID="40244" Value="Dutch" langid="9"/>
|
75 |
-
<Name ID="40245" Value="Dutch" langid="10"/>
|
76 |
-
<Name ID="40246" Value="Dutch" langid="11"/>
|
77 |
-
<Name ID="40247" Value="Dutch" langid="12"/>
|
78 |
-
<Name ID="40248" Value="Dutch" langid="13"/>
|
79 |
-
<Name ID="40249" Value="Dutch" langid="14"/>
|
80 |
-
<Name ID="40250" Value="Dutch" langid="15"/>
|
81 |
-
<Name ID="40251" Value="Dutch" langid="16"/>
|
82 |
-
<Name ID="40252" Value="Dutch" langid="17"/>
|
83 |
-
<Name ID="205060" Value="Голландська" langid="25"/>
|
84 |
-
</Language>
|
85 |
-
<Language Code="georgian" ID="22" ShortCode="KA" Sid="9271">
|
86 |
-
<Name ID="154954" Value="Georgian" langid="1"/>
|
87 |
-
<Name ID="198043" Value="Грузинский" langid="8"/>
|
88 |
-
<Name ID="205080" Value="Грузинська" langid="25"/>
|
89 |
-
</Language>
|
90 |
-
<Language Code="english" ID="1" ShortCode="EN" Sid="2">
|
91 |
-
<Name ID="1" Value="English" langid="1"/>
|
92 |
-
<Name ID="2" Value="English" langid="2"/>
|
93 |
-
<Name ID="6073" Value="English" langid="3"/>
|
94 |
-
<Name ID="14098" Value="English" langid="4"/>
|
95 |
-
<Name ID="18230" Value="English" langid="5"/>
|
96 |
-
<Name ID="22362" Value="English" langid="6"/>
|
97 |
-
<Name ID="34053" Value="Engelsk" langid="7"/>
|
98 |
-
<Name ID="198022" Value="Английский" langid="8"/>
|
99 |
-
<Name ID="40234" Value="English" langid="9"/>
|
100 |
-
<Name ID="40235" Value="English" langid="10"/>
|
101 |
-
<Name ID="40236" Value="English" langid="11"/>
|
102 |
-
<Name ID="40237" Value="English" langid="12"/>
|
103 |
-
<Name ID="40238" Value="English" langid="13"/>
|
104 |
-
<Name ID="40239" Value="English" langid="14"/>
|
105 |
-
<Name ID="40240" Value="English" langid="15"/>
|
106 |
-
<Name ID="40241" Value="English" langid="16"/>
|
107 |
-
<Name ID="40242" Value="English" langid="17"/>
|
108 |
-
<Name ID="205059" Value="Англійська" langid="25"/>
|
109 |
-
</Language>
|
110 |
-
<Language Code="greek" ID="18" ShortCode="EL" Sid="8587">
|
111 |
-
<Name ID="113508" Value="Greek" langid="1"/>
|
112 |
-
<Name ID="113509" Value="Greek" langid="2"/>
|
113 |
-
<Name ID="113510" Value="Greek" langid="3"/>
|
114 |
-
<Name ID="113511" Value="Greek" langid="4"/>
|
115 |
-
<Name ID="113512" Value="Greek" langid="5"/>
|
116 |
-
<Name ID="113513" Value="Greek" langid="6"/>
|
117 |
-
<Name ID="198039" Value="Греческий" langid="8"/>
|
118 |
-
<Name ID="205076" Value="Грецька" langid="25"/>
|
119 |
-
</Language>
|
120 |
-
<Language Code="romanian" ID="23" ShortCode="RO" Sid="9390">
|
121 |
-
<Name ID="169100" Value="Romanian" langid="1"/>
|
122 |
-
<Name ID="169101" Value="Romanian" langid="2"/>
|
123 |
-
<Name ID="169102" Value="Romanian" langid="3"/>
|
124 |
-
<Name ID="169103" Value="Romanian" langid="4"/>
|
125 |
-
<Name ID="169104" Value="Romanian" langid="5"/>
|
126 |
-
<Name ID="169105" Value="Romanian" langid="6"/>
|
127 |
-
<Name ID="198044" Value="Румынский" langid="8"/>
|
128 |
-
<Name ID="205081" Value="Румунська" langid="25"/>
|
129 |
-
</Language>
|
130 |
-
<Language Code="hungarian" ID="16" ShortCode="HU" Sid="6189">
|
131 |
-
<Name ID="40221" Value="Hungarian" langid="1"/>
|
132 |
-
<Name ID="40222" Value="Hungarian" langid="2"/>
|
133 |
-
<Name ID="40223" Value="Hungarian" langid="3"/>
|
134 |
-
<Name ID="40224" Value="Hungarian" langid="4"/>
|
135 |
-
<Name ID="40225" Value="Hungarian" langid="5"/>
|
136 |
-
<Name ID="40226" Value="Hungarian" langid="6"/>
|
137 |
-
<Name ID="198037" Value="Венгерский" langid="8"/>
|
138 |
-
<Name ID="50894" Value="" langid="12"/>
|
139 |
-
<Name ID="205074" Value="Угорська" langid="25"/>
|
140 |
-
</Language>
|
141 |
-
<Language Code="swedish" ID="13" ShortCode="SE" Sid="6186">
|
142 |
-
<Name ID="40203" Value="Swedish" langid="1"/>
|
143 |
-
<Name ID="40204" Value="Swedish" langid="2"/>
|
144 |
-
<Name ID="40205" Value="Swedish" langid="3"/>
|
145 |
-
<Name ID="40206" Value="Swedish" langid="4"/>
|
146 |
-
<Name ID="40207" Value="Swedish" langid="5"/>
|
147 |
-
<Name ID="40208" Value="Swedish" langid="6"/>
|
148 |
-
<Name ID="198034" Value="Шведский" langid="8"/>
|
149 |
-
<Name ID="50891" Value="" langid="12"/>
|
150 |
-
<Name ID="205071" Value="Швецька" langid="25"/>
|
151 |
-
</Language>
|
152 |
-
<Language Code="croatian" ID="29" ShortCode="HR" Sid="10132">
|
153 |
-
<Name ID="270273" Value="Croatian" langid="1"/>
|
154 |
-
<Name ID="270274" Value="Croatian" langid="2"/>
|
155 |
-
<Name ID="270275" Value="Croatian" langid="3"/>
|
156 |
-
<Name ID="270276" Value="Croatian" langid="4"/>
|
157 |
-
<Name ID="270277" Value="Croatian" langid="5"/>
|
158 |
-
<Name ID="270278" Value="Croatian" langid="6"/>
|
159 |
-
<Name ID="270280" Value="Hrvatski" langid="29"/>
|
160 |
-
</Language>
|
161 |
-
<Language Code="catalan" ID="27" ShortCode="CA" Sid="9662">
|
162 |
-
<Name ID="231955" Value="Catalan" langid="1"/>
|
163 |
-
<Name ID="231956" Value="Catalan" langid="2"/>
|
164 |
-
<Name ID="231957" Value="Catalan" langid="3"/>
|
165 |
-
<Name ID="231958" Value="Catalan" langid="4"/>
|
166 |
-
<Name ID="231959" Value="Catalan" langid="5"/>
|
167 |
-
<Name ID="231960" Value="Catalan" langid="6"/>
|
168 |
-
<Name ID="231962" Value="Каталанский" langid="8"/>
|
169 |
-
<Name ID="231963" Value="Каталанська" langid="25"/>
|
170 |
-
<Name ID="231961" Value="Català" langid="27"/>
|
171 |
-
</Language>
|
172 |
-
<Language Code="ukrainian" ID="25" ShortCode="UK" Sid="9577">
|
173 |
-
<Name ID="198046" Value="Ukrainian" langid="1"/>
|
174 |
-
<Name ID="198047" Value="Ukrainian" langid="2"/>
|
175 |
-
<Name ID="198048" Value="Ukrainian" langid="3"/>
|
176 |
-
<Name ID="198049" Value="Ukrainian" langid="4"/>
|
177 |
-
<Name ID="198050" Value="Ukrainian" langid="5"/>
|
178 |
-
<Name ID="198051" Value="Ukrainian" langid="6"/>
|
179 |
-
<Name ID="198052" Value="Украинский" langid="8"/>
|
180 |
-
<Name ID="198053" Value="Українська" langid="25"/>
|
181 |
-
</Language>
|
182 |
-
<Language Code="spanish" ID="6" ShortCode="ES" Sid="4797">
|
183 |
-
<Name ID="14094" Value="Spanish" langid="1"/>
|
184 |
-
<Name ID="14095" Value="Spanish" langid="2"/>
|
185 |
-
<Name ID="14096" Value="Spanish" langid="3"/>
|
186 |
-
<Name ID="18228" Value="Spanish" langid="4"/>
|
187 |
-
<Name ID="106485" Value="Processo di simulazione dell'alba (intensità 0)" langid="5"/>
|
188 |
-
<Name ID="26492" Value="Spanish" langid="6"/>
|
189 |
-
<Name ID="38094" Value="Spansk" langid="7"/>
|
190 |
-
<Name ID="198027" Value="Испанский" langid="8"/>
|
191 |
-
<Name ID="40284" Value="Spanish" langid="9"/>
|
192 |
-
<Name ID="40285" Value="Spanish" langid="10"/>
|
193 |
-
<Name ID="40286" Value="Spanish" langid="11"/>
|
194 |
-
<Name ID="40287" Value="Spanish" langid="12"/>
|
195 |
-
<Name ID="40288" Value="Spanish" langid="13"/>
|
196 |
-
<Name ID="40289" Value="Spanish" langid="14"/>
|
197 |
-
<Name ID="40290" Value="Spanish" langid="15"/>
|
198 |
-
<Name ID="40291" Value="Spanish" langid="16"/>
|
199 |
-
<Name ID="40292" Value="Spanish" langid="17"/>
|
200 |
-
<Name ID="205064" Value="Іспанська" langid="25"/>
|
201 |
-
</Language>
|
202 |
-
<Language Code="argentinian-spanish" ID="28" ShortCode="AR" Sid="9835">
|
203 |
-
<Name ID="244259" Value="Argentinian-Spanish" langid="1"/>
|
204 |
-
<Name ID="244260" Value="Argentinian-Spanish" langid="2"/>
|
205 |
-
<Name ID="244261" Value="Argentinian-Spanish" langid="3"/>
|
206 |
-
<Name ID="244262" Value="Argentinian-Spanish" langid="4"/>
|
207 |
-
<Name ID="244263" Value="Argentinian-Spanish" langid="5"/>
|
208 |
-
<Name ID="244264" Value="Argentinian-Spanish" langid="6"/>
|
209 |
-
<Name ID="244265" Value="Argentinian-Spanish" langid="7"/>
|
210 |
-
<Name ID="244266" Value="Argentinian-Spanish" langid="8"/>
|
211 |
-
<Name ID="244267" Value="Argentinian-Spanish" langid="9"/>
|
212 |
-
<Name ID="244268" Value="Argentinian-Spanish" langid="10"/>
|
213 |
-
<Name ID="244269" Value="Argentinian-Spanish" langid="11"/>
|
214 |
-
<Name ID="244270" Value="Argentinian-Spanish" langid="12"/>
|
215 |
-
<Name ID="244271" Value="Argentinian-Spanish" langid="13"/>
|
216 |
-
<Name ID="244272" Value="Argentinian-Spanish" langid="14"/>
|
217 |
-
<Name ID="244273" Value="Argentinian-Spanish" langid="15"/>
|
218 |
-
<Name ID="244274" Value="Argentinian-Spanish" langid="16"/>
|
219 |
-
<Name ID="244275" Value="Argentinian-Spanish" langid="17"/>
|
220 |
-
<Name ID="244276" Value="Argentinian-Spanish" langid="18"/>
|
221 |
-
<Name ID="244277" Value="Argentinian-Spanish" langid="19"/>
|
222 |
-
<Name ID="244278" Value="Argentinian-Spanish" langid="20"/>
|
223 |
-
<Name ID="244279" Value="Argentinian-Spanish" langid="21"/>
|
224 |
-
<Name ID="244280" Value="Argentinian-Spanish" langid="22"/>
|
225 |
-
<Name ID="244281" Value="Argentinian-Spanish" langid="23"/>
|
226 |
-
<Name ID="244282" Value="Argentinian-Spanish" langid="24"/>
|
227 |
-
<Name ID="244283" Value="Argentinian-Spanish" langid="25"/>
|
228 |
-
<Name ID="244284" Value="Argentinian-Spanish" langid="26"/>
|
229 |
-
<Name ID="244285" Value="Argentinian-Spanish" langid="27"/>
|
230 |
-
<Name ID="244286" Value="Argentinian-Spanish" langid="28"/>
|
231 |
-
</Language>
|
232 |
-
<Language Code="french" ID="3" ShortCode="FR" Sid="3036">
|
233 |
-
<Name ID="6071" Value="French" langid="1"/>
|
234 |
-
<Name ID="6072" Value="French" langid="2"/>
|
235 |
-
<Name ID="8815" Value="French" langid="3"/>
|
236 |
-
<Name ID="16579" Value="French" langid="4"/>
|
237 |
-
<Name ID="103145" Value="Rapporto di compressione" langid="5"/>
|
238 |
-
<Name ID="24843" Value="French" langid="6"/>
|
239 |
-
<Name ID="36551" Value="Fransk" langid="7"/>
|
240 |
-
<Name ID="198024" Value="Французский" langid="8"/>
|
241 |
-
<Name ID="40254" Value="French" langid="9"/>
|
242 |
-
<Name ID="40255" Value="French" langid="10"/>
|
243 |
-
<Name ID="40256" Value="French" langid="11"/>
|
244 |
-
<Name ID="40257" Value="French" langid="12"/>
|
245 |
-
<Name ID="40258" Value="French" langid="13"/>
|
246 |
-
<Name ID="40259" Value="French" langid="14"/>
|
247 |
-
<Name ID="40260" Value="French" langid="15"/>
|
248 |
-
<Name ID="40261" Value="French" langid="16"/>
|
249 |
-
<Name ID="40262" Value="French" langid="17"/>
|
250 |
-
<Name ID="205061" Value="Французька" langid="25"/>
|
251 |
-
</Language>
|
252 |
-
<Language Code="us english" ID="9" ShortCode="US" Sid="6182">
|
253 |
-
<Name ID="40179" Value="US English" langid="1"/>
|
254 |
-
<Name ID="40180" Value="US English" langid="2"/>
|
255 |
-
<Name ID="40181" Value="US English" langid="3"/>
|
256 |
-
<Name ID="40182" Value="US English" langid="4"/>
|
257 |
-
<Name ID="40183" Value="US English" langid="5"/>
|
258 |
-
<Name ID="40184" Value="US English" langid="6"/>
|
259 |
-
<Name ID="198030" Value="Американский английский" langid="8"/>
|
260 |
-
<Name ID="50887" Value="" langid="12"/>
|
261 |
-
<Name ID="205067" Value="Англійська США" langid="25"/>
|
262 |
-
</Language>
|
263 |
-
<Language Code="chinese" ID="12" ShortCode="ZH" Sid="6185">
|
264 |
-
<Name ID="40197" Value="Chinese" langid="1"/>
|
265 |
-
<Name ID="40198" Value="Chinese" langid="2"/>
|
266 |
-
<Name ID="40199" Value="Chinese" langid="3"/>
|
267 |
-
<Name ID="40200" Value="Chinese" langid="4"/>
|
268 |
-
<Name ID="40201" Value="Chinese" langid="5"/>
|
269 |
-
<Name ID="40202" Value="Chinese" langid="6"/>
|
270 |
-
<Name ID="198033" Value="Китайский" langid="8"/>
|
271 |
-
<Name ID="50890" Value="" langid="12"/>
|
272 |
-
<Name ID="205070" Value="Китайська" langid="25"/>
|
273 |
-
</Language>
|
274 |
-
<Language Code="turkish" ID="20" ShortCode="TR" Sid="8665">
|
275 |
-
<Name ID="118819" Value="Turkish" langid="1"/>
|
276 |
-
<Name ID="118820" Value="Turkish" langid="2"/>
|
277 |
-
<Name ID="118821" Value="Turkish" langid="3"/>
|
278 |
-
<Name ID="118822" Value="Turkish" langid="4"/>
|
279 |
-
<Name ID="118823" Value="Turkish" langid="5"/>
|
280 |
-
<Name ID="118824" Value="Turkish" langid="6"/>
|
281 |
-
<Name ID="198041" Value="Турецкий" langid="8"/>
|
282 |
-
<Name ID="205078" Value="Турецька" langid="25"/>
|
283 |
-
</Language>
|
284 |
-
<Language Code="polish" ID="14" ShortCode="PL" Sid="6187">
|
285 |
-
<Name ID="40209" Value="Polish" langid="1"/>
|
286 |
-
<Name ID="40210" Value="Polish" langid="2"/>
|
287 |
-
<Name ID="40211" Value="Polish" langid="3"/>
|
288 |
-
<Name ID="40212" Value="Polish" langid="4"/>
|
289 |
-
<Name ID="40213" Value="Polish" langid="5"/>
|
290 |
-
<Name ID="40214" Value="Polish" langid="6"/>
|
291 |
-
<Name ID="198035" Value="Польский" langid="8"/>
|
292 |
-
<Name ID="50892" Value="" langid="12"/>
|
293 |
-
<Name ID="205072" Value="Польська" langid="25"/>
|
294 |
-
</Language>
|
295 |
-
<Language Code="czech" ID="15" ShortCode="CZ" Sid="6188">
|
296 |
-
<Name ID="40215" Value="Czech" langid="1"/>
|
297 |
-
<Name ID="40216" Value="Czech" langid="2"/>
|
298 |
-
<Name ID="40217" Value="Czech" langid="3"/>
|
299 |
-
<Name ID="40218" Value="Czech" langid="4"/>
|
300 |
-
<Name ID="40219" Value="Czech" langid="5"/>
|
301 |
-
<Name ID="40220" Value="Czech" langid="6"/>
|
302 |
-
<Name ID="198036" Value="Чешский" langid="8"/>
|
303 |
-
<Name ID="50893" Value="" langid="12"/>
|
304 |
-
<Name ID="205073" Value="Чеська" langid="25"/>
|
305 |
-
</Language>
|
306 |
-
<Language Code="russian" ID="8" ShortCode="RU" Sid="6181">
|
307 |
-
<Name ID="40173" Value="Russian" langid="1"/>
|
308 |
-
<Name ID="40174" Value="Russian" langid="2"/>
|
309 |
-
<Name ID="40175" Value="Russian" langid="3"/>
|
310 |
-
<Name ID="40176" Value="Russian" langid="4"/>
|
311 |
-
<Name ID="40177" Value="Russian" langid="5"/>
|
312 |
-
<Name ID="40178" Value="Russian" langid="6"/>
|
313 |
-
<Name ID="40303" Value="Russian" langid="7"/>
|
314 |
-
<Name ID="198029" Value="Русский" langid="8"/>
|
315 |
-
<Name ID="40305" Value="Russian" langid="9"/>
|
316 |
-
<Name ID="40306" Value="Russian" langid="10"/>
|
317 |
-
<Name ID="40307" Value="Russian" langid="11"/>
|
318 |
-
<Name ID="40308" Value="Russian" langid="12"/>
|
319 |
-
<Name ID="40309" Value="Russian" langid="13"/>
|
320 |
-
<Name ID="40310" Value="Russian" langid="14"/>
|
321 |
-
<Name ID="40311" Value="Russian" langid="15"/>
|
322 |
-
<Name ID="40312" Value="Russian" langid="16"/>
|
323 |
-
<Name ID="40313" Value="Russian" langid="17"/>
|
324 |
-
<Name ID="205066" Value="Російська" langid="25"/>
|
325 |
-
</Language>
|
326 |
-
<Language Code="german" ID="4" ShortCode="DE" Sid="4795">
|
327 |
-
<Name ID="14088" Value="German" langid="1"/>
|
328 |
-
<Name ID="14089" Value="German" langid="2"/>
|
329 |
-
<Name ID="14090" Value="German" langid="3"/>
|
330 |
-
<Name ID="18226" Value="German" langid="4"/>
|
331 |
-
<Name ID="104573" Value="Luce per una lettura agevole" langid="5"/>
|
332 |
-
<Name ID="26490" Value="German" langid="6"/>
|
333 |
-
<Name ID="38092" Value="Tysk" langid="7"/>
|
334 |
-
<Name ID="198025" Value="Немецкий" langid="8"/>
|
335 |
-
<Name ID="40264" Value="German" langid="9"/>
|
336 |
-
<Name ID="40265" Value="German" langid="10"/>
|
337 |
-
<Name ID="40266" Value="German" langid="11"/>
|
338 |
-
<Name ID="40267" Value="German" langid="12"/>
|
339 |
-
<Name ID="40268" Value="German" langid="13"/>
|
340 |
-
<Name ID="40269" Value="German" langid="14"/>
|
341 |
-
<Name ID="40270" Value="German" langid="15"/>
|
342 |
-
<Name ID="40271" Value="German" langid="16"/>
|
343 |
-
<Name ID="40272" Value="German" langid="17"/>
|
344 |
-
<Name ID="205062" Value="Німецька" langid="25"/>
|
345 |
-
</Language>
|
346 |
-
<Language Code="serbian" ID="24" ShortCode="SR" Sid="9443">
|
347 |
-
<Name ID="170887" Value="Serbian" langid="1"/>
|
348 |
-
<Name ID="170888" Value="Serbian" langid="2"/>
|
349 |
-
<Name ID="170889" Value="Serbian" langid="3"/>
|
350 |
-
<Name ID="170890" Value="Serbian" langid="4"/>
|
351 |
-
<Name ID="170891" Value="Serbian" langid="5"/>
|
352 |
-
<Name ID="170892" Value="Serbian" langid="6"/>
|
353 |
-
<Name ID="198045" Value="Сербский" langid="8"/>
|
354 |
-
<Name ID="205082" Value="Сербська" langid="25"/>
|
355 |
-
</Language>
|
356 |
-
<Language Code="norwegian" ID="19" ShortCode="NO" Sid="8664">
|
357 |
-
<Name ID="118813" Value="Norwegian" langid="1"/>
|
358 |
-
<Name ID="118814" Value="Norwegian" langid="2"/>
|
359 |
-
<Name ID="118815" Value="Norwegian" langid="3"/>
|
360 |
-
<Name ID="118816" Value="Norwegian" langid="4"/>
|
361 |
-
<Name ID="118817" Value="Norwegian" langid="5"/>
|
362 |
-
<Name ID="118818" Value="Norwegian" langid="6"/>
|
363 |
-
<Name ID="198040" Value="Норвежский" langid="8"/>
|
364 |
-
<Name ID="205077" Value="Норвезька" langid="25"/>
|
365 |
-
</Language>
|
366 |
-
<Language Code="brazilian-portuguese" ID="10" ShortCode="BR" Sid="6183">
|
367 |
-
<Name ID="40185" Value="Brazilian-Portuguese" langid="1"/>
|
368 |
-
<Name ID="40186" Value="Brazilian-Portuguese" langid="2"/>
|
369 |
-
<Name ID="40187" Value="Brazilian-Portuguese" langid="3"/>
|
370 |
-
<Name ID="40188" Value="Brazilian-Portuguese" langid="4"/>
|
371 |
-
<Name ID="40189" Value="Brazilian-Portuguese" langid="5"/>
|
372 |
-
<Name ID="40190" Value="Brazilian-Portuguese" langid="6"/>
|
373 |
-
<Name ID="198031" Value="Бразильский-португальский" langid="8"/>
|
374 |
-
<Name ID="50888" Value="" langid="12"/>
|
375 |
-
<Name ID="205068" Value="Португальська-Бразилія" langid="25"/>
|
376 |
-
</Language>
|
377 |
-
<Language Code="italian" ID="5" ShortCode="IT" Sid="4796">
|
378 |
-
<Name ID="14091" Value="Italian" langid="1"/>
|
379 |
-
<Name ID="14092" Value="Italian" langid="2"/>
|
380 |
-
<Name ID="14093" Value="Italian" langid="3"/>
|
381 |
-
<Name ID="18227" Value="Italian" langid="4"/>
|
382 |
-
<Name ID="104579" Value="Funzione di on/off luce" langid="5"/>
|
383 |
-
<Name ID="26491" Value="Italian" langid="6"/>
|
384 |
-
<Name ID="38093" Value="Italiensk" langid="7"/>
|
385 |
-
<Name ID="198026" Value="Итальянский" langid="8"/>
|
386 |
-
<Name ID="40274" Value="Italian" langid="9"/>
|
387 |
-
<Name ID="40275" Value="Italian" langid="10"/>
|
388 |
-
<Name ID="40276" Value="Italian" langid="11"/>
|
389 |
-
<Name ID="40277" Value="Italian" langid="12"/>
|
390 |
-
<Name ID="40278" Value="Italian" langid="13"/>
|
391 |
-
<Name ID="40279" Value="Italian" langid="14"/>
|
392 |
-
<Name ID="40280" Value="Italian" langid="15"/>
|
393 |
-
<Name ID="40281" Value="Italian" langid="16"/>
|
394 |
-
<Name ID="40282" Value="Italian" langid="17"/>
|
395 |
-
<Name ID="205063" Value="Італійська" langid="25"/>
|
396 |
-
</Language>
|
397 |
-
</LanguageList>
|
398 |
-
</Response>
|
399 |
-
</ICECAT-interface>
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!DOCTYPE ICECAT-interface SYSTEM "http://data.icecat.biz/dtd/ICECAT-interface_response.dtd">
|
3 |
+
<!-- source: ICEcat.biz 2009 -->
|
4 |
+
<ICECAT-interface>
|
5 |
+
<Response ID="50564949" Status="1" Date="Thu Oct 22 04:26:04 2009" Request_ID="1256178364">
|
6 |
+
<LanguageList>
|
7 |
+
<Language Code="portuguese" ID="11" ShortCode="PT" Sid="6184">
|
8 |
+
<Name ID="40191" Value="Portuguese-Portuguese" langid="1"/>
|
9 |
+
<Name ID="40192" Value="Portuguese-Portuguese" langid="2"/>
|
10 |
+
<Name ID="40193" Value="Portuguese-Portuguese" langid="3"/>
|
11 |
+
<Name ID="40194" Value="Portuguese-Portuguese" langid="4"/>
|
12 |
+
<Name ID="40195" Value="Portuguese-Portuguese" langid="5"/>
|
13 |
+
<Name ID="40196" Value="Portuguese-Portuguese" langid="6"/>
|
14 |
+
<Name ID="198032" Value="Португальский-португальский" langid="8"/>
|
15 |
+
<Name ID="50889" Value="" langid="12"/>
|
16 |
+
<Name ID="205069" Value="Португальcька-Португалія" langid="25"/>
|
17 |
+
</Language>
|
18 |
+
<Language Code="bulgarian" ID="21" ShortCode="BG" Sid="9218">
|
19 |
+
<Name ID="147616" Value="Bulgarian" langid="1"/>
|
20 |
+
<Name ID="198042" Value="Болгарский" langid="8"/>
|
21 |
+
<Name ID="205079" Value="Болгарська" langid="25"/>
|
22 |
+
</Language>
|
23 |
+
<Language Code="danish" ID="7" ShortCode="DK" Sid="6058">
|
24 |
+
<Name ID="39312" Value="Danish" langid="1"/>
|
25 |
+
<Name ID="39313" Value="Danish" langid="2"/>
|
26 |
+
<Name ID="39314" Value="Danish" langid="3"/>
|
27 |
+
<Name ID="39315" Value="Danish" langid="4"/>
|
28 |
+
<Name ID="39316" Value="Danish" langid="5"/>
|
29 |
+
<Name ID="39317" Value="Danish" langid="6"/>
|
30 |
+
<Name ID="39318" Value="Danish" langid="7"/>
|
31 |
+
<Name ID="198028" Value="Датский" langid="8"/>
|
32 |
+
<Name ID="40294" Value="Danish" langid="9"/>
|
33 |
+
<Name ID="40295" Value="Danish" langid="10"/>
|
34 |
+
<Name ID="40296" Value="Danish" langid="11"/>
|
35 |
+
<Name ID="40297" Value="Danish" langid="12"/>
|
36 |
+
<Name ID="40298" Value="Danish" langid="13"/>
|
37 |
+
<Name ID="40299" Value="Danish" langid="14"/>
|
38 |
+
<Name ID="40300" Value="Danish" langid="15"/>
|
39 |
+
<Name ID="40301" Value="Danish" langid="16"/>
|
40 |
+
<Name ID="40302" Value="Danish" langid="17"/>
|
41 |
+
<Name ID="205065" Value="Датська" langid="25"/>
|
42 |
+
</Language>
|
43 |
+
<Language Code="japanese" ID="26" ShortCode="JA" Sid="9635">
|
44 |
+
<Name ID="224188" Value="Japanese" langid="1"/>
|
45 |
+
<Name ID="224189" Value="Japanese" langid="2"/>
|
46 |
+
<Name ID="224190" Value="Japanese" langid="3"/>
|
47 |
+
<Name ID="224191" Value="Japanese" langid="4"/>
|
48 |
+
<Name ID="224192" Value="Japanese" langid="5"/>
|
49 |
+
<Name ID="224193" Value="Japanese" langid="6"/>
|
50 |
+
<Name ID="224194" Value="Японский" langid="8"/>
|
51 |
+
<Name ID="224195" Value="Японська" langid="25"/>
|
52 |
+
<Name ID="224196" Value="Japanese" langid="26"/>
|
53 |
+
</Language>
|
54 |
+
<Language Code="finnish" ID="17" ShortCode="FI" Sid="6190">
|
55 |
+
<Name ID="40227" Value="Finnish" langid="1"/>
|
56 |
+
<Name ID="40228" Value="Finnish" langid="2"/>
|
57 |
+
<Name ID="40229" Value="Finnish" langid="3"/>
|
58 |
+
<Name ID="40230" Value="Finnish" langid="4"/>
|
59 |
+
<Name ID="40231" Value="Finnish" langid="5"/>
|
60 |
+
<Name ID="40232" Value="Finnish" langid="6"/>
|
61 |
+
<Name ID="198038" Value="Финский" langid="8"/>
|
62 |
+
<Name ID="50895" Value="" langid="12"/>
|
63 |
+
<Name ID="205075" Value="Фінська" langid="25"/>
|
64 |
+
</Language>
|
65 |
+
<Language Code="dutch" ID="2" ShortCode="NL" Sid="3">
|
66 |
+
<Name ID="3" Value="Dutch" langid="1"/>
|
67 |
+
<Name ID="4" Value="Dutch" langid="2"/>
|
68 |
+
<Name ID="6074" Value="Dutch" langid="3"/>
|
69 |
+
<Name ID="14099" Value="Dutch" langid="4"/>
|
70 |
+
<Name ID="18231" Value="Dutch" langid="5"/>
|
71 |
+
<Name ID="22363" Value="Dutch" langid="6"/>
|
72 |
+
<Name ID="34054" Value="Hollandsk" langid="7"/>
|
73 |
+
<Name ID="198023" Value="Голландский" langid="8"/>
|
74 |
+
<Name ID="40244" Value="Dutch" langid="9"/>
|
75 |
+
<Name ID="40245" Value="Dutch" langid="10"/>
|
76 |
+
<Name ID="40246" Value="Dutch" langid="11"/>
|
77 |
+
<Name ID="40247" Value="Dutch" langid="12"/>
|
78 |
+
<Name ID="40248" Value="Dutch" langid="13"/>
|
79 |
+
<Name ID="40249" Value="Dutch" langid="14"/>
|
80 |
+
<Name ID="40250" Value="Dutch" langid="15"/>
|
81 |
+
<Name ID="40251" Value="Dutch" langid="16"/>
|
82 |
+
<Name ID="40252" Value="Dutch" langid="17"/>
|
83 |
+
<Name ID="205060" Value="Голландська" langid="25"/>
|
84 |
+
</Language>
|
85 |
+
<Language Code="georgian" ID="22" ShortCode="KA" Sid="9271">
|
86 |
+
<Name ID="154954" Value="Georgian" langid="1"/>
|
87 |
+
<Name ID="198043" Value="Грузинский" langid="8"/>
|
88 |
+
<Name ID="205080" Value="Грузинська" langid="25"/>
|
89 |
+
</Language>
|
90 |
+
<Language Code="english" ID="1" ShortCode="EN" Sid="2">
|
91 |
+
<Name ID="1" Value="English" langid="1"/>
|
92 |
+
<Name ID="2" Value="English" langid="2"/>
|
93 |
+
<Name ID="6073" Value="English" langid="3"/>
|
94 |
+
<Name ID="14098" Value="English" langid="4"/>
|
95 |
+
<Name ID="18230" Value="English" langid="5"/>
|
96 |
+
<Name ID="22362" Value="English" langid="6"/>
|
97 |
+
<Name ID="34053" Value="Engelsk" langid="7"/>
|
98 |
+
<Name ID="198022" Value="Английский" langid="8"/>
|
99 |
+
<Name ID="40234" Value="English" langid="9"/>
|
100 |
+
<Name ID="40235" Value="English" langid="10"/>
|
101 |
+
<Name ID="40236" Value="English" langid="11"/>
|
102 |
+
<Name ID="40237" Value="English" langid="12"/>
|
103 |
+
<Name ID="40238" Value="English" langid="13"/>
|
104 |
+
<Name ID="40239" Value="English" langid="14"/>
|
105 |
+
<Name ID="40240" Value="English" langid="15"/>
|
106 |
+
<Name ID="40241" Value="English" langid="16"/>
|
107 |
+
<Name ID="40242" Value="English" langid="17"/>
|
108 |
+
<Name ID="205059" Value="Англійська" langid="25"/>
|
109 |
+
</Language>
|
110 |
+
<Language Code="greek" ID="18" ShortCode="EL" Sid="8587">
|
111 |
+
<Name ID="113508" Value="Greek" langid="1"/>
|
112 |
+
<Name ID="113509" Value="Greek" langid="2"/>
|
113 |
+
<Name ID="113510" Value="Greek" langid="3"/>
|
114 |
+
<Name ID="113511" Value="Greek" langid="4"/>
|
115 |
+
<Name ID="113512" Value="Greek" langid="5"/>
|
116 |
+
<Name ID="113513" Value="Greek" langid="6"/>
|
117 |
+
<Name ID="198039" Value="Греческий" langid="8"/>
|
118 |
+
<Name ID="205076" Value="Грецька" langid="25"/>
|
119 |
+
</Language>
|
120 |
+
<Language Code="romanian" ID="23" ShortCode="RO" Sid="9390">
|
121 |
+
<Name ID="169100" Value="Romanian" langid="1"/>
|
122 |
+
<Name ID="169101" Value="Romanian" langid="2"/>
|
123 |
+
<Name ID="169102" Value="Romanian" langid="3"/>
|
124 |
+
<Name ID="169103" Value="Romanian" langid="4"/>
|
125 |
+
<Name ID="169104" Value="Romanian" langid="5"/>
|
126 |
+
<Name ID="169105" Value="Romanian" langid="6"/>
|
127 |
+
<Name ID="198044" Value="Румынский" langid="8"/>
|
128 |
+
<Name ID="205081" Value="Румунська" langid="25"/>
|
129 |
+
</Language>
|
130 |
+
<Language Code="hungarian" ID="16" ShortCode="HU" Sid="6189">
|
131 |
+
<Name ID="40221" Value="Hungarian" langid="1"/>
|
132 |
+
<Name ID="40222" Value="Hungarian" langid="2"/>
|
133 |
+
<Name ID="40223" Value="Hungarian" langid="3"/>
|
134 |
+
<Name ID="40224" Value="Hungarian" langid="4"/>
|
135 |
+
<Name ID="40225" Value="Hungarian" langid="5"/>
|
136 |
+
<Name ID="40226" Value="Hungarian" langid="6"/>
|
137 |
+
<Name ID="198037" Value="Венгерский" langid="8"/>
|
138 |
+
<Name ID="50894" Value="" langid="12"/>
|
139 |
+
<Name ID="205074" Value="Угорська" langid="25"/>
|
140 |
+
</Language>
|
141 |
+
<Language Code="swedish" ID="13" ShortCode="SE" Sid="6186">
|
142 |
+
<Name ID="40203" Value="Swedish" langid="1"/>
|
143 |
+
<Name ID="40204" Value="Swedish" langid="2"/>
|
144 |
+
<Name ID="40205" Value="Swedish" langid="3"/>
|
145 |
+
<Name ID="40206" Value="Swedish" langid="4"/>
|
146 |
+
<Name ID="40207" Value="Swedish" langid="5"/>
|
147 |
+
<Name ID="40208" Value="Swedish" langid="6"/>
|
148 |
+
<Name ID="198034" Value="Шведский" langid="8"/>
|
149 |
+
<Name ID="50891" Value="" langid="12"/>
|
150 |
+
<Name ID="205071" Value="Швецька" langid="25"/>
|
151 |
+
</Language>
|
152 |
+
<Language Code="croatian" ID="29" ShortCode="HR" Sid="10132">
|
153 |
+
<Name ID="270273" Value="Croatian" langid="1"/>
|
154 |
+
<Name ID="270274" Value="Croatian" langid="2"/>
|
155 |
+
<Name ID="270275" Value="Croatian" langid="3"/>
|
156 |
+
<Name ID="270276" Value="Croatian" langid="4"/>
|
157 |
+
<Name ID="270277" Value="Croatian" langid="5"/>
|
158 |
+
<Name ID="270278" Value="Croatian" langid="6"/>
|
159 |
+
<Name ID="270280" Value="Hrvatski" langid="29"/>
|
160 |
+
</Language>
|
161 |
+
<Language Code="catalan" ID="27" ShortCode="CA" Sid="9662">
|
162 |
+
<Name ID="231955" Value="Catalan" langid="1"/>
|
163 |
+
<Name ID="231956" Value="Catalan" langid="2"/>
|
164 |
+
<Name ID="231957" Value="Catalan" langid="3"/>
|
165 |
+
<Name ID="231958" Value="Catalan" langid="4"/>
|
166 |
+
<Name ID="231959" Value="Catalan" langid="5"/>
|
167 |
+
<Name ID="231960" Value="Catalan" langid="6"/>
|
168 |
+
<Name ID="231962" Value="Каталанский" langid="8"/>
|
169 |
+
<Name ID="231963" Value="Каталанська" langid="25"/>
|
170 |
+
<Name ID="231961" Value="Català" langid="27"/>
|
171 |
+
</Language>
|
172 |
+
<Language Code="ukrainian" ID="25" ShortCode="UK" Sid="9577">
|
173 |
+
<Name ID="198046" Value="Ukrainian" langid="1"/>
|
174 |
+
<Name ID="198047" Value="Ukrainian" langid="2"/>
|
175 |
+
<Name ID="198048" Value="Ukrainian" langid="3"/>
|
176 |
+
<Name ID="198049" Value="Ukrainian" langid="4"/>
|
177 |
+
<Name ID="198050" Value="Ukrainian" langid="5"/>
|
178 |
+
<Name ID="198051" Value="Ukrainian" langid="6"/>
|
179 |
+
<Name ID="198052" Value="Украинский" langid="8"/>
|
180 |
+
<Name ID="198053" Value="Українська" langid="25"/>
|
181 |
+
</Language>
|
182 |
+
<Language Code="spanish" ID="6" ShortCode="ES" Sid="4797">
|
183 |
+
<Name ID="14094" Value="Spanish" langid="1"/>
|
184 |
+
<Name ID="14095" Value="Spanish" langid="2"/>
|
185 |
+
<Name ID="14096" Value="Spanish" langid="3"/>
|
186 |
+
<Name ID="18228" Value="Spanish" langid="4"/>
|
187 |
+
<Name ID="106485" Value="Processo di simulazione dell'alba (intensità 0)" langid="5"/>
|
188 |
+
<Name ID="26492" Value="Spanish" langid="6"/>
|
189 |
+
<Name ID="38094" Value="Spansk" langid="7"/>
|
190 |
+
<Name ID="198027" Value="Испанский" langid="8"/>
|
191 |
+
<Name ID="40284" Value="Spanish" langid="9"/>
|
192 |
+
<Name ID="40285" Value="Spanish" langid="10"/>
|
193 |
+
<Name ID="40286" Value="Spanish" langid="11"/>
|
194 |
+
<Name ID="40287" Value="Spanish" langid="12"/>
|
195 |
+
<Name ID="40288" Value="Spanish" langid="13"/>
|
196 |
+
<Name ID="40289" Value="Spanish" langid="14"/>
|
197 |
+
<Name ID="40290" Value="Spanish" langid="15"/>
|
198 |
+
<Name ID="40291" Value="Spanish" langid="16"/>
|
199 |
+
<Name ID="40292" Value="Spanish" langid="17"/>
|
200 |
+
<Name ID="205064" Value="Іспанська" langid="25"/>
|
201 |
+
</Language>
|
202 |
+
<Language Code="argentinian-spanish" ID="28" ShortCode="AR" Sid="9835">
|
203 |
+
<Name ID="244259" Value="Argentinian-Spanish" langid="1"/>
|
204 |
+
<Name ID="244260" Value="Argentinian-Spanish" langid="2"/>
|
205 |
+
<Name ID="244261" Value="Argentinian-Spanish" langid="3"/>
|
206 |
+
<Name ID="244262" Value="Argentinian-Spanish" langid="4"/>
|
207 |
+
<Name ID="244263" Value="Argentinian-Spanish" langid="5"/>
|
208 |
+
<Name ID="244264" Value="Argentinian-Spanish" langid="6"/>
|
209 |
+
<Name ID="244265" Value="Argentinian-Spanish" langid="7"/>
|
210 |
+
<Name ID="244266" Value="Argentinian-Spanish" langid="8"/>
|
211 |
+
<Name ID="244267" Value="Argentinian-Spanish" langid="9"/>
|
212 |
+
<Name ID="244268" Value="Argentinian-Spanish" langid="10"/>
|
213 |
+
<Name ID="244269" Value="Argentinian-Spanish" langid="11"/>
|
214 |
+
<Name ID="244270" Value="Argentinian-Spanish" langid="12"/>
|
215 |
+
<Name ID="244271" Value="Argentinian-Spanish" langid="13"/>
|
216 |
+
<Name ID="244272" Value="Argentinian-Spanish" langid="14"/>
|
217 |
+
<Name ID="244273" Value="Argentinian-Spanish" langid="15"/>
|
218 |
+
<Name ID="244274" Value="Argentinian-Spanish" langid="16"/>
|
219 |
+
<Name ID="244275" Value="Argentinian-Spanish" langid="17"/>
|
220 |
+
<Name ID="244276" Value="Argentinian-Spanish" langid="18"/>
|
221 |
+
<Name ID="244277" Value="Argentinian-Spanish" langid="19"/>
|
222 |
+
<Name ID="244278" Value="Argentinian-Spanish" langid="20"/>
|
223 |
+
<Name ID="244279" Value="Argentinian-Spanish" langid="21"/>
|
224 |
+
<Name ID="244280" Value="Argentinian-Spanish" langid="22"/>
|
225 |
+
<Name ID="244281" Value="Argentinian-Spanish" langid="23"/>
|
226 |
+
<Name ID="244282" Value="Argentinian-Spanish" langid="24"/>
|
227 |
+
<Name ID="244283" Value="Argentinian-Spanish" langid="25"/>
|
228 |
+
<Name ID="244284" Value="Argentinian-Spanish" langid="26"/>
|
229 |
+
<Name ID="244285" Value="Argentinian-Spanish" langid="27"/>
|
230 |
+
<Name ID="244286" Value="Argentinian-Spanish" langid="28"/>
|
231 |
+
</Language>
|
232 |
+
<Language Code="french" ID="3" ShortCode="FR" Sid="3036">
|
233 |
+
<Name ID="6071" Value="French" langid="1"/>
|
234 |
+
<Name ID="6072" Value="French" langid="2"/>
|
235 |
+
<Name ID="8815" Value="French" langid="3"/>
|
236 |
+
<Name ID="16579" Value="French" langid="4"/>
|
237 |
+
<Name ID="103145" Value="Rapporto di compressione" langid="5"/>
|
238 |
+
<Name ID="24843" Value="French" langid="6"/>
|
239 |
+
<Name ID="36551" Value="Fransk" langid="7"/>
|
240 |
+
<Name ID="198024" Value="Французский" langid="8"/>
|
241 |
+
<Name ID="40254" Value="French" langid="9"/>
|
242 |
+
<Name ID="40255" Value="French" langid="10"/>
|
243 |
+
<Name ID="40256" Value="French" langid="11"/>
|
244 |
+
<Name ID="40257" Value="French" langid="12"/>
|
245 |
+
<Name ID="40258" Value="French" langid="13"/>
|
246 |
+
<Name ID="40259" Value="French" langid="14"/>
|
247 |
+
<Name ID="40260" Value="French" langid="15"/>
|
248 |
+
<Name ID="40261" Value="French" langid="16"/>
|
249 |
+
<Name ID="40262" Value="French" langid="17"/>
|
250 |
+
<Name ID="205061" Value="Французька" langid="25"/>
|
251 |
+
</Language>
|
252 |
+
<Language Code="us english" ID="9" ShortCode="US" Sid="6182">
|
253 |
+
<Name ID="40179" Value="US English" langid="1"/>
|
254 |
+
<Name ID="40180" Value="US English" langid="2"/>
|
255 |
+
<Name ID="40181" Value="US English" langid="3"/>
|
256 |
+
<Name ID="40182" Value="US English" langid="4"/>
|
257 |
+
<Name ID="40183" Value="US English" langid="5"/>
|
258 |
+
<Name ID="40184" Value="US English" langid="6"/>
|
259 |
+
<Name ID="198030" Value="Американский английский" langid="8"/>
|
260 |
+
<Name ID="50887" Value="" langid="12"/>
|
261 |
+
<Name ID="205067" Value="Англійська США" langid="25"/>
|
262 |
+
</Language>
|
263 |
+
<Language Code="chinese" ID="12" ShortCode="ZH" Sid="6185">
|
264 |
+
<Name ID="40197" Value="Chinese" langid="1"/>
|
265 |
+
<Name ID="40198" Value="Chinese" langid="2"/>
|
266 |
+
<Name ID="40199" Value="Chinese" langid="3"/>
|
267 |
+
<Name ID="40200" Value="Chinese" langid="4"/>
|
268 |
+
<Name ID="40201" Value="Chinese" langid="5"/>
|
269 |
+
<Name ID="40202" Value="Chinese" langid="6"/>
|
270 |
+
<Name ID="198033" Value="Китайский" langid="8"/>
|
271 |
+
<Name ID="50890" Value="" langid="12"/>
|
272 |
+
<Name ID="205070" Value="Китайська" langid="25"/>
|
273 |
+
</Language>
|
274 |
+
<Language Code="turkish" ID="20" ShortCode="TR" Sid="8665">
|
275 |
+
<Name ID="118819" Value="Turkish" langid="1"/>
|
276 |
+
<Name ID="118820" Value="Turkish" langid="2"/>
|
277 |
+
<Name ID="118821" Value="Turkish" langid="3"/>
|
278 |
+
<Name ID="118822" Value="Turkish" langid="4"/>
|
279 |
+
<Name ID="118823" Value="Turkish" langid="5"/>
|
280 |
+
<Name ID="118824" Value="Turkish" langid="6"/>
|
281 |
+
<Name ID="198041" Value="Турецкий" langid="8"/>
|
282 |
+
<Name ID="205078" Value="Турецька" langid="25"/>
|
283 |
+
</Language>
|
284 |
+
<Language Code="polish" ID="14" ShortCode="PL" Sid="6187">
|
285 |
+
<Name ID="40209" Value="Polish" langid="1"/>
|
286 |
+
<Name ID="40210" Value="Polish" langid="2"/>
|
287 |
+
<Name ID="40211" Value="Polish" langid="3"/>
|
288 |
+
<Name ID="40212" Value="Polish" langid="4"/>
|
289 |
+
<Name ID="40213" Value="Polish" langid="5"/>
|
290 |
+
<Name ID="40214" Value="Polish" langid="6"/>
|
291 |
+
<Name ID="198035" Value="Польский" langid="8"/>
|
292 |
+
<Name ID="50892" Value="" langid="12"/>
|
293 |
+
<Name ID="205072" Value="Польська" langid="25"/>
|
294 |
+
</Language>
|
295 |
+
<Language Code="czech" ID="15" ShortCode="CZ" Sid="6188">
|
296 |
+
<Name ID="40215" Value="Czech" langid="1"/>
|
297 |
+
<Name ID="40216" Value="Czech" langid="2"/>
|
298 |
+
<Name ID="40217" Value="Czech" langid="3"/>
|
299 |
+
<Name ID="40218" Value="Czech" langid="4"/>
|
300 |
+
<Name ID="40219" Value="Czech" langid="5"/>
|
301 |
+
<Name ID="40220" Value="Czech" langid="6"/>
|
302 |
+
<Name ID="198036" Value="Чешский" langid="8"/>
|
303 |
+
<Name ID="50893" Value="" langid="12"/>
|
304 |
+
<Name ID="205073" Value="Чеська" langid="25"/>
|
305 |
+
</Language>
|
306 |
+
<Language Code="russian" ID="8" ShortCode="RU" Sid="6181">
|
307 |
+
<Name ID="40173" Value="Russian" langid="1"/>
|
308 |
+
<Name ID="40174" Value="Russian" langid="2"/>
|
309 |
+
<Name ID="40175" Value="Russian" langid="3"/>
|
310 |
+
<Name ID="40176" Value="Russian" langid="4"/>
|
311 |
+
<Name ID="40177" Value="Russian" langid="5"/>
|
312 |
+
<Name ID="40178" Value="Russian" langid="6"/>
|
313 |
+
<Name ID="40303" Value="Russian" langid="7"/>
|
314 |
+
<Name ID="198029" Value="Русский" langid="8"/>
|
315 |
+
<Name ID="40305" Value="Russian" langid="9"/>
|
316 |
+
<Name ID="40306" Value="Russian" langid="10"/>
|
317 |
+
<Name ID="40307" Value="Russian" langid="11"/>
|
318 |
+
<Name ID="40308" Value="Russian" langid="12"/>
|
319 |
+
<Name ID="40309" Value="Russian" langid="13"/>
|
320 |
+
<Name ID="40310" Value="Russian" langid="14"/>
|
321 |
+
<Name ID="40311" Value="Russian" langid="15"/>
|
322 |
+
<Name ID="40312" Value="Russian" langid="16"/>
|
323 |
+
<Name ID="40313" Value="Russian" langid="17"/>
|
324 |
+
<Name ID="205066" Value="Російська" langid="25"/>
|
325 |
+
</Language>
|
326 |
+
<Language Code="german" ID="4" ShortCode="DE" Sid="4795">
|
327 |
+
<Name ID="14088" Value="German" langid="1"/>
|
328 |
+
<Name ID="14089" Value="German" langid="2"/>
|
329 |
+
<Name ID="14090" Value="German" langid="3"/>
|
330 |
+
<Name ID="18226" Value="German" langid="4"/>
|
331 |
+
<Name ID="104573" Value="Luce per una lettura agevole" langid="5"/>
|
332 |
+
<Name ID="26490" Value="German" langid="6"/>
|
333 |
+
<Name ID="38092" Value="Tysk" langid="7"/>
|
334 |
+
<Name ID="198025" Value="Немецкий" langid="8"/>
|
335 |
+
<Name ID="40264" Value="German" langid="9"/>
|
336 |
+
<Name ID="40265" Value="German" langid="10"/>
|
337 |
+
<Name ID="40266" Value="German" langid="11"/>
|
338 |
+
<Name ID="40267" Value="German" langid="12"/>
|
339 |
+
<Name ID="40268" Value="German" langid="13"/>
|
340 |
+
<Name ID="40269" Value="German" langid="14"/>
|
341 |
+
<Name ID="40270" Value="German" langid="15"/>
|
342 |
+
<Name ID="40271" Value="German" langid="16"/>
|
343 |
+
<Name ID="40272" Value="German" langid="17"/>
|
344 |
+
<Name ID="205062" Value="Німецька" langid="25"/>
|
345 |
+
</Language>
|
346 |
+
<Language Code="serbian" ID="24" ShortCode="SR" Sid="9443">
|
347 |
+
<Name ID="170887" Value="Serbian" langid="1"/>
|
348 |
+
<Name ID="170888" Value="Serbian" langid="2"/>
|
349 |
+
<Name ID="170889" Value="Serbian" langid="3"/>
|
350 |
+
<Name ID="170890" Value="Serbian" langid="4"/>
|
351 |
+
<Name ID="170891" Value="Serbian" langid="5"/>
|
352 |
+
<Name ID="170892" Value="Serbian" langid="6"/>
|
353 |
+
<Name ID="198045" Value="Сербский" langid="8"/>
|
354 |
+
<Name ID="205082" Value="Сербська" langid="25"/>
|
355 |
+
</Language>
|
356 |
+
<Language Code="norwegian" ID="19" ShortCode="NO" Sid="8664">
|
357 |
+
<Name ID="118813" Value="Norwegian" langid="1"/>
|
358 |
+
<Name ID="118814" Value="Norwegian" langid="2"/>
|
359 |
+
<Name ID="118815" Value="Norwegian" langid="3"/>
|
360 |
+
<Name ID="118816" Value="Norwegian" langid="4"/>
|
361 |
+
<Name ID="118817" Value="Norwegian" langid="5"/>
|
362 |
+
<Name ID="118818" Value="Norwegian" langid="6"/>
|
363 |
+
<Name ID="198040" Value="Норвежский" langid="8"/>
|
364 |
+
<Name ID="205077" Value="Норвезька" langid="25"/>
|
365 |
+
</Language>
|
366 |
+
<Language Code="brazilian-portuguese" ID="10" ShortCode="BR" Sid="6183">
|
367 |
+
<Name ID="40185" Value="Brazilian-Portuguese" langid="1"/>
|
368 |
+
<Name ID="40186" Value="Brazilian-Portuguese" langid="2"/>
|
369 |
+
<Name ID="40187" Value="Brazilian-Portuguese" langid="3"/>
|
370 |
+
<Name ID="40188" Value="Brazilian-Portuguese" langid="4"/>
|
371 |
+
<Name ID="40189" Value="Brazilian-Portuguese" langid="5"/>
|
372 |
+
<Name ID="40190" Value="Brazilian-Portuguese" langid="6"/>
|
373 |
+
<Name ID="198031" Value="Бразильский-португальский" langid="8"/>
|
374 |
+
<Name ID="50888" Value="" langid="12"/>
|
375 |
+
<Name ID="205068" Value="Португальська-Бразилія" langid="25"/>
|
376 |
+
</Language>
|
377 |
+
<Language Code="italian" ID="5" ShortCode="IT" Sid="4796">
|
378 |
+
<Name ID="14091" Value="Italian" langid="1"/>
|
379 |
+
<Name ID="14092" Value="Italian" langid="2"/>
|
380 |
+
<Name ID="14093" Value="Italian" langid="3"/>
|
381 |
+
<Name ID="18227" Value="Italian" langid="4"/>
|
382 |
+
<Name ID="104579" Value="Funzione di on/off luce" langid="5"/>
|
383 |
+
<Name ID="26491" Value="Italian" langid="6"/>
|
384 |
+
<Name ID="38093" Value="Italiensk" langid="7"/>
|
385 |
+
<Name ID="198026" Value="Итальянский" langid="8"/>
|
386 |
+
<Name ID="40274" Value="Italian" langid="9"/>
|
387 |
+
<Name ID="40275" Value="Italian" langid="10"/>
|
388 |
+
<Name ID="40276" Value="Italian" langid="11"/>
|
389 |
+
<Name ID="40277" Value="Italian" langid="12"/>
|
390 |
+
<Name ID="40278" Value="Italian" langid="13"/>
|
391 |
+
<Name ID="40279" Value="Italian" langid="14"/>
|
392 |
+
<Name ID="40280" Value="Italian" langid="15"/>
|
393 |
+
<Name ID="40281" Value="Italian" langid="16"/>
|
394 |
+
<Name ID="40282" Value="Italian" langid="17"/>
|
395 |
+
<Name ID="205063" Value="Італійська" langid="25"/>
|
396 |
+
</Language>
|
397 |
+
</LanguageList>
|
398 |
+
</Response>
|
399 |
+
</ICECAT-interface>
|
app/code/local/Bintime/Icecatimport/Model/System/Config/Locales.php
CHANGED
@@ -1,45 +1,45 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Class Provides locales list for Magento BO
|
4 |
-
* @author Sergey Gozhedrianov <info@bintime.com>
|
5 |
-
*
|
6 |
-
*/
|
7 |
-
class Bintime_Icecatimport_Model_System_Config_Locales
|
8 |
-
{
|
9 |
-
private $domDoc;
|
10 |
-
public function toOptionArray()
|
11 |
-
{
|
12 |
-
$pathToFile = Mage::getRoot().'/code/local/Bintime/Icecatimport/Model/System/Config/';
|
13 |
-
$fileContent = file_get_contents($pathToFile.'LanguageList.xml');
|
14 |
-
if(!$this->parseXml(utf8_encode($fileContent))){
|
15 |
-
return false;
|
16 |
-
}
|
17 |
-
|
18 |
-
$values = $this->parseLocaleValues();
|
19 |
-
return $values;
|
20 |
-
}
|
21 |
-
|
22 |
-
private function parseLocaleValues(){
|
23 |
-
$languageArray = $this->domDoc->getElementsByTagName('Language');
|
24 |
-
$resultArray = array();
|
25 |
-
foreach($languageArray as $language){
|
26 |
-
$languageShortCode = strtolower($language->getAttribute('ShortCode'));
|
27 |
-
$languageCode = ucfirst($language->getAttribute('Code'));
|
28 |
-
$resultArray[$languageShortCode]=$languageCode;
|
29 |
-
}
|
30 |
-
ksort($resultArray);
|
31 |
-
array_unshift($resultArray, 'Use Store Locale');
|
32 |
-
return $resultArray;
|
33 |
-
}
|
34 |
-
|
35 |
-
private function parseXml($stringXml){
|
36 |
-
$this->domDoc = new DOMDocument();
|
37 |
-
$result = $this->domDoc->loadXML($stringXml);
|
38 |
-
if (!$this->domDoc->validate()){
|
39 |
-
echo "Document is not Valid<br>";
|
40 |
-
return false;
|
41 |
-
}
|
42 |
-
return true;
|
43 |
-
}
|
44 |
-
}
|
45 |
-
?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Class Provides locales list for Magento BO
|
4 |
+
* @author Sergey Gozhedrianov <info@bintime.com>
|
5 |
+
*
|
6 |
+
*/
|
7 |
+
class Bintime_Icecatimport_Model_System_Config_Locales
|
8 |
+
{
|
9 |
+
private $domDoc;
|
10 |
+
public function toOptionArray()
|
11 |
+
{
|
12 |
+
$pathToFile = Mage::getRoot().'/code/local/Bintime/Icecatimport/Model/System/Config/';
|
13 |
+
$fileContent = file_get_contents($pathToFile.'LanguageList.xml');
|
14 |
+
if(!$this->parseXml(utf8_encode($fileContent))){
|
15 |
+
return false;
|
16 |
+
}
|
17 |
+
|
18 |
+
$values = $this->parseLocaleValues();
|
19 |
+
return $values;
|
20 |
+
}
|
21 |
+
|
22 |
+
private function parseLocaleValues(){
|
23 |
+
$languageArray = $this->domDoc->getElementsByTagName('Language');
|
24 |
+
$resultArray = array();
|
25 |
+
foreach($languageArray as $language){
|
26 |
+
$languageShortCode = strtolower($language->getAttribute('ShortCode'));
|
27 |
+
$languageCode = ucfirst($language->getAttribute('Code'));
|
28 |
+
$resultArray[$languageShortCode]=$languageCode;
|
29 |
+
}
|
30 |
+
ksort($resultArray);
|
31 |
+
array_unshift($resultArray, 'Use Store Locale');
|
32 |
+
return $resultArray;
|
33 |
+
}
|
34 |
+
|
35 |
+
private function parseXml($stringXml){
|
36 |
+
$this->domDoc = new DOMDocument();
|
37 |
+
$result = $this->domDoc->loadXML($stringXml);
|
38 |
+
if (!$this->domDoc->validate()){
|
39 |
+
echo "Document is not Valid<br>";
|
40 |
+
return false;
|
41 |
+
}
|
42 |
+
return true;
|
43 |
+
}
|
44 |
+
}
|
45 |
+
?>
|
app/code/local/Bintime/Icecatimport/Model/System/Config/Subscription.php
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Class provides data for Magento BO
|
4 |
-
* @author Sergey Gozhedrianov <info@bintime.com>
|
5 |
-
*
|
6 |
-
*/
|
7 |
-
class Bintime_Icecatimport_Model_System_Config_Subscription
|
8 |
-
{
|
9 |
-
public function toOptionArray()
|
10 |
-
{
|
11 |
-
$paramsArray = array(
|
12 |
-
'free' => 'OpenIcecat XML',
|
13 |
-
'full' => 'FullIcecat XML'
|
14 |
-
);
|
15 |
-
return $paramsArray;
|
16 |
-
}
|
17 |
-
}
|
18 |
-
?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Class provides data for Magento BO
|
4 |
+
* @author Sergey Gozhedrianov <info@bintime.com>
|
5 |
+
*
|
6 |
+
*/
|
7 |
+
class Bintime_Icecatimport_Model_System_Config_Subscription
|
8 |
+
{
|
9 |
+
public function toOptionArray()
|
10 |
+
{
|
11 |
+
$paramsArray = array(
|
12 |
+
'free' => 'OpenIcecat XML',
|
13 |
+
'full' => 'FullIcecat XML'
|
14 |
+
);
|
15 |
+
return $paramsArray;
|
16 |
+
}
|
17 |
+
}
|
18 |
+
?>
|
app/code/local/Bintime/Icecatimport/controllers/ImageController.php
CHANGED
@@ -1,16 +1,16 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Class provides controller for import image debug
|
4 |
-
* @author Sergey Gozhedrianov <info@bintime.com>
|
5 |
-
*
|
6 |
-
*/
|
7 |
-
class Bintime_Icecatimport_ImageController extends Mage_Adminhtml_Controller_Action{
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Action calls load method which uploads data to bintime connector data table
|
11 |
-
*/
|
12 |
-
public function viewAction(){
|
13 |
-
$result = Mage::getModel('icecatimport/observer')->load();
|
14 |
-
}
|
15 |
-
}
|
16 |
?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Class provides controller for import image debug
|
4 |
+
* @author Sergey Gozhedrianov <info@bintime.com>
|
5 |
+
*
|
6 |
+
*/
|
7 |
+
class Bintime_Icecatimport_ImageController extends Mage_Adminhtml_Controller_Action{
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Action calls load method which uploads data to bintime connector data table
|
11 |
+
*/
|
12 |
+
public function viewAction(){
|
13 |
+
$result = Mage::getModel('icecatimport/observer')->load();
|
14 |
+
}
|
15 |
+
}
|
16 |
?>
|
app/code/local/Bintime/Icecatimport/etc/config.xml
CHANGED
@@ -1,147 +1,147 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<config>
|
3 |
-
<modules>
|
4 |
-
<Bintime_Icecatimport>
|
5 |
-
<version>0.1.1</version>
|
6 |
-
</Bintime_Icecatimport>
|
7 |
-
</modules>
|
8 |
-
<global>
|
9 |
-
<helpers>
|
10 |
-
<icecatimport>
|
11 |
-
<class>Bintime_Icecatimport_Helper</class>
|
12 |
-
</icecatimport>
|
13 |
-
<catalog>
|
14 |
-
<rewrite>
|
15 |
-
<image>Bintime_Icecatimport_Helper_Catalog_Image</image>
|
16 |
-
<output>Bintime_Icecatimport_Helper_Output</output>
|
17 |
-
</rewrite>
|
18 |
-
</catalog>
|
19 |
-
</helpers>
|
20 |
-
<blocks>
|
21 |
-
<catalog>
|
22 |
-
<rewrite>
|
23 |
-
<product_view_attributes>Bintime_Icecatimport_Block_Attributes</product_view_attributes>
|
24 |
-
<product_view_media>Bintime_Icecatimport_Block_Media</product_view_media>
|
25 |
-
<product_list_related>Bintime_Icecatimport_Block_Related</product_list_related>
|
26 |
-
<product_list_upsell>Bintime_Icecatimport_Block_Upsell</product_list_upsell>
|
27 |
-
</rewrite>
|
28 |
-
</catalog>
|
29 |
-
|
30 |
-
</blocks>
|
31 |
-
<models>
|
32 |
-
<icecatimport>
|
33 |
-
<class>Bintime_Icecatimport_Model</class>
|
34 |
-
<resourceModel>icecatimport_resource_eav_mysql4</resourceModel>
|
35 |
-
</icecatimport>
|
36 |
-
<icecatimport_resource_eav_mysql4>
|
37 |
-
<entities>
|
38 |
-
<data><table>bintime_connector_data</table></data>
|
39 |
-
<supplier_mapping><table>bintime_supplier_mapping</table></supplier_mapping>
|
40 |
-
</entities>
|
41 |
-
</icecatimport_resource_eav_mysql4>
|
42 |
-
<catalog>
|
43 |
-
<rewrite>
|
44 |
-
<product>Bintime_Icecatimport_Model_Catalog_Product</product>
|
45 |
-
<category>Bintime_Icecatimport_Model_Catalog_Category</category>
|
46 |
-
</rewrite>
|
47 |
-
</catalog>
|
48 |
-
<catalogsearch_mysql4>
|
49 |
-
<rewrite>
|
50 |
-
<fulltext_collection>Bintime_Icecatimport_Model_Catalog_Search</fulltext_collection>
|
51 |
-
</rewrite>
|
52 |
-
</catalogsearch_mysql4>
|
53 |
-
</models>
|
54 |
-
<!--
|
55 |
-
<routers>
|
56 |
-
<catalog>
|
57 |
-
<rewrite>
|
58 |
-
<product>
|
59 |
-
<to>Bintime_Icecatimport/product</to>
|
60 |
-
<override_actions>false</override_actions>
|
61 |
-
<actions>
|
62 |
-
<view><to>Bintime_Icecatimport/product/view</to></view>
|
63 |
-
</actions>
|
64 |
-
</product>
|
65 |
-
</rewrite>
|
66 |
-
</catalog>
|
67 |
-
</routers>
|
68 |
-
-->
|
69 |
-
<resources>
|
70 |
-
<icecatimport_setup>
|
71 |
-
<setup>
|
72 |
-
<module>Bintime_Icecatimport</module>
|
73 |
-
</setup>
|
74 |
-
<connection>
|
75 |
-
<use>core_setup</use>
|
76 |
-
</connection>
|
77 |
-
</icecatimport_setup>
|
78 |
-
</resources>
|
79 |
-
</global>
|
80 |
-
<frontend>
|
81 |
-
<routers>
|
82 |
-
<icecatimport>
|
83 |
-
<use>standard</use>
|
84 |
-
<args>
|
85 |
-
<module>Bintime_Icecatimport</module>
|
86 |
-
<frontName>icecatimport</frontName>
|
87 |
-
</args>
|
88 |
-
</icecatimport>
|
89 |
-
</routers>
|
90 |
-
<layout>
|
91 |
-
<updates>
|
92 |
-
<icecatimport>
|
93 |
-
<file>icecatimport.xml</file>
|
94 |
-
</icecatimport>
|
95 |
-
</updates>
|
96 |
-
</layout>
|
97 |
-
<translate>
|
98 |
-
<modules>
|
99 |
-
<icecatimport>
|
100 |
-
<files>
|
101 |
-
<default>Bintime_Icecatimport.csv</default>
|
102 |
-
</files>
|
103 |
-
</icecatimport>
|
104 |
-
</modules>
|
105 |
-
</translate>
|
106 |
-
</frontend>
|
107 |
-
<adminhtml>
|
108 |
-
<acl>
|
109 |
-
<resources>
|
110 |
-
<admin>
|
111 |
-
<children>
|
112 |
-
<system>
|
113 |
-
<children>
|
114 |
-
<config>
|
115 |
-
<children>
|
116 |
-
<icecat_root translate="title" module="customer">
|
117 |
-
<title>Ice Cat Module powered by Bintime company</title>
|
118 |
-
<sort_order>200</sort_order>
|
119 |
-
</icecat_root>
|
120 |
-
</children>
|
121 |
-
</config>
|
122 |
-
</children>
|
123 |
-
</system>
|
124 |
-
</children>
|
125 |
-
</admin>
|
126 |
-
</resources>
|
127 |
-
</acl>
|
128 |
-
<events></events>
|
129 |
-
<translate>
|
130 |
-
<modules>
|
131 |
-
<mage_adminhtml>
|
132 |
-
<files>
|
133 |
-
<icecatimport>Bintime_Icecatimport.csv</icecatimport>
|
134 |
-
</files>
|
135 |
-
</mage_adminhtml>
|
136 |
-
</modules>
|
137 |
-
</translate>
|
138 |
-
</adminhtml>
|
139 |
-
<crontab>
|
140 |
-
<jobs>
|
141 |
-
<icecatimport>
|
142 |
-
<schedule><cron_expr
|
143 |
-
<run><model>icecatimport/observer::load</model></run>
|
144 |
-
</icecatimport>
|
145 |
-
</jobs>
|
146 |
-
</crontab>
|
147 |
-
</config>
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Bintime_Icecatimport>
|
5 |
+
<version>0.1.1</version>
|
6 |
+
</Bintime_Icecatimport>
|
7 |
+
</modules>
|
8 |
+
<global>
|
9 |
+
<helpers>
|
10 |
+
<icecatimport>
|
11 |
+
<class>Bintime_Icecatimport_Helper</class>
|
12 |
+
</icecatimport>
|
13 |
+
<catalog>
|
14 |
+
<rewrite>
|
15 |
+
<image>Bintime_Icecatimport_Helper_Catalog_Image</image>
|
16 |
+
<output>Bintime_Icecatimport_Helper_Output</output>
|
17 |
+
</rewrite>
|
18 |
+
</catalog>
|
19 |
+
</helpers>
|
20 |
+
<blocks>
|
21 |
+
<catalog>
|
22 |
+
<rewrite>
|
23 |
+
<product_view_attributes>Bintime_Icecatimport_Block_Attributes</product_view_attributes>
|
24 |
+
<product_view_media>Bintime_Icecatimport_Block_Media</product_view_media>
|
25 |
+
<product_list_related>Bintime_Icecatimport_Block_Related</product_list_related>
|
26 |
+
<product_list_upsell>Bintime_Icecatimport_Block_Upsell</product_list_upsell>
|
27 |
+
</rewrite>
|
28 |
+
</catalog>
|
29 |
+
|
30 |
+
</blocks>
|
31 |
+
<models>
|
32 |
+
<icecatimport>
|
33 |
+
<class>Bintime_Icecatimport_Model</class>
|
34 |
+
<resourceModel>icecatimport_resource_eav_mysql4</resourceModel>
|
35 |
+
</icecatimport>
|
36 |
+
<icecatimport_resource_eav_mysql4>
|
37 |
+
<entities>
|
38 |
+
<data><table>bintime_connector_data</table></data>
|
39 |
+
<supplier_mapping><table>bintime_supplier_mapping</table></supplier_mapping>
|
40 |
+
</entities>
|
41 |
+
</icecatimport_resource_eav_mysql4>
|
42 |
+
<catalog>
|
43 |
+
<rewrite>
|
44 |
+
<product>Bintime_Icecatimport_Model_Catalog_Product</product>
|
45 |
+
<category>Bintime_Icecatimport_Model_Catalog_Category</category>
|
46 |
+
</rewrite>
|
47 |
+
</catalog>
|
48 |
+
<catalogsearch_mysql4>
|
49 |
+
<rewrite>
|
50 |
+
<fulltext_collection>Bintime_Icecatimport_Model_Catalog_Search</fulltext_collection>
|
51 |
+
</rewrite>
|
52 |
+
</catalogsearch_mysql4>
|
53 |
+
</models>
|
54 |
+
<!--
|
55 |
+
<routers>
|
56 |
+
<catalog>
|
57 |
+
<rewrite>
|
58 |
+
<product>
|
59 |
+
<to>Bintime_Icecatimport/product</to>
|
60 |
+
<override_actions>false</override_actions>
|
61 |
+
<actions>
|
62 |
+
<view><to>Bintime_Icecatimport/product/view</to></view>
|
63 |
+
</actions>
|
64 |
+
</product>
|
65 |
+
</rewrite>
|
66 |
+
</catalog>
|
67 |
+
</routers>
|
68 |
+
-->
|
69 |
+
<resources>
|
70 |
+
<icecatimport_setup>
|
71 |
+
<setup>
|
72 |
+
<module>Bintime_Icecatimport</module>
|
73 |
+
</setup>
|
74 |
+
<connection>
|
75 |
+
<use>core_setup</use>
|
76 |
+
</connection>
|
77 |
+
</icecatimport_setup>
|
78 |
+
</resources>
|
79 |
+
</global>
|
80 |
+
<frontend>
|
81 |
+
<routers>
|
82 |
+
<icecatimport>
|
83 |
+
<use>standard</use>
|
84 |
+
<args>
|
85 |
+
<module>Bintime_Icecatimport</module>
|
86 |
+
<frontName>icecatimport</frontName>
|
87 |
+
</args>
|
88 |
+
</icecatimport>
|
89 |
+
</routers>
|
90 |
+
<layout>
|
91 |
+
<updates>
|
92 |
+
<icecatimport>
|
93 |
+
<file>icecatimport.xml</file>
|
94 |
+
</icecatimport>
|
95 |
+
</updates>
|
96 |
+
</layout>
|
97 |
+
<translate>
|
98 |
+
<modules>
|
99 |
+
<icecatimport>
|
100 |
+
<files>
|
101 |
+
<default>Bintime_Icecatimport.csv</default>
|
102 |
+
</files>
|
103 |
+
</icecatimport>
|
104 |
+
</modules>
|
105 |
+
</translate>
|
106 |
+
</frontend>
|
107 |
+
<adminhtml>
|
108 |
+
<acl>
|
109 |
+
<resources>
|
110 |
+
<admin>
|
111 |
+
<children>
|
112 |
+
<system>
|
113 |
+
<children>
|
114 |
+
<config>
|
115 |
+
<children>
|
116 |
+
<icecat_root translate="title" module="customer">
|
117 |
+
<title>Ice Cat Module powered by Bintime company</title>
|
118 |
+
<sort_order>200</sort_order>
|
119 |
+
</icecat_root>
|
120 |
+
</children>
|
121 |
+
</config>
|
122 |
+
</children>
|
123 |
+
</system>
|
124 |
+
</children>
|
125 |
+
</admin>
|
126 |
+
</resources>
|
127 |
+
</acl>
|
128 |
+
<events></events>
|
129 |
+
<translate>
|
130 |
+
<modules>
|
131 |
+
<mage_adminhtml>
|
132 |
+
<files>
|
133 |
+
<icecatimport>Bintime_Icecatimport.csv</icecatimport>
|
134 |
+
</files>
|
135 |
+
</mage_adminhtml>
|
136 |
+
</modules>
|
137 |
+
</translate>
|
138 |
+
</adminhtml>
|
139 |
+
<crontab>
|
140 |
+
<jobs>
|
141 |
+
<icecatimport>
|
142 |
+
<schedule><cron_expr>19 15 * * *</cron_expr></schedule>
|
143 |
+
<run><model>icecatimport/observer::load</model></run>
|
144 |
+
</icecatimport>
|
145 |
+
</jobs>
|
146 |
+
</crontab>
|
147 |
+
</config>
|
app/code/local/Bintime/Icecatimport/etc/system.xml
CHANGED
@@ -1,97 +1,97 @@
|
|
1 |
-
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
-
<config>
|
3 |
-
<sections>
|
4 |
-
<icecat_root translate="label" module="catalog">
|
5 |
-
<class>separator-top</class>
|
6 |
-
<label>Icecat Live!</label>
|
7 |
-
<tab>catalog</tab>
|
8 |
-
<frontend_type>text</frontend_type>
|
9 |
-
<sort_order>200</sort_order>
|
10 |
-
<show_in_default>1</show_in_default>
|
11 |
-
<show_in_website>1</show_in_website>
|
12 |
-
<show_in_store>1</show_in_store>
|
13 |
-
<groups>
|
14 |
-
<icecat translate="label">
|
15 |
-
<label>Icecat Live! Settings</label>
|
16 |
-
<frontend_type>text</frontend_type>
|
17 |
-
<sort_order>50</sort_order>
|
18 |
-
<show_in_default>1</show_in_default>
|
19 |
-
<show_in_website>1</show_in_website>
|
20 |
-
<show_in_store>1</show_in_store>
|
21 |
-
<fields>
|
22 |
-
<login translate="label">
|
23 |
-
<label>Icecat User name</label>
|
24 |
-
<frontend_type>text</frontend_type>
|
25 |
-
<sort_order>10</sort_order>
|
26 |
-
<show_in_default>1</show_in_default>
|
27 |
-
<show_in_website>1</show_in_website>
|
28 |
-
<show_in_store>1</show_in_store>
|
29 |
-
</login>
|
30 |
-
<password translate="label">
|
31 |
-
<label>Icecat Password</label>
|
32 |
-
<frontend_type>text</frontend_type>
|
33 |
-
<sort_order>20</sort_order>
|
34 |
-
<show_in_default>1</show_in_default>
|
35 |
-
<show_in_website>1</show_in_website>
|
36 |
-
<show_in_store>1</show_in_store>
|
37 |
-
</password>
|
38 |
-
<icecat_type translate="label">
|
39 |
-
<label>Subscription level</label>
|
40 |
-
<frontend_type>select</frontend_type>
|
41 |
-
<source_model>icecatimport/system_config_subscription</source_model>
|
42 |
-
<sort_order>25</sort_order>
|
43 |
-
<show_in_default>1</show_in_default>
|
44 |
-
<show_in_website>1</show_in_website>
|
45 |
-
<show_in_store>1</show_in_store>
|
46 |
-
</icecat_type>
|
47 |
-
<language translate="label">
|
48 |
-
<label>Language</label>
|
49 |
-
<frontend_type>select</frontend_type>
|
50 |
-
<source_model>icecatimport/system_config_locales</source_model>
|
51 |
-
<sort_order>30</sort_order>
|
52 |
-
<show_in_default>1</show_in_default>
|
53 |
-
<show_in_website>1</show_in_website>
|
54 |
-
<show_in_store>1</show_in_store>
|
55 |
-
</language>
|
56 |
-
<sku_field translate="label">
|
57 |
-
<label>MPN</label>
|
58 |
-
<frontend_type>select</frontend_type>
|
59 |
-
<source_model>icecatimport/system_config_attributes</source_model>
|
60 |
-
<sort_order>40</sort_order>
|
61 |
-
<show_in_default>1</show_in_default>
|
62 |
-
<show_in_website>1</show_in_website>
|
63 |
-
<show_in_store>1</show_in_store>
|
64 |
-
</sku_field>
|
65 |
-
<manufacturer translate="label">
|
66 |
-
<label>Manufacturer Name</label>
|
67 |
-
<frontend_type>select</frontend_type>
|
68 |
-
<source_model>icecatimport/system_config_attributes</source_model>
|
69 |
-
<sort_order>50</sort_order>
|
70 |
-
<show_in_default>1</show_in_default>
|
71 |
-
<show_in_website>1</show_in_website>
|
72 |
-
<show_in_store>1</show_in_store>
|
73 |
-
</manufacturer>
|
74 |
-
<ean_code translate="label">
|
75 |
-
<label>Ean Code</label>
|
76 |
-
<frontend_type>select</frontend_type>
|
77 |
-
<source_model>icecatimport/system_config_attributes</source_model>
|
78 |
-
<sort_order>60</sort_order>
|
79 |
-
<show_in_default>1</show_in_default>
|
80 |
-
<show_in_website>1</show_in_website>
|
81 |
-
<show_in_store>1</show_in_store>
|
82 |
-
</ean_code>
|
83 |
-
<descript_priority translate="label">
|
84 |
-
<label>Use Description from </label>
|
85 |
-
<frontend_type>select</frontend_type>
|
86 |
-
<source_model>icecatimport/system_config_descriptionpriority</source_model>
|
87 |
-
<sort_order>70</sort_order>
|
88 |
-
<show_in_default>1</show_in_default>
|
89 |
-
<show_in_website>1</show_in_website>
|
90 |
-
<show_in_store>1</show_in_store>
|
91 |
-
</descript_priority>
|
92 |
-
</fields>
|
93 |
-
</icecat>
|
94 |
-
</groups>
|
95 |
-
</icecat_root>
|
96 |
-
</sections>
|
97 |
-
</config>
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<config>
|
3 |
+
<sections>
|
4 |
+
<icecat_root translate="label" module="catalog">
|
5 |
+
<class>separator-top</class>
|
6 |
+
<label>Icecat Live!</label>
|
7 |
+
<tab>catalog</tab>
|
8 |
+
<frontend_type>text</frontend_type>
|
9 |
+
<sort_order>200</sort_order>
|
10 |
+
<show_in_default>1</show_in_default>
|
11 |
+
<show_in_website>1</show_in_website>
|
12 |
+
<show_in_store>1</show_in_store>
|
13 |
+
<groups>
|
14 |
+
<icecat translate="label">
|
15 |
+
<label>Icecat Live! Settings</label>
|
16 |
+
<frontend_type>text</frontend_type>
|
17 |
+
<sort_order>50</sort_order>
|
18 |
+
<show_in_default>1</show_in_default>
|
19 |
+
<show_in_website>1</show_in_website>
|
20 |
+
<show_in_store>1</show_in_store>
|
21 |
+
<fields>
|
22 |
+
<login translate="label">
|
23 |
+
<label>Icecat User name</label>
|
24 |
+
<frontend_type>text</frontend_type>
|
25 |
+
<sort_order>10</sort_order>
|
26 |
+
<show_in_default>1</show_in_default>
|
27 |
+
<show_in_website>1</show_in_website>
|
28 |
+
<show_in_store>1</show_in_store>
|
29 |
+
</login>
|
30 |
+
<password translate="label">
|
31 |
+
<label>Icecat Password</label>
|
32 |
+
<frontend_type>text</frontend_type>
|
33 |
+
<sort_order>20</sort_order>
|
34 |
+
<show_in_default>1</show_in_default>
|
35 |
+
<show_in_website>1</show_in_website>
|
36 |
+
<show_in_store>1</show_in_store>
|
37 |
+
</password>
|
38 |
+
<icecat_type translate="label">
|
39 |
+
<label>Subscription level</label>
|
40 |
+
<frontend_type>select</frontend_type>
|
41 |
+
<source_model>icecatimport/system_config_subscription</source_model>
|
42 |
+
<sort_order>25</sort_order>
|
43 |
+
<show_in_default>1</show_in_default>
|
44 |
+
<show_in_website>1</show_in_website>
|
45 |
+
<show_in_store>1</show_in_store>
|
46 |
+
</icecat_type>
|
47 |
+
<language translate="label">
|
48 |
+
<label>Language</label>
|
49 |
+
<frontend_type>select</frontend_type>
|
50 |
+
<source_model>icecatimport/system_config_locales</source_model>
|
51 |
+
<sort_order>30</sort_order>
|
52 |
+
<show_in_default>1</show_in_default>
|
53 |
+
<show_in_website>1</show_in_website>
|
54 |
+
<show_in_store>1</show_in_store>
|
55 |
+
</language>
|
56 |
+
<sku_field translate="label">
|
57 |
+
<label>MPN</label>
|
58 |
+
<frontend_type>select</frontend_type>
|
59 |
+
<source_model>icecatimport/system_config_attributes</source_model>
|
60 |
+
<sort_order>40</sort_order>
|
61 |
+
<show_in_default>1</show_in_default>
|
62 |
+
<show_in_website>1</show_in_website>
|
63 |
+
<show_in_store>1</show_in_store>
|
64 |
+
</sku_field>
|
65 |
+
<manufacturer translate="label">
|
66 |
+
<label>Manufacturer Name</label>
|
67 |
+
<frontend_type>select</frontend_type>
|
68 |
+
<source_model>icecatimport/system_config_attributes</source_model>
|
69 |
+
<sort_order>50</sort_order>
|
70 |
+
<show_in_default>1</show_in_default>
|
71 |
+
<show_in_website>1</show_in_website>
|
72 |
+
<show_in_store>1</show_in_store>
|
73 |
+
</manufacturer>
|
74 |
+
<ean_code translate="label">
|
75 |
+
<label>Ean Code</label>
|
76 |
+
<frontend_type>select</frontend_type>
|
77 |
+
<source_model>icecatimport/system_config_attributes</source_model>
|
78 |
+
<sort_order>60</sort_order>
|
79 |
+
<show_in_default>1</show_in_default>
|
80 |
+
<show_in_website>1</show_in_website>
|
81 |
+
<show_in_store>1</show_in_store>
|
82 |
+
</ean_code>
|
83 |
+
<descript_priority translate="label">
|
84 |
+
<label>Use Description from </label>
|
85 |
+
<frontend_type>select</frontend_type>
|
86 |
+
<source_model>icecatimport/system_config_descriptionpriority</source_model>
|
87 |
+
<sort_order>70</sort_order>
|
88 |
+
<show_in_default>1</show_in_default>
|
89 |
+
<show_in_website>1</show_in_website>
|
90 |
+
<show_in_store>1</show_in_store>
|
91 |
+
</descript_priority>
|
92 |
+
</fields>
|
93 |
+
</icecat>
|
94 |
+
</groups>
|
95 |
+
</icecat_root>
|
96 |
+
</sections>
|
97 |
+
</config>
|
app/code/local/Bintime/Icecatimport/sql/icecatimport_setup/mysql4-install-0.1.0.php
CHANGED
@@ -1,24 +1,24 @@
|
|
1 |
-
<?php
|
2 |
-
$installer = $this;
|
3 |
-
/* @var $installer Mage_Catalog_Model_Resource_Eav_Mysql4_Setup */
|
4 |
-
|
5 |
-
$installer->startSetup();
|
6 |
-
|
7 |
-
$installer->run("
|
8 |
-
DROP TABLE IF EXISTS {$this->getTable('icecatimport/data')};
|
9 |
-
CREATE TABLE {$this->getTable('icecatimport/data')} (
|
10 |
-
`prod_id` varchar(255) NOT NULL,
|
11 |
-
`prod_img` varchar(255),
|
12 |
-
KEY `PRODUCT_MPN` (`prod_id`)
|
13 |
-
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Bintime Connector product image table';
|
14 |
-
|
15 |
-
DROP TABLE IF EXISTS {$this->getTable('icecatimport/supplier_mapping')};
|
16 |
-
CREATE TABLE {$this->getTable('icecatimport/supplier_mapping')} (
|
17 |
-
`supplier_id` int(11) NOT NULL,
|
18 |
-
`supplier_symbol` VARCHAR(255),
|
19 |
-
KEY `supplier_id` (`supplier_id`)
|
20 |
-
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Bintime Connector supplier mapping table';
|
21 |
-
|
22 |
-
");
|
23 |
-
|
24 |
-
$installer->endSetup();
|
1 |
+
<?php
|
2 |
+
$installer = $this;
|
3 |
+
/* @var $installer Mage_Catalog_Model_Resource_Eav_Mysql4_Setup */
|
4 |
+
|
5 |
+
$installer->startSetup();
|
6 |
+
|
7 |
+
$installer->run("
|
8 |
+
DROP TABLE IF EXISTS {$this->getTable('icecatimport/data')};
|
9 |
+
CREATE TABLE {$this->getTable('icecatimport/data')} (
|
10 |
+
`prod_id` varchar(255) NOT NULL,
|
11 |
+
`prod_img` varchar(255),
|
12 |
+
KEY `PRODUCT_MPN` (`prod_id`)
|
13 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Bintime Connector product image table';
|
14 |
+
|
15 |
+
DROP TABLE IF EXISTS {$this->getTable('icecatimport/supplier_mapping')};
|
16 |
+
CREATE TABLE {$this->getTable('icecatimport/supplier_mapping')} (
|
17 |
+
`supplier_id` int(11) NOT NULL,
|
18 |
+
`supplier_symbol` VARCHAR(255),
|
19 |
+
KEY `supplier_id` (`supplier_id`)
|
20 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Bintime Connector supplier mapping table';
|
21 |
+
|
22 |
+
");
|
23 |
+
|
24 |
+
$installer->endSetup();
|
app/code/local/Bintime/Icecatimport/sql/icecatimport_setup/mysql4-upgrade-0.1.0-0.1.1.php
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
-
<?php
|
2 |
-
$installer = $this;
|
3 |
-
/* @var $installer Mage_Catalog_Model_Resource_Eav_Mysql4_Setup */
|
4 |
-
|
5 |
-
$installer->startSetup();
|
6 |
-
$installer->run("
|
7 |
-
ALTER TABLE {$this->getTable('icecatimport/data')} ADD COLUMN `prod_name` VARCHAR(255) AFTER `prod_id`;
|
8 |
-
ALTER TABLE {$this->getTable('icecatimport/data')} ADD COLUMN `supplier_id` int(11) AFTER `prod_id`;
|
9 |
-
ALTER TABLE {$this->getTable('icecatimport/data')} ADD KEY `supplier_id` (`supplier_id`);
|
10 |
-
");
|
11 |
-
$installer->endSetup();
|
12 |
?>
|
1 |
+
<?php
|
2 |
+
$installer = $this;
|
3 |
+
/* @var $installer Mage_Catalog_Model_Resource_Eav_Mysql4_Setup */
|
4 |
+
|
5 |
+
$installer->startSetup();
|
6 |
+
$installer->run("
|
7 |
+
ALTER TABLE {$this->getTable('icecatimport/data')} ADD COLUMN `prod_name` VARCHAR(255) AFTER `prod_id`;
|
8 |
+
ALTER TABLE {$this->getTable('icecatimport/data')} ADD COLUMN `supplier_id` int(11) AFTER `prod_id`;
|
9 |
+
ALTER TABLE {$this->getTable('icecatimport/data')} ADD KEY `supplier_id` (`supplier_id`);
|
10 |
+
");
|
11 |
+
$installer->endSetup();
|
12 |
?>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>IcecatLive</name>
|
4 |
-
<version>1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v.3</license>
|
7 |
<channel>community</channel>
|
@@ -11,13 +11,19 @@
|
|
11 |
<notes> - Added mapping by EAN/UPC codes
|
12 |
- Added support of Multilanguage stores
|
13 |
- Added new setting Description
|
|
|
|
|
|
|
14 |
- Fixed problems with Icecat names
|
15 |
- Fixed problems with images on product listing/shopping cart.
|
16 |
- Fixed problems with correct displaying attributes on product detail page
|
17 |
-
- Fixed problems with description on product detail page
|
|
|
|
|
|
|
18 |
<authors><author><name>IceShop</name><user>IceShop</user><email>support@iceshop.nl</email></author></authors>
|
19 |
-
<date>
|
20 |
-
<time>
|
21 |
<contents><target name="magelocal"><dir name="Bintime"><dir name="Icecatimport"><dir name="Block"><file name="Attributes.php" hash="ae93e0a964e8880e5b65fb5d08f1edf9"/><file name="Media.php" hash="a71e447a139b851da50937bccaf8bd37"/><file name="Related.php" hash="7ca2ad6520f2644ad1302c02d1cd6853"/><file name="Upsell.php" hash="f7a79cee4cb7ecb679f65e7ec7a487c4"/></dir><dir name="controllers"><file name="ImageController.php" hash="cdf4984c268346088729831b7abdf026"/></dir><dir name="etc"><file name="config.xml" hash="13d5b3c94451f13119c90a8added2374"/><file name="system.xml" hash="42faa23748e785e3b99c17f15d32f67e"/></dir><dir name="Helper"><dir name="Catalog"><file name="Image.php" hash="4952fd82b7fb4cb68498ec7655a990ee"/></dir><file name="Getdata.php" hash="6e582c84a4f65071fbc6daf6b4e03de5"/><file name="Image.php" hash="62a1ab4c2b773f6aafc877a0f43689bd"/><file name="Output.php" hash="66a35fb37504ff30a2188b34941d991e"/></dir><dir name="Model"><dir name="Catalog"><file name="Category.php" hash="21abeb7a7c2c85db8ce4d2f4ed203f50"/><file name="Product.php" hash="e94919ad720fccd16c061e31ac26d05d"/><file name="Search.php" hash="99c7eb706e67e01ea8167ebe88fe72d9"/></dir><dir name="System"><dir name="Config"><file name="Attributes.php" hash="23284e0d38677b4544fc87642a6bc8b5"/><file name="LanguageList.xml" hash="391ef56fab212879709780df5a7710e7"/><file name="Locales.php" hash="b8c699fa2a6f657b6d52d86e656872cc"/><file name="Subscription.php" hash="62168986f7a4eb3f10d38ac627aa6510"/><file name="Descriptionpriority.php" hash="e32f7b5893ded762a45c742d4e6944fd"/></dir></dir><file name="Imagescollection.php" hash="718b575ef9472f85c323fa40f80bbd05"/><file name="Import.php" hash="8043d30eebe86ea03c917ef8f38e2a65"/><file name="Observer.php" hash="99795f94b4dd8c1f9dd1bb5df8ad0337"/><file name="Relatedcollection.php" hash="2ddf62c43a66c3fd70bf651d0078dbc1"/></dir><dir name="sql"><dir name="icecatimport_setup"><file name="mysql4-install-0.1.0.php" hash="08f5875b240c2f229b95194b6335f9a6"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="c0581c5b00420492714bd7e3cc66cb6d"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Bintime_Icecatimport.xml" hash="daf681aae3e710568d210313816a9d5f"/></dir></target></contents>
|
22 |
<compatible/>
|
23 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>IcecatLive</name>
|
4 |
+
<version>1.3.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v.3</license>
|
7 |
<channel>community</channel>
|
11 |
<notes> - Added mapping by EAN/UPC codes
|
12 |
- Added support of Multilanguage stores
|
13 |
- Added new setting Description
|
14 |
+
- Added loading products description from DB when icecat info is missing and config setting product descr source is set to icecat 
|
15 |
+
- Added saving icecat images to server and display from there 
|
16 |
+
- Added saving product title to db from file and display it on list page 
|
17 |
- Fixed problems with Icecat names
|
18 |
- Fixed problems with images on product listing/shopping cart.
|
19 |
- Fixed problems with correct displaying attributes on product detail page
|
20 |
+
- Fixed problems with description on product detail page 
|
21 |
+
- Fixed product info in breadcrumbs 
|
22 |
+
- Fixed problems with loading icecat data for each product on product listing page 
|
23 |
+
</notes>
|
24 |
<authors><author><name>IceShop</name><user>IceShop</user><email>support@iceshop.nl</email></author></authors>
|
25 |
+
<date>2013-07-01</date>
|
26 |
+
<time>10:45:01</time>
|
27 |
<contents><target name="magelocal"><dir name="Bintime"><dir name="Icecatimport"><dir name="Block"><file name="Attributes.php" hash="ae93e0a964e8880e5b65fb5d08f1edf9"/><file name="Media.php" hash="a71e447a139b851da50937bccaf8bd37"/><file name="Related.php" hash="7ca2ad6520f2644ad1302c02d1cd6853"/><file name="Upsell.php" hash="f7a79cee4cb7ecb679f65e7ec7a487c4"/></dir><dir name="controllers"><file name="ImageController.php" hash="cdf4984c268346088729831b7abdf026"/></dir><dir name="etc"><file name="config.xml" hash="13d5b3c94451f13119c90a8added2374"/><file name="system.xml" hash="42faa23748e785e3b99c17f15d32f67e"/></dir><dir name="Helper"><dir name="Catalog"><file name="Image.php" hash="4952fd82b7fb4cb68498ec7655a990ee"/></dir><file name="Getdata.php" hash="6e582c84a4f65071fbc6daf6b4e03de5"/><file name="Image.php" hash="62a1ab4c2b773f6aafc877a0f43689bd"/><file name="Output.php" hash="66a35fb37504ff30a2188b34941d991e"/></dir><dir name="Model"><dir name="Catalog"><file name="Category.php" hash="21abeb7a7c2c85db8ce4d2f4ed203f50"/><file name="Product.php" hash="e94919ad720fccd16c061e31ac26d05d"/><file name="Search.php" hash="99c7eb706e67e01ea8167ebe88fe72d9"/></dir><dir name="System"><dir name="Config"><file name="Attributes.php" hash="23284e0d38677b4544fc87642a6bc8b5"/><file name="LanguageList.xml" hash="391ef56fab212879709780df5a7710e7"/><file name="Locales.php" hash="b8c699fa2a6f657b6d52d86e656872cc"/><file name="Subscription.php" hash="62168986f7a4eb3f10d38ac627aa6510"/><file name="Descriptionpriority.php" hash="e32f7b5893ded762a45c742d4e6944fd"/></dir></dir><file name="Imagescollection.php" hash="718b575ef9472f85c323fa40f80bbd05"/><file name="Import.php" hash="8043d30eebe86ea03c917ef8f38e2a65"/><file name="Observer.php" hash="99795f94b4dd8c1f9dd1bb5df8ad0337"/><file name="Relatedcollection.php" hash="2ddf62c43a66c3fd70bf651d0078dbc1"/></dir><dir name="sql"><dir name="icecatimport_setup"><file name="mysql4-install-0.1.0.php" hash="08f5875b240c2f229b95194b6335f9a6"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="c0581c5b00420492714bd7e3cc66cb6d"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Bintime_Icecatimport.xml" hash="daf681aae3e710568d210313816a9d5f"/></dir></target></contents>
|
28 |
<compatible/>
|
29 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|