Version Notes
This release adds new SOAP methods allowing integration between Koongo service and Magento application.
Download this release
Release Info
Developer | GetReady Team |
Extension | getready_kaas |
Version | 1.0.1 |
Comparing to | |
See all releases |
Code changes from version 1.0.0 to 1.0.1
- app/code/community/Getready/Kaas/Helper/Category/Cache/Data.php +13 -7
- app/code/community/Getready/Kaas/Helper/Category/Data.php +145 -130
- app/code/community/Getready/Kaas/Helper/Data.php +6 -1
- app/code/community/Getready/Kaas/Helper/Product/Category/Data.php +164 -136
- app/code/community/Getready/Kaas/Helper/Product/Data.php +417 -401
- app/code/community/Getready/Kaas/Model/Category/Api.php +42 -32
- app/code/community/Getready/Kaas/Model/Product/Api.php +13 -8
- app/code/community/Getready/Kaas/etc/config.xml +1 -1
- package.xml +4 -4
app/code/community/Getready/Kaas/Helper/Category/Cache/Data.php
CHANGED
@@ -27,23 +27,29 @@ class Getready_Kaas_Helper_Category_Cache_Data extends Mage_Core_Helper_Abstract
|
|
27 |
{
|
28 |
protected $_categories = array();
|
29 |
|
30 |
-
public function loadCategory($category_id)
|
31 |
{
|
32 |
-
$category = Mage::getModel('catalog/category')
|
|
|
|
|
|
|
|
|
|
|
33 |
return $category;
|
34 |
}
|
35 |
|
36 |
-
public function getCategory($category_id)
|
37 |
{
|
38 |
$category = null;
|
39 |
-
|
|
|
40 |
{
|
41 |
-
$category = $this->_categories[$
|
42 |
}
|
43 |
else
|
44 |
{
|
45 |
-
$category = $this->loadCategory($category_id);
|
46 |
-
$this->_categories[$
|
47 |
}
|
48 |
return $category;
|
49 |
}
|
27 |
{
|
28 |
protected $_categories = array();
|
29 |
|
30 |
+
public function loadCategory($category_id,$store_id = 0)
|
31 |
{
|
32 |
+
$category = Mage::getModel('catalog/category');
|
33 |
+
if($store_id)
|
34 |
+
{
|
35 |
+
$category->setStoreId($store_id);
|
36 |
+
}
|
37 |
+
$category->load($category_id);
|
38 |
return $category;
|
39 |
}
|
40 |
|
41 |
+
public function getCategory($category_id,$store_id = 0)
|
42 |
{
|
43 |
$category = null;
|
44 |
+
$category_key = $category_id . '_' . $store_id;
|
45 |
+
if(isset($this->_categories[$category_key]))
|
46 |
{
|
47 |
+
$category = $this->_categories[$category_key];
|
48 |
}
|
49 |
else
|
50 |
{
|
51 |
+
$category = $this->loadCategory($category_id,$store_id );
|
52 |
+
$this->_categories[$category_key] = $category;
|
53 |
}
|
54 |
return $category;
|
55 |
}
|
app/code/community/Getready/Kaas/Helper/Category/Data.php
CHANGED
@@ -25,138 +25,153 @@
|
|
25 |
*/
|
26 |
class Getready_Kaas_Helper_Category_Data extends Mage_Core_Helper_Abstract
|
27 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
'path' => '',
|
35 |
-
'path_ids' => '',
|
36 |
-
'path_url_key' => '',
|
37 |
-
'level' => '',
|
38 |
-
'parent_id' => '',
|
39 |
-
'parent_name' => '',
|
40 |
-
'root_id' => '',
|
41 |
-
'root_name' => '',
|
42 |
-
'description' => '',
|
43 |
-
'name' => '',
|
44 |
-
);
|
45 |
-
|
46 |
-
|
47 |
-
//general
|
48 |
-
$category_info['category_id'] = $category->getId();
|
49 |
-
|
50 |
-
//kaas
|
51 |
-
$category_info['url'] = $category->getUrl();
|
52 |
-
|
53 |
-
$category_path_ids = $this->formatPathIdsForRootCategory($category->getPath(),$root_level);
|
54 |
-
|
55 |
-
$category_info['path'] = $this->getCategoryPath($category_path_ids);
|
56 |
-
$category_info['path_ids'] = $category_path_ids;
|
57 |
-
$category_info['path_url_key'] = $this->getCategoryUrlKey($category_path_ids);
|
58 |
-
|
59 |
-
$level = $this->formatLevelForRootCategory($category->getLevel(),$root_level);
|
60 |
-
$category_info['level'] = $level;
|
61 |
-
if($level == $root_level)
|
62 |
-
{
|
63 |
-
$category_info['parent_id'] = null;
|
64 |
-
$category_info['parent_name'] = null;
|
65 |
-
$category_info['root_id'] = $category->getId();
|
66 |
-
$category_info['root_name'] = $category->getName();
|
67 |
-
}
|
68 |
-
else
|
69 |
-
{
|
70 |
-
|
71 |
-
$parent_id = $category->getParentId();
|
72 |
-
$category_info['parent_id'] = $parent_id;
|
73 |
-
$category_info['parent_name'] = $this->getCategoryName($parent_id);
|
74 |
-
$root_id = $this->getRootId($category_path_ids);
|
75 |
-
$category_info['root_id'] = $root_id;
|
76 |
-
$category_info['root_name'] = $this->getCategoryName($root_id);
|
77 |
-
}
|
78 |
-
|
79 |
-
$category_info['description'] = $category->getDescription();
|
80 |
-
$category_info['name'] = $category->getName();
|
81 |
-
|
82 |
-
return $category_info;
|
83 |
-
}
|
84 |
-
|
85 |
-
public function getCategory($category_id)
|
86 |
-
{
|
87 |
-
return Mage::Helper('kaas_category_cache')->getCategory($category_id);
|
88 |
-
}
|
89 |
-
|
90 |
-
public function formatPathIdsForRootCategory($category_path_ids, $root_level)
|
91 |
-
{
|
92 |
-
$formated_path_ids = $category_path_ids;
|
93 |
-
$path_ids_array = explode('/', $category_path_ids);
|
94 |
-
if(!empty($path_ids_array))
|
95 |
-
{
|
96 |
-
for($i=0;$i < $root_level;$i++)
|
97 |
-
{
|
98 |
-
unset($path_ids_array[$i]);
|
99 |
-
}
|
100 |
-
$formated_path_ids = implode('/', $path_ids_array);
|
101 |
-
}
|
102 |
-
return $formated_path_ids;
|
103 |
-
}
|
104 |
-
|
105 |
-
public function formatLevelForRootCategory($level, $root_level)
|
106 |
-
{
|
107 |
-
$formated_level = $level;
|
108 |
-
if($root_level > 1)
|
109 |
-
{
|
110 |
-
$formated_level = $level - $root_level + 1;
|
111 |
-
}
|
112 |
-
return $formated_level;
|
113 |
-
}
|
114 |
-
|
115 |
-
public function getCategoryPath($category_path_ids)
|
116 |
-
{
|
117 |
-
$category_path_array = array();
|
118 |
-
$path_ids_array = explode('/', $category_path_ids);
|
119 |
-
foreach($path_ids_array as $_category_id)
|
120 |
-
{
|
121 |
-
$category = $this->getCategory($_category_id);
|
122 |
-
$category_path_array[] = $category->getName();
|
123 |
-
}
|
124 |
-
$category_path = implode('/', $category_path_array);
|
125 |
-
return $category_path;
|
126 |
-
}
|
127 |
-
|
128 |
-
public function getCategoryUrlKey($category_path_ids)
|
129 |
-
{
|
130 |
-
$category_url_key_array = array();
|
131 |
-
$path_ids_array = explode('/', $category_path_ids);
|
132 |
-
foreach($path_ids_array as $_category_id)
|
133 |
-
{
|
134 |
-
$category = $this->getCategory($_category_id);
|
135 |
-
$category_url_key_array[] = $category->getUrlKey();
|
136 |
-
}
|
137 |
-
$category_url_key = implode('/', $category_url_key_array);
|
138 |
-
return $category_url_key;
|
139 |
-
}
|
140 |
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
|
|
|
|
|
|
|
|
151 |
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
|
162 |
}
|
25 |
*/
|
26 |
class Getready_Kaas_Helper_Category_Data extends Mage_Core_Helper_Abstract
|
27 |
{
|
28 |
+
protected $_store_id = 0;
|
29 |
+
|
30 |
+
public function setStoreId($store_id)
|
31 |
+
{
|
32 |
+
$this->_store_id = $store_id;
|
33 |
+
return $this;
|
34 |
+
}
|
35 |
+
|
36 |
+
public function getStoreId()
|
37 |
+
{
|
38 |
+
return $this->_store_id;
|
39 |
+
}
|
40 |
+
|
41 |
+
public function getCategoryInfo($category,$root_level = 0)
|
42 |
+
{
|
43 |
+
$category_info = array(
|
44 |
+
'category_id' => '',
|
45 |
+
'url' => '',
|
46 |
+
'path' => '',
|
47 |
+
'path_ids' => '',
|
48 |
+
'path_url_key' => '',
|
49 |
+
'level' => '',
|
50 |
+
'parent_id' => '',
|
51 |
+
'parent_name' => '',
|
52 |
+
'root_id' => '',
|
53 |
+
'root_name' => '',
|
54 |
+
'description' => '',
|
55 |
+
'name' => '',
|
56 |
+
);
|
57 |
+
|
58 |
+
|
59 |
+
//general
|
60 |
+
$category_info['category_id'] = $category->getId();
|
61 |
+
|
62 |
+
//kaas
|
63 |
+
$base_url = Mage::app()->getStore($this->getStoreId())->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
|
64 |
+
$url_path = $category->getUrlPath();
|
65 |
+
$category_info['url'] = $base_url . $url_path; //$category->getUrl();
|
66 |
+
|
67 |
+
$category_path_ids = $this->formatPathIdsForRootCategory($category->getPath(),$root_level);
|
68 |
+
|
69 |
+
$category_info['path'] = $this->getCategoryPath($category_path_ids);
|
70 |
+
$category_info['path_ids'] = $category_path_ids;
|
71 |
+
$category_info['path_url_key'] = $this->getCategoryUrlKey($category_path_ids);
|
72 |
+
|
73 |
+
$original_level = $category->getLevel();
|
74 |
+
$level = $this->formatLevelForRootCategory($original_level ,$root_level);
|
75 |
+
$category_info['level'] = $level;
|
76 |
+
if($original_level == $root_level)
|
77 |
+
{
|
78 |
+
$category_info['parent_id'] = null;
|
79 |
+
$category_info['parent_name'] = null;
|
80 |
+
$category_info['root_id'] = $category->getId();
|
81 |
+
$category_info['root_name'] = $category->getName();
|
82 |
+
}
|
83 |
+
else
|
84 |
+
{
|
85 |
+
$parent_id = $category->getParentId();
|
86 |
+
$category_info['parent_id'] = $parent_id;
|
87 |
+
$category_info['parent_name'] = $this->getCategoryName($parent_id);
|
88 |
+
$root_id = $this->getRootId($category_path_ids);
|
89 |
+
$category_info['root_id'] = $root_id;
|
90 |
+
$category_info['root_name'] = $this->getCategoryName($root_id);
|
91 |
+
}
|
92 |
+
|
93 |
+
$category_info['description'] = $category->getDescription();
|
94 |
+
$category_info['name'] = $category->getName();
|
95 |
+
|
96 |
+
return $category_info;
|
97 |
+
}
|
98 |
|
99 |
+
public function getCategory($category_id)
|
100 |
+
{
|
101 |
+
$store_id = $this->getStoreId();
|
102 |
+
return Mage::Helper('kaas_category_cache')->getCategory($category_id,$store_id);
|
103 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
|
105 |
+
public function formatPathIdsForRootCategory($category_path_ids, $root_level)
|
106 |
+
{
|
107 |
+
$formated_path_ids = $category_path_ids;
|
108 |
+
$path_ids_array = explode('/', $category_path_ids);
|
109 |
+
if(!empty($path_ids_array))
|
110 |
+
{
|
111 |
+
for($i=0;$i < $root_level;$i++)
|
112 |
+
{
|
113 |
+
unset($path_ids_array[$i]);
|
114 |
+
}
|
115 |
+
$formated_path_ids = implode('/', $path_ids_array);
|
116 |
+
}
|
117 |
+
return $formated_path_ids;
|
118 |
+
}
|
119 |
|
120 |
+
public function formatLevelForRootCategory($level, $root_level)
|
121 |
+
{
|
122 |
+
$formated_level = $level;
|
123 |
+
if($root_level > 1)
|
124 |
+
{
|
125 |
+
$formated_level = $level - $root_level + 1;
|
126 |
+
}
|
127 |
+
return $formated_level;
|
128 |
+
}
|
129 |
+
|
130 |
+
public function getCategoryPath($category_path_ids)
|
131 |
+
{
|
132 |
+
$category_path_array = array();
|
133 |
+
$path_ids_array = explode('/', $category_path_ids);
|
134 |
+
foreach($path_ids_array as $_category_id)
|
135 |
+
{
|
136 |
+
$category = $this->getCategory($_category_id);
|
137 |
+
$category_path_array[] = $category->getName();
|
138 |
+
}
|
139 |
+
$category_path = implode('/', $category_path_array);
|
140 |
+
return $category_path;
|
141 |
+
}
|
142 |
+
|
143 |
+
public function getCategoryUrlKey($category_path_ids)
|
144 |
+
{
|
145 |
+
$category_url_key_array = array();
|
146 |
+
$path_ids_array = explode('/', $category_path_ids);
|
147 |
+
foreach($path_ids_array as $_category_id)
|
148 |
+
{
|
149 |
+
$category = $this->getCategory($_category_id);
|
150 |
+
$category_url_key_array[] = $category->getUrlKey();
|
151 |
+
}
|
152 |
+
$category_url_key = implode('/', $category_url_key_array);
|
153 |
+
return $category_url_key;
|
154 |
+
}
|
155 |
+
|
156 |
+
public function getCategoryName($parent_id)
|
157 |
+
{
|
158 |
+
$parent_name = '';
|
159 |
+
$category = $this->getCategory($parent_id);
|
160 |
+
if($category->getId())
|
161 |
+
{
|
162 |
+
$parent_name = $category->getName();
|
163 |
+
}
|
164 |
+
return $parent_name;
|
165 |
+
}
|
166 |
+
|
167 |
+
public function getRootId($category_path_ids)
|
168 |
+
{
|
169 |
+
$path_ids_array = explode('/', $category_path_ids);
|
170 |
+
if(!empty($path_ids_array))
|
171 |
+
{
|
172 |
+
$root_id = $path_ids_array[0];
|
173 |
+
}
|
174 |
+
return $root_id;
|
175 |
+
}
|
176 |
|
177 |
}
|
app/code/community/Getready/Kaas/Helper/Data.php
CHANGED
@@ -25,5 +25,10 @@
|
|
25 |
*/
|
26 |
class Getready_Kaas_Helper_Data extends Mage_Core_Helper_Abstract
|
27 |
{
|
28 |
-
|
|
|
|
|
|
|
|
|
|
|
29 |
}
|
25 |
*/
|
26 |
class Getready_Kaas_Helper_Data extends Mage_Core_Helper_Abstract
|
27 |
{
|
28 |
+
const DEFAULT_ROOT_LEVEL = 2;
|
29 |
+
|
30 |
+
public function getDefaultRootLevel()
|
31 |
+
{
|
32 |
+
return self::DEFAULT_ROOT_LEVEL;
|
33 |
+
}
|
34 |
}
|
app/code/community/Getready/Kaas/Helper/Product/Category/Data.php
CHANGED
@@ -27,162 +27,190 @@ class Getready_Kaas_Helper_Product_Category_Data extends Mage_Core_Helper_Abstra
|
|
27 |
{
|
28 |
protected $_categories = array();
|
29 |
protected $_generated_categories = array();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
public function getCategoryInfo($category_id)
|
32 |
{
|
33 |
$category_info = array();
|
34 |
-
|
|
|
|
|
35 |
{
|
36 |
-
$category_info = $this->_generated_categories[$
|
37 |
}
|
38 |
else
|
39 |
{
|
40 |
$category_info = $this->_generateCategoryInfo($category_id);
|
41 |
-
$this->_generated_categories[$
|
42 |
}
|
43 |
return $category_info;
|
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 |
-
|
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 |
}
|
27 |
{
|
28 |
protected $_categories = array();
|
29 |
protected $_generated_categories = array();
|
30 |
+
|
31 |
+
protected $_store_id = 0;
|
32 |
+
|
33 |
+
public function setStoreId($store_id)
|
34 |
+
{
|
35 |
+
$this->_store_id = $store_id;
|
36 |
+
return $this;
|
37 |
+
}
|
38 |
+
|
39 |
+
public function getStoreId()
|
40 |
+
{
|
41 |
+
return $this->_store_id;
|
42 |
+
}
|
43 |
|
44 |
public function getCategoryInfo($category_id)
|
45 |
{
|
46 |
$category_info = array();
|
47 |
+
$store_id = $this->getStoreId();
|
48 |
+
$category_key = $category_id . '_' . $store_id;
|
49 |
+
if(isset($this->_generated_categories[$category_key]))
|
50 |
{
|
51 |
+
$category_info = $this->_generated_categories[$category_key];
|
52 |
}
|
53 |
else
|
54 |
{
|
55 |
$category_info = $this->_generateCategoryInfo($category_id);
|
56 |
+
$this->_generated_categories[$category_key] = $category_info;
|
57 |
}
|
58 |
return $category_info;
|
59 |
}
|
60 |
|
61 |
+
public function _generateCategoryInfo($category_id)
|
62 |
+
{
|
63 |
+
$root_level = Mage::Helper('kaas')->getDefaultRootLevel(); // 1;
|
64 |
+
$category_info = null;
|
65 |
+
|
66 |
+
$category = $this->_getCategory($category_id);
|
67 |
+
if($category->getId() && $category->getIsActive())
|
68 |
+
{
|
69 |
+
$category_info = array(
|
70 |
+
'id' => '',
|
71 |
+
'name' => '',
|
72 |
+
'path_ids' => '',
|
73 |
+
'level' => '',
|
74 |
+
'parent_id' => '',
|
75 |
+
'parent_name' => '',
|
76 |
+
'url' => '',
|
77 |
+
'path_url_key' => '',
|
78 |
+
'path' => '',
|
79 |
+
'root_id' => '',
|
80 |
+
'root_name' => '',
|
81 |
+
);
|
82 |
+
|
83 |
+
$category_info['id'] = $category->getId();
|
84 |
+
$category_info['name'] = $category->getName();
|
85 |
+
|
86 |
+
$base_url = Mage::app()->getStore($this->getStoreId())->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
|
87 |
+
$url_path = $category->getUrlPath();
|
88 |
+
$category_info['url'] = $base_url . $url_path; //$category->getUrl();
|
89 |
+
|
90 |
+
$category_path_ids = $this->_formatPathIdsForRootCategory($category->getPath(),$root_level);
|
91 |
+
|
92 |
+
$category_info['path_ids'] = $category_path_ids;
|
93 |
+
$category_info['path_url_key'] = $this->_getCategoryUrlKey($category_path_ids);
|
94 |
+
$category_info['path'] = $this->_getCategoryPath($category_path_ids);
|
95 |
+
|
96 |
+
$original_level = $category->getLevel();
|
97 |
+
$level = $this->_formatLevelForRootCategory($category->getLevel(),$root_level);
|
98 |
+
$category_info['level'] = $level;
|
99 |
+
|
100 |
+
if($original_level == $root_level)
|
101 |
+
{
|
102 |
+
$category_info['parent_id'] = null;
|
103 |
+
$category_info['parent_name'] = null;
|
104 |
|
105 |
+
$category_info['root_id'] = $category->getId();
|
106 |
+
$category_info['root_name'] = $category->getName();
|
107 |
+
}
|
108 |
+
else
|
109 |
+
{
|
110 |
+
$parent_id = $category->getParentId();
|
111 |
+
$category_info['parent_id'] = $parent_id;
|
112 |
+
$category_info['parent_name'] = $this->_getParentCategoryName($parent_id);
|
113 |
|
114 |
+
$root_id = $this->_getRootId($category_path_ids);
|
115 |
+
$category_info['root_id'] = $root_id;
|
116 |
+
$category_info['root_name'] = $this->_getParentCategoryName($root_id);
|
117 |
+
}
|
118 |
+
}
|
119 |
+
|
120 |
+
return $category_info;
|
121 |
+
}
|
122 |
|
123 |
+
public function _getCategory($category_id)
|
124 |
+
{
|
125 |
+
$category = null;
|
126 |
+
$store_id = $this->getStoreId();
|
127 |
+
$category_key = $category_id . '_' . $store_id;
|
128 |
+
if(isset($this->_categories[$category_key]))
|
129 |
+
{
|
130 |
+
$category = $this->_categories[$category_key];
|
131 |
+
}
|
132 |
+
else
|
133 |
+
{
|
134 |
+
$category = Mage::getModel('catalog/category');
|
135 |
+
if($store_id)
|
136 |
+
{
|
137 |
+
$category->setStoreId($store_id);
|
138 |
+
}
|
139 |
+
$category->load($category_id);
|
140 |
+
$this->_categories[$category_key] = $category;
|
141 |
+
}
|
142 |
+
return $category;
|
143 |
+
}
|
144 |
|
145 |
+
public function _formatPathIdsForRootCategory($category_path_ids, $root_level)
|
146 |
+
{
|
147 |
+
$formated_path_ids = $category_path_ids;
|
148 |
+
$path_ids_array = explode('/', $category_path_ids);
|
149 |
+
if(!empty($path_ids_array))
|
150 |
+
{
|
151 |
+
for($i=0;$i < $root_level;$i++)
|
152 |
+
{
|
153 |
+
unset($path_ids_array[$i]);
|
154 |
+
}
|
155 |
+
$formated_path_ids = implode('/', $path_ids_array);
|
156 |
+
}
|
157 |
+
return $formated_path_ids;
|
158 |
+
}
|
159 |
|
160 |
+
public function _formatLevelForRootCategory($level, $root_level)
|
161 |
+
{
|
162 |
+
$formated_level = $level;
|
163 |
+
if($root_level > 1)
|
164 |
+
{
|
165 |
+
$formated_level = $level - $root_level + 1;
|
166 |
+
}
|
167 |
+
return $formated_level;
|
168 |
+
}
|
169 |
|
170 |
+
public function _getCategoryPath($category_path_ids)
|
171 |
+
{
|
172 |
+
$category_path_array = array();
|
173 |
+
$path_ids_array = explode('/', $category_path_ids);
|
174 |
+
foreach($path_ids_array as $_category_id)
|
175 |
+
{
|
176 |
+
$category = $this->_getCategory($_category_id);
|
177 |
+
$category_path_array[] = $category->getName();
|
178 |
+
}
|
179 |
+
$category_path = implode('/', $category_path_array);
|
180 |
+
return $category_path;
|
181 |
+
}
|
182 |
|
183 |
+
public function _getCategoryUrlKey($category_path_ids)
|
184 |
+
{
|
185 |
+
$category_url_key_array = array();
|
186 |
+
$path_ids_array = explode('/', $category_path_ids);
|
187 |
+
foreach($path_ids_array as $_category_id)
|
188 |
+
{
|
189 |
+
$category = $this->_getCategory($_category_id);
|
190 |
+
$category_url_key_array[] = $category->getUrlKey();
|
191 |
+
}
|
192 |
+
$category_url_key = implode('/', $category_url_key_array);
|
193 |
+
return $category_url_key;
|
194 |
+
}
|
195 |
|
196 |
+
public function _getParentCategoryName($parent_id)
|
197 |
+
{
|
198 |
+
$parent_name = '';
|
199 |
+
$category = $this->_getCategory($parent_id);
|
200 |
+
if($category->getId())
|
201 |
+
{
|
202 |
+
$parent_name = $category->getName();
|
203 |
+
}
|
204 |
+
return $parent_name;
|
205 |
+
}
|
206 |
|
207 |
+
public function _getRootId($category_path_ids)
|
208 |
+
{
|
209 |
+
$path_ids_array = explode('/', $category_path_ids);
|
210 |
+
if(!empty($path_ids_array))
|
211 |
+
{
|
212 |
+
$root_id = $path_ids_array[0];
|
213 |
+
}
|
214 |
+
return $root_id;
|
215 |
+
}
|
216 |
}
|
app/code/community/Getready/Kaas/Helper/Product/Data.php
CHANGED
@@ -25,417 +25,433 @@
|
|
25 |
*/
|
26 |
class Getready_Kaas_Helper_Product_Data extends Mage_Core_Helper_Abstract
|
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 |
-
|
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 |
-
|
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 |
-
|
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 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
|
|
|
|
|
|
|
|
440 |
|
441 |
}
|
25 |
*/
|
26 |
class Getready_Kaas_Helper_Product_Data extends Mage_Core_Helper_Abstract
|
27 |
{
|
28 |
+
protected $_store_id = 0;
|
29 |
+
|
30 |
+
public function setStoreId($store_id)
|
31 |
+
{
|
32 |
+
$this->_store_id = $store_id;
|
33 |
+
return $this;
|
34 |
+
}
|
35 |
+
|
36 |
+
public function getStoreId()
|
37 |
+
{
|
38 |
+
return $this->_store_id;
|
39 |
+
}
|
40 |
+
|
41 |
+
public function getProductInfo($product)
|
42 |
+
{
|
43 |
+
$product_info = array(
|
44 |
+
//header
|
45 |
+
'product_id' => '',
|
46 |
+
'group_id' => '',
|
47 |
+
'url' => '',
|
48 |
+
'created_at' => array('sec' => '', 'usec' => ''),
|
49 |
+
'creation_datetime' => '',
|
50 |
+
'creation_date' => '',
|
51 |
+
'creation_time' => '',
|
52 |
+
'updated_at' => array('sec' => '', 'usec' => ''),
|
53 |
+
'updated_datetime' => '',
|
54 |
+
'updated_date' => '',
|
55 |
+
'updated_time' => '',
|
56 |
+
'is_visible' => '',
|
57 |
+
'is_parent' => '',
|
58 |
+
'is_child' => '',
|
59 |
+
//flat
|
60 |
+
'flat' => array(),
|
61 |
+
//price
|
62 |
+
'price_original_include_tax' => '',
|
63 |
+
'price_original_exclude_tax' => '',
|
64 |
+
'price_final_include_tax' => '',
|
65 |
+
'price_final_exclude_tax' => '',
|
66 |
+
'price_cost' => '',
|
67 |
+
'tax_percent' => '',
|
68 |
+
'discount' => '',
|
69 |
+
//invertory
|
70 |
+
'qty' => 0,
|
71 |
+
'stock_status' => false,
|
72 |
+
//media
|
73 |
+
'gallery' => array(),
|
74 |
+
//category
|
75 |
+
'category' => array(),
|
76 |
+
'children' => array(),
|
77 |
+
);
|
78 |
+
|
79 |
+
//header
|
80 |
+
$product_info['product_id'] = $product->getId();
|
81 |
+
/* TODO */$product_info['group_id'] = $this->_getGroupId($product);
|
82 |
+
$product_info['url'] = $product->getProductUrl();
|
83 |
+
$created_at = $product->getCreatedAt();
|
84 |
+
|
85 |
+
$product_info['created_at'] = array(
|
86 |
+
'sec' => strtotime($created_at),
|
87 |
+
'usec' => 0
|
88 |
+
);
|
89 |
+
$product_info['creation_datetime'] = date('Y-m-d H:i:s', strtotime($created_at));
|
90 |
+
$product_info['creation_date'] = date('Y-m-d', strtotime($created_at));
|
91 |
+
$product_info['creation_time'] = date('H:i:s', strtotime($created_at));
|
92 |
+
|
93 |
+
$updated_at = $product->getUpdatedAt();
|
94 |
+
$product_info['updated_at'] = array(
|
95 |
+
'sec' => strtotime($updated_at),
|
96 |
+
'usec' => 0
|
97 |
+
);
|
98 |
+
$product_info['updated_datetime'] = date('Y-m-d H:i:s', strtotime($updated_at));
|
99 |
+
$product_info['updated_date'] = date('Y-m-d', strtotime($updated_at));
|
100 |
+
$product_info['updated_time'] = date('H:i:s', strtotime($updated_at));
|
101 |
+
|
102 |
+
$visibility = false;
|
103 |
+
if($product->getVisibility() == '2' || $product->getVisibility() == '4')
|
104 |
+
{
|
105 |
+
$visibility = true;
|
106 |
+
}
|
107 |
+
$product_info['is_visible'] = $visibility;
|
108 |
+
$product_info['is_parent'] = $this->_isParent($product);
|
109 |
+
$product_info['is_child'] = $this->_isChild($product);
|
110 |
+
|
111 |
+
//flat
|
112 |
+
$flat_attributes = $this->_getFlatAttributes($product);
|
113 |
+
$product_info['flat'] = $flat_attributes;
|
114 |
+
|
115 |
+
//price
|
116 |
+
$prices = $this->_getPrices($product);
|
117 |
+
|
118 |
+
$product_info['price_original_include_tax'] = $prices['price_original_include_tax'];
|
119 |
+
$product_info['price_original_exclude_tax'] = $prices['price_original_exclude_tax'];
|
120 |
+
$product_info['price_final_include_tax'] = $prices['price_final_include_tax'];
|
121 |
+
$product_info['price_final_exclude_tax'] = $prices['price_final_exclude_tax'];
|
122 |
+
$product_info['price_cost'] = $prices['price_cost'];
|
123 |
+
$product_info['tax_percent'] = $prices['tax_percent'];
|
124 |
+
$product_info['discount'] = $prices['discount'];
|
125 |
+
|
126 |
+
//inventory
|
127 |
+
$stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product);
|
128 |
+
$product_info['qty'] = (int)number_format($stock->getQty(),0);
|
129 |
+
$product_info['stock_status'] = (boolean)$stock->getIsInStock();
|
130 |
+
|
131 |
+
//media
|
132 |
+
$product_info['gallery'] = $this->_getGallery($product);
|
133 |
+
|
134 |
+
//category
|
135 |
+
$product_info['category'] = $this->_getCategory($product);
|
136 |
+
|
137 |
+
//children
|
138 |
+
$product_info['children'] = $this->_getChildren($product);
|
139 |
+
|
140 |
+
return $product_info;
|
141 |
+
}
|
142 |
|
143 |
+
public function _getGroupId($product)
|
144 |
+
{
|
145 |
+
$group_id = 0; //$product->getId();
|
146 |
+
return $group_id;
|
147 |
+
}
|
|
|
148 |
|
149 |
+
public function _isParent($product)
|
150 |
+
{
|
151 |
+
$is_parent = false;
|
152 |
+
$product_id = $product->getId();
|
153 |
+
|
154 |
+
if($product->getTypeId() != 'simple' )
|
155 |
+
{
|
156 |
+
$child_ids = Mage::getModel('catalog/product_type_configurable')->getChildrenIds($product_id);
|
157 |
+
if(!$child_ids)
|
158 |
+
{
|
159 |
+
$child_ids = Mage::getModel('catalog/product_type_grouped')->getChildrenIds($product_id);
|
160 |
+
}
|
161 |
+
|
162 |
+
// if(!$child_ids)
|
163 |
+
// {
|
164 |
+
// $child_ids = Mage::getModel('bundle/product_type')->getChildrenIds($product_id);
|
165 |
+
// }
|
166 |
+
|
167 |
+
if($child_ids)
|
168 |
+
{
|
169 |
+
$is_parent = true;
|
170 |
+
}
|
171 |
+
}
|
172 |
+
|
173 |
+
return $is_parent;
|
174 |
+
}
|
175 |
|
176 |
+
public function _isChild($product)
|
177 |
+
{
|
178 |
+
$is_child = false;
|
179 |
+
$product_id = $product->getId();
|
180 |
+
|
181 |
+
if($product->getTypeId() == 'simple' )
|
182 |
+
{
|
183 |
+
$parent_ids = Mage::getModel('catalog/product_type_grouped')->getParentIdsByChild($product_id);
|
184 |
+
if(!$parent_ids)
|
185 |
+
{
|
186 |
+
$parent_ids = Mage::getModel('catalog/product_type_configurable')->getParentIdsByChild($product_id);
|
187 |
+
}
|
188 |
+
|
189 |
+
// if(!$parent_ids)
|
190 |
+
// {
|
191 |
+
// $parent_ids = $parent_ids = Mage::getModel('bundle/product_type')->getParentIdsByChild($product_id);
|
192 |
+
// }
|
193 |
+
|
194 |
+
if($parent_ids)
|
195 |
+
{
|
196 |
+
$is_child = true;
|
197 |
+
}
|
198 |
+
}
|
199 |
+
|
200 |
+
return $is_child;
|
201 |
+
}
|
202 |
|
203 |
+
public function _getChildren($product)
|
204 |
+
{
|
205 |
+
$children = array();
|
206 |
+
$product_id = $product->getId();
|
207 |
+
|
208 |
+
if($product->getTypeId() != 'simple' )
|
209 |
+
{
|
210 |
+
$conf_child_ids = Mage::getModel('catalog/product_type_configurable')->getChildrenIds($product_id);
|
211 |
+
if(isset($conf_child_ids[0]))
|
212 |
+
{
|
213 |
+
$child_ids = $conf_child_ids[0];
|
214 |
+
foreach($child_ids as $child_id)
|
215 |
+
{
|
216 |
+
$children[] = $child_id;
|
217 |
+
}
|
218 |
+
}
|
219 |
+
|
220 |
+
$group_child_ids = Mage::getModel('catalog/product_type_grouped')->getChildrenIds($product_id);
|
221 |
+
if(isset($group_child_ids[Mage_Catalog_Model_Product_Link::LINK_TYPE_GROUPED]))
|
222 |
+
{
|
223 |
+
$child_ids = $group_child_ids[Mage_Catalog_Model_Product_Link::LINK_TYPE_GROUPED];
|
224 |
+
foreach($child_ids as $child_id)
|
225 |
+
{
|
226 |
+
$children[] = $child_id;
|
227 |
+
}
|
228 |
+
}
|
229 |
+
|
230 |
+
// $bundle_child_ids = Mage::getModel('bundle/product_type')->getChildrenIds($product_id);
|
231 |
+
// foreach($bundle_child_ids as $child_id)
|
232 |
+
// {
|
233 |
+
// $children[] = $child_id;
|
234 |
+
// }
|
235 |
+
}
|
236 |
+
|
237 |
+
return $children;
|
238 |
+
}
|
239 |
|
240 |
+
public function _getFlatAttributes($product)
|
241 |
+
{
|
242 |
+
$flat_attributes = array();
|
243 |
+
$attributes = $product->getAttributes();
|
244 |
+
$not_exported_attributes_codes = array(
|
245 |
+
'type_id',
|
246 |
+
'entity_id',
|
247 |
+
'attribute_set_id',
|
248 |
+
'entity_type_id',
|
249 |
+
'old_id',
|
250 |
+
'url_path',
|
251 |
+
'category_ids',
|
252 |
+
'required_options',
|
253 |
+
'has_options',
|
254 |
+
'created_at',
|
255 |
+
'updated_at',
|
256 |
+
'media_gallery',
|
257 |
+
'gallery',
|
258 |
+
'custom_design',
|
259 |
+
'custom_design_from',
|
260 |
+
'custom_design_to',
|
261 |
+
'custom_layout_update',
|
262 |
+
'page_layout',
|
263 |
+
'options_container',
|
264 |
+
'thumbnail_label',
|
265 |
+
'image_label',
|
266 |
+
'small_image_label'
|
267 |
+
);
|
268 |
+
foreach ($attributes as $attribute)
|
269 |
+
{
|
270 |
+
$attributeCode = $attribute->getAttributeCode();
|
271 |
+
if (!in_array($attributeCode, $not_exported_attributes_codes))
|
272 |
+
{
|
273 |
+
$label = $attribute->getStoreLabel($product->getStoreId());
|
274 |
+
$value = $attribute->getFrontend()->getValue($product);
|
275 |
+
|
276 |
+
$flat_attribute = array(
|
277 |
+
'code' => $attributeCode,
|
278 |
+
'label' => $label,
|
279 |
+
'value' => $this->_getProductAttributeValue($product,$attribute)
|
280 |
+
);
|
281 |
+
|
282 |
+
$flat_attributes[] = $flat_attribute;
|
283 |
+
}
|
284 |
+
}
|
285 |
+
|
286 |
+
return $flat_attributes;
|
287 |
+
}
|
288 |
|
289 |
+
public function _getProductAttributeValue($product,$attribute)
|
290 |
+
{
|
291 |
+
$formated_value = $attribute->getFrontend()->getValue($product);
|
292 |
+
|
293 |
+
$attributeCode = $attribute->getAttributeCode();
|
294 |
+
if($attributeCode == 'image')
|
295 |
+
{
|
296 |
+
$base_image = $product->getImage();
|
297 |
+
if($base_image)
|
298 |
+
{
|
299 |
+
$formated_value = Mage::getModel('catalog/product_media_config')->getMediaUrl( $base_image);
|
300 |
+
}
|
301 |
+
}
|
302 |
+
elseif($attributeCode == 'small_image')
|
303 |
+
{
|
304 |
+
$small_image = $product->getSmallImage();
|
305 |
+
if($small_image)
|
306 |
+
{
|
307 |
+
$formated_value = Mage::getModel('catalog/product_media_config')->getMediaUrl( $small_image);
|
308 |
+
}
|
309 |
+
}
|
310 |
+
elseif($attributeCode == 'thumbnail')
|
311 |
+
{
|
312 |
+
$thumbnail = $product->getThumbnail();
|
313 |
+
if($thumbnail)
|
314 |
+
{
|
315 |
+
$formated_value = Mage::getModel('catalog/product_media_config')->getMediaUrl( $thumbnail);
|
316 |
+
}
|
317 |
+
}
|
318 |
+
|
319 |
+
$backend_type = $attribute->getBackendType();
|
320 |
+
switch ($backend_type)
|
321 |
+
{
|
322 |
+
case 'decimal':
|
323 |
+
$formated_value = number_format($formated_value,2);
|
324 |
+
break;
|
325 |
+
}
|
326 |
+
|
327 |
+
return $formated_value;
|
328 |
+
}
|
329 |
|
330 |
+
public function _getPrices($product)
|
331 |
+
{
|
332 |
+
$prices = array(
|
333 |
+
'price_original_include_tax' => 0,
|
334 |
+
'price_original_exclude_tax' => 0,
|
335 |
+
'price_final_include_tax' => 0,
|
336 |
+
'price_final_exclude_tax' => 0,
|
337 |
+
'price_cost' => 0,
|
338 |
+
'tax_percent' => 0,
|
339 |
+
'discount' => 0,
|
340 |
+
);
|
341 |
+
|
342 |
+
//price
|
343 |
+
$tax_helper = Mage::Helper('tax');
|
344 |
+
|
345 |
+
$_price = $product->getPrice();
|
346 |
+
$_final_price = $product->getFinalPrice();
|
347 |
+
|
348 |
+
$price = $tax_helper->getPrice($product, $_price);
|
349 |
+
$price_incl_tax = $tax_helper->getPrice($product, $_price, true);
|
350 |
+
$final_price = $tax_helper->getPrice($product, $_final_price);
|
351 |
+
$final_price_incl_tax = $tax_helper->getPrice($product, $_final_price, true);
|
352 |
+
|
353 |
+
$prices['price_original_include_tax'] = (double) $price_incl_tax; //number_format($price_incl_tax,2);
|
354 |
+
$prices['price_original_exclude_tax'] = (double) $price; //number_format($price,2);
|
355 |
+
$prices['price_final_include_tax'] = (double) $final_price_incl_tax; //number_format($final_price_incl_tax,2);
|
356 |
+
$prices['price_final_exclude_tax'] = (double) $final_price; //number_format($final_price,2);
|
357 |
+
|
358 |
+
//cost
|
359 |
+
$prices['price_cost'] = (double)number_format($product->getCost(),2);
|
360 |
+
|
361 |
+
//tax
|
362 |
+
$prices['tax_percent'] = (double)$this->_getTax($product);
|
363 |
+
|
364 |
+
//discount
|
365 |
+
$discount = abs((double)$price_incl_tax - (double)$final_price_incl_tax);
|
366 |
+
$prices['discount'] = (double)number_format($discount,2);
|
367 |
+
|
368 |
+
return $prices;
|
369 |
+
}
|
370 |
|
371 |
+
public function _getTax($product)
|
372 |
+
{
|
373 |
+
$tax = 0;
|
374 |
+
$store_id = $product->getStoreId();
|
375 |
+
|
376 |
+
if($store_id)
|
377 |
+
{
|
378 |
+
$store = Mage::app()->getStore($store_id);
|
379 |
+
if($store->getId())
|
380 |
+
{
|
381 |
+
$taxCalculation = Mage::getModel('tax/calculation');
|
382 |
+
$request = $taxCalculation->getRateRequest(null, null, null, $store);
|
383 |
+
$taxClassId = $product->getTaxClassId();
|
384 |
+
$tax = $taxCalculation->getRate($request->setProductClassId($taxClassId));
|
385 |
+
}
|
386 |
+
}
|
387 |
+
return $tax;
|
388 |
+
}
|
389 |
|
390 |
+
//nepouziva se
|
391 |
+
public function _getImages($product)
|
392 |
+
{
|
393 |
+
$images = array(
|
394 |
+
'thumbnail' => '',
|
395 |
+
'small_image' => '',
|
396 |
+
'image' => ''
|
397 |
+
);
|
398 |
+
|
399 |
+
$thumbnail = $product->getThumbnail();
|
400 |
+
if($thumbnail)
|
401 |
+
{
|
402 |
+
$images['thumbnail'] = Mage::getModel('catalog/product_media_config')->getMediaUrl( $thumbnail); //(string)Mage::Helper('catalog/image')->init($product, 'thumbnail');
|
403 |
+
}
|
404 |
+
$small_image = $product->getSmallImage();
|
405 |
+
if($small_image)
|
406 |
+
{
|
407 |
+
$images['small_image'] = Mage::getModel('catalog/product_media_config')->getMediaUrl( $small_image); //(string)Mage::Helper('catalog/image')->init($product, 'small_image');
|
408 |
+
}
|
409 |
+
$base_image = $product->getImage();
|
410 |
+
if($base_image)
|
411 |
+
{
|
412 |
+
$images['image'] = Mage::getModel('catalog/product_media_config')->getMediaUrl( $base_image); //(string)Mage::Helper('catalog/image')->init($product, 'image');
|
413 |
+
}
|
414 |
+
|
415 |
+
return $images;
|
416 |
+
}
|
417 |
|
418 |
+
public function _getGallery($product)
|
419 |
+
{
|
420 |
+
$gallery = array();
|
421 |
+
|
422 |
+
foreach ($product->getMediaGalleryImages() as $image)
|
423 |
+
{
|
424 |
+
$product_image = array(
|
425 |
+
'label' => $image->getLabel(),
|
426 |
+
'thumbnail_image' => $image->getUrl(),
|
427 |
+
'small_image' => $image->getUrl(),
|
428 |
+
'base_image' => $image->getUrl(),
|
429 |
+
);
|
430 |
+
$gallery[] = $product_image;
|
431 |
+
}
|
432 |
+
|
433 |
+
return $gallery;
|
434 |
+
}
|
435 |
|
436 |
+
public function _getCategory($product)
|
437 |
+
{
|
438 |
+
$category = array();
|
439 |
+
$product_category_helper = Mage::Helper('kaas_product_category')->setStoreId($this->getStoreId());
|
440 |
+
|
441 |
+
$category_ids = $product->getCategoryIds();
|
442 |
+
foreach($category_ids as $category_id)
|
443 |
+
{
|
444 |
+
if(Mage::Helper('kaas_product_store')->isStoreCategory($category_id,$product->getStoreId()))
|
445 |
+
{
|
446 |
+
$category_info = $product_category_helper->getCategoryInfo($category_id);
|
447 |
+
if($category_info && isset($category_info['level']) && $category_info['level'] > 0 )
|
448 |
+
{
|
449 |
+
$category[] = $category_info;
|
450 |
+
}
|
451 |
+
}
|
452 |
+
}
|
453 |
+
|
454 |
+
return $category;
|
455 |
+
}
|
456 |
|
457 |
}
|
app/code/community/Getready/Kaas/Model/Category/Api.php
CHANGED
@@ -25,29 +25,30 @@
|
|
25 |
*/
|
26 |
class Getready_Kaas_Model_Category_Api extends Mage_Api_Model_Resource_Abstract
|
27 |
{
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
$category->setStoreId($storeId);
|
34 |
-
|
35 |
$category->load($categoryId);
|
36 |
|
37 |
if (!$category->getId()) {
|
38 |
$this->_fault('category_not_exists');
|
39 |
}
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
|
|
45 |
|
46 |
|
47 |
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
$store = Mage::app()->getStore($storeId);
|
52 |
} catch (Mage_Core_Model_Store_Exception $e) {
|
53 |
$this->_fault('store_not_exists');
|
@@ -57,15 +58,14 @@ class Getready_Kaas_Model_Category_Api extends Mage_Api_Model_Resource_Abstract
|
|
57 |
$this->_fault('store_not_exists');
|
58 |
}
|
59 |
|
60 |
-
|
61 |
|
62 |
-
|
63 |
-
$tree = Mage::getResourceSingleton('catalog/category_tree')
|
64 |
-
->load();
|
65 |
|
66 |
$root = $tree->getNodeById($root_id);
|
67 |
|
68 |
-
|
69 |
$root->setName(Mage::helper('catalog')->__('Root'));
|
70 |
}
|
71 |
|
@@ -76,23 +76,33 @@ class Getready_Kaas_Model_Category_Api extends Mage_Api_Model_Resource_Abstract
|
|
76 |
|
77 |
$tree->addCollectionData($collection, true);
|
78 |
|
79 |
-
$category_info = $this->_nodeToArray($root);
|
80 |
|
81 |
|
82 |
-
|
83 |
-
|
84 |
|
85 |
-
|
86 |
{
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
}
|
97 |
|
98 |
return $result;
|
25 |
*/
|
26 |
class Getready_Kaas_Model_Category_Api extends Mage_Api_Model_Resource_Abstract
|
27 |
{
|
28 |
+
public function info($categoryId,$storeId = null)
|
29 |
+
{
|
30 |
+
$category = Mage::getModel('catalog/category');
|
31 |
+
if(!is_null($storeId))
|
32 |
+
{
|
33 |
$category->setStoreId($storeId);
|
34 |
+
}
|
35 |
$category->load($categoryId);
|
36 |
|
37 |
if (!$category->getId()) {
|
38 |
$this->_fault('category_not_exists');
|
39 |
}
|
40 |
+
|
41 |
+
$category_helper = Mage::Helper('kaas_category')->setStoreId($storeId);
|
42 |
+
$category_info = $category_helper->getCategoryInfo($category,1);
|
43 |
+
|
44 |
+
return $category_info;
|
45 |
+
}
|
46 |
|
47 |
|
48 |
|
49 |
+
public function items($storeId)
|
50 |
+
{
|
51 |
+
try {
|
52 |
$store = Mage::app()->getStore($storeId);
|
53 |
} catch (Mage_Core_Model_Store_Exception $e) {
|
54 |
$this->_fault('store_not_exists');
|
58 |
$this->_fault('store_not_exists');
|
59 |
}
|
60 |
|
61 |
+
$root_id = $store->getRootCategoryId();
|
62 |
|
63 |
+
/* @var $tree Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Tree */
|
64 |
+
$tree = Mage::getResourceSingleton('catalog/category_tree')->load();
|
|
|
65 |
|
66 |
$root = $tree->getNodeById($root_id);
|
67 |
|
68 |
+
if($root && $root->getId() == 1) {
|
69 |
$root->setName(Mage::helper('catalog')->__('Root'));
|
70 |
}
|
71 |
|
76 |
|
77 |
$tree->addCollectionData($collection, true);
|
78 |
|
79 |
+
$category_info = $this->_nodeToArray($root,$storeId);
|
80 |
|
81 |
|
82 |
+
return $category_info;
|
83 |
+
}
|
84 |
|
85 |
+
protected function _nodeToArray(Varien_Data_Tree_Node $node,$store_id = 0)
|
86 |
{
|
87 |
+
$default_root_level = Mage::Helper('kaas')->getDefaultRootLevel();
|
88 |
+
$result = array();
|
89 |
+
$category_id = $node->getId();
|
90 |
+
$category = Mage::Helper('kaas_category_cache')->getCategory($category_id, $store_id);
|
91 |
+
|
92 |
+
if($category && $category->getIsActive())
|
93 |
+
{
|
94 |
+
$category_helper = Mage::Helper('kaas_category')->setStoreId($store_id);
|
95 |
+
//$category_helper->setStoreId($storeId);
|
96 |
+
$category_info = $category_helper->getCategoryInfo($category,$default_root_level);
|
97 |
+
|
98 |
+
if($category_info && isset($category_info['level']) && $category_info['level'] > 0 )
|
99 |
+
{
|
100 |
+
$result[] = $category_info;
|
101 |
+
}
|
102 |
+
|
103 |
+
foreach ($node->getChildren() as $child) {
|
104 |
+
$result = array_merge($result,$this->_nodeToArray($child, $store_id));
|
105 |
+
}
|
106 |
}
|
107 |
|
108 |
return $result;
|
app/code/community/Getready/Kaas/Model/Product/Api.php
CHANGED
@@ -37,12 +37,13 @@ class Getready_Kaas_Model_Product_Api extends Mage_Api_Model_Resource_Abstract
|
|
37 |
$this->_fault('store_not_exists');
|
38 |
}
|
39 |
|
|
|
40 |
$product = Mage::helper('catalog/product')->getProduct($productId, $storeId, null);
|
41 |
if (is_null($product->getId())) {
|
42 |
$this->_fault('product_not_exists');
|
43 |
}
|
44 |
|
45 |
-
$product_info =
|
46 |
|
47 |
Mage::Helper('kaas_activity')->deleteProductActivity($storeId,$productId);
|
48 |
|
@@ -50,7 +51,7 @@ class Getready_Kaas_Model_Product_Api extends Mage_Api_Model_Resource_Abstract
|
|
50 |
}
|
51 |
|
52 |
public function infoBySku($productSku,$storeId)
|
53 |
-
{
|
54 |
try {
|
55 |
$store = Mage::app()->getStore($storeId);
|
56 |
} catch (Mage_Core_Model_Store_Exception $e) {
|
@@ -59,7 +60,9 @@ class Getready_Kaas_Model_Product_Api extends Mage_Api_Model_Resource_Abstract
|
|
59 |
|
60 |
if (!$store->getId()) {
|
61 |
$this->_fault('store_not_exists');
|
62 |
-
}
|
|
|
|
|
63 |
$product_id = Mage::getModel('catalog/product')->getIdBySku($productSku);
|
64 |
if($product_id)
|
65 |
{
|
@@ -73,7 +76,7 @@ class Getready_Kaas_Model_Product_Api extends Mage_Api_Model_Resource_Abstract
|
|
73 |
$this->_fault('product_not_exists');
|
74 |
}
|
75 |
|
76 |
-
$product_info =
|
77 |
|
78 |
if($product_id)
|
79 |
{
|
@@ -85,6 +88,7 @@ class Getready_Kaas_Model_Product_Api extends Mage_Api_Model_Resource_Abstract
|
|
85 |
|
86 |
public function items($storeId)
|
87 |
{
|
|
|
88 |
$collection = Mage::getModel('catalog/product')->getCollection()
|
89 |
->addStoreFilter($storeId)
|
90 |
->addAttributeToSelect('name');
|
@@ -98,7 +102,7 @@ class Getready_Kaas_Model_Product_Api extends Mage_Api_Model_Resource_Abstract
|
|
98 |
$this->_fault('product_not_exists');
|
99 |
}
|
100 |
|
101 |
-
$product_info =
|
102 |
|
103 |
Mage::Helper('kaas_activity')->deleteProductActivity($storeId,$product->getId());
|
104 |
|
@@ -110,6 +114,7 @@ class Getready_Kaas_Model_Product_Api extends Mage_Api_Model_Resource_Abstract
|
|
110 |
|
111 |
public function itemsByIds($storeId, $productIds)
|
112 |
{
|
|
|
113 |
$result = array();
|
114 |
$products_export = array();
|
115 |
$errors = array();
|
@@ -130,7 +135,7 @@ class Getready_Kaas_Model_Product_Api extends Mage_Api_Model_Resource_Abstract
|
|
130 |
|
131 |
try
|
132 |
{
|
133 |
-
$product_info =
|
134 |
}
|
135 |
catch (Exception $e)
|
136 |
{
|
@@ -159,9 +164,9 @@ class Getready_Kaas_Model_Product_Api extends Mage_Api_Model_Resource_Abstract
|
|
159 |
->addStoreFilter($storeId);
|
160 |
|
161 |
$result = array();
|
162 |
-
|
163 |
foreach ($collection as $product)
|
164 |
-
{
|
165 |
$result[] = (int)$product->getId();
|
166 |
}
|
167 |
|
37 |
$this->_fault('store_not_exists');
|
38 |
}
|
39 |
|
40 |
+
$product_helper = Mage::Helper('kaas_product')->setStoreId($storeId);
|
41 |
$product = Mage::helper('catalog/product')->getProduct($productId, $storeId, null);
|
42 |
if (is_null($product->getId())) {
|
43 |
$this->_fault('product_not_exists');
|
44 |
}
|
45 |
|
46 |
+
$product_info = $product_helper->getProductInfo($product);
|
47 |
|
48 |
Mage::Helper('kaas_activity')->deleteProductActivity($storeId,$productId);
|
49 |
|
51 |
}
|
52 |
|
53 |
public function infoBySku($productSku,$storeId)
|
54 |
+
{
|
55 |
try {
|
56 |
$store = Mage::app()->getStore($storeId);
|
57 |
} catch (Mage_Core_Model_Store_Exception $e) {
|
60 |
|
61 |
if (!$store->getId()) {
|
62 |
$this->_fault('store_not_exists');
|
63 |
+
}
|
64 |
+
|
65 |
+
$product_helper = Mage::Helper('kaas_product')->setStoreId($storeId);
|
66 |
$product_id = Mage::getModel('catalog/product')->getIdBySku($productSku);
|
67 |
if($product_id)
|
68 |
{
|
76 |
$this->_fault('product_not_exists');
|
77 |
}
|
78 |
|
79 |
+
$product_info = $product_helper->getProductInfo($product);
|
80 |
|
81 |
if($product_id)
|
82 |
{
|
88 |
|
89 |
public function items($storeId)
|
90 |
{
|
91 |
+
$product_helper = Mage::Helper('kaas_product')->setStoreId($storeId);
|
92 |
$collection = Mage::getModel('catalog/product')->getCollection()
|
93 |
->addStoreFilter($storeId)
|
94 |
->addAttributeToSelect('name');
|
102 |
$this->_fault('product_not_exists');
|
103 |
}
|
104 |
|
105 |
+
$product_info = $product_helper->getProductInfo($product);
|
106 |
|
107 |
Mage::Helper('kaas_activity')->deleteProductActivity($storeId,$product->getId());
|
108 |
|
114 |
|
115 |
public function itemsByIds($storeId, $productIds)
|
116 |
{
|
117 |
+
$product_helper = Mage::Helper('kaas_product')->setStoreId($storeId);
|
118 |
$result = array();
|
119 |
$products_export = array();
|
120 |
$errors = array();
|
135 |
|
136 |
try
|
137 |
{
|
138 |
+
$product_info = $product_helper->getProductInfo($product);
|
139 |
}
|
140 |
catch (Exception $e)
|
141 |
{
|
164 |
->addStoreFilter($storeId);
|
165 |
|
166 |
$result = array();
|
167 |
+
|
168 |
foreach ($collection as $product)
|
169 |
+
{
|
170 |
$result[] = (int)$product->getId();
|
171 |
}
|
172 |
|
app/code/community/Getready/Kaas/etc/config.xml
CHANGED
@@ -20,7 +20,7 @@
|
|
20 |
<config>
|
21 |
<modules>
|
22 |
<Getready_Kaas>
|
23 |
-
<version>1.0.
|
24 |
</Getready_Kaas>
|
25 |
</modules>
|
26 |
|
20 |
<config>
|
21 |
<modules>
|
22 |
<Getready_Kaas>
|
23 |
+
<version>1.0.1</version>
|
24 |
</Getready_Kaas>
|
25 |
</modules>
|
26 |
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>getready_kaas</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL-v3</license>
|
7 |
<channel>community</channel>
|
@@ -10,9 +10,9 @@
|
|
10 |
<description>Koongo is the ultimate feed marketing tool that streamlines the process of the product export from e-stores to various product search and price comparison websites, affiliate networks and selling channels. Since Koongo doesn’t require any programming skills it allows online retailers and merchants to reach seamlessly hundreds of new marketing channels from around the world from a single integration point. Hence, Koongo is capable of bringing millions of new prospective customers to online stores of merchants and can increase store revenues by up to 25%! In addition, through the support of 500+ selling channels from more than 40 countries worldwide Koongo simplifies the process of expanding online businesses behind the borders of one country (i.e. cross-border selling).</description>
|
11 |
<notes>This release adds new SOAP methods allowing integration between Koongo service and Magento application.</notes>
|
12 |
<authors><author><name>GetReady Team</name><user>getreadycz</user><email>info@getready.cz</email></author></authors>
|
13 |
-
<date>2015-
|
14 |
-
<time>15:
|
15 |
-
<contents><target name="magecommunity"><dir name="Getready"><dir name="Kaas"><dir name="Helper"><dir name="Activity"><file name="Data.php" hash="62a3e1b7febee61d271a92d1a2f54dd5"/></dir><dir name="Category"><dir name="Cache"><file name="Data.php" hash="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>getready_kaas</name>
|
4 |
+
<version>1.0.1</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL-v3</license>
|
7 |
<channel>community</channel>
|
10 |
<description>Koongo is the ultimate feed marketing tool that streamlines the process of the product export from e-stores to various product search and price comparison websites, affiliate networks and selling channels. Since Koongo doesn’t require any programming skills it allows online retailers and merchants to reach seamlessly hundreds of new marketing channels from around the world from a single integration point. Hence, Koongo is capable of bringing millions of new prospective customers to online stores of merchants and can increase store revenues by up to 25%! In addition, through the support of 500+ selling channels from more than 40 countries worldwide Koongo simplifies the process of expanding online businesses behind the borders of one country (i.e. cross-border selling).</description>
|
11 |
<notes>This release adds new SOAP methods allowing integration between Koongo service and Magento application.</notes>
|
12 |
<authors><author><name>GetReady Team</name><user>getreadycz</user><email>info@getready.cz</email></author></authors>
|
13 |
+
<date>2015-04-10</date>
|
14 |
+
<time>08:15:11</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Getready"><dir name="Kaas"><dir name="Helper"><dir name="Activity"><file name="Data.php" hash="62a3e1b7febee61d271a92d1a2f54dd5"/></dir><dir name="Category"><dir name="Cache"><file name="Data.php" hash="3a68d24bcf7aa5a9e8991bd397a39968"/></dir><file name="Data.php" hash="e6bb2f8aba6d2a3cb511549bd4a2dcd5"/></dir><file name="Data.php" hash="25f9eafa095c6575d2c2d531d146f460"/><dir name="Product"><dir name="Category"><file name="Data.php" hash="281f10089bb581925b69f8e91eb750ff"/></dir><file name="Data.php" hash="8421102afb086ef617740bc8a868dea5"/><dir name="Store"><file name="Data.php" hash="b8b3a47a4f62e88ae8b7486448b3d117"/></dir></dir><dir name="Store"><file name="Data.php" hash="858b925336ad142137863fb39ea48bfc"/></dir></dir><dir name="Model"><dir name="Activity"><dir name="Api"><file name="V2.php" hash="8f42f3185ea31e3aa26effcb5ab9125a"/></dir><file name="Api.php" hash="b26a8e15dfea24bae6fd42dd22a62854"/></dir><file name="Activity.php" hash="7aba5dc7971c1eadb520d18976b1125c"/><dir name="Category"><dir name="Api"><file name="V2.php" hash="78a7066d3140b657eff58b14b23d1f08"/></dir><file name="Api.php" hash="81cc80a60dcea3ec02622b76e792b265"/></dir><dir name="Mysql4"><dir name="Activity"><file name="Collection.php" hash="dd7228a1cdb5b4ac78cd11474087651f"/></dir><file name="Activity.php" hash="85589a497a54e021566f76d6551a2d00"/></dir><file name="Observer.php" hash="05871d18b19cecc2565a97a491722e8e"/><dir name="Product"><dir name="Api"><file name="V2.php" hash="e8678b1521bdb64aa190525ec2eddcec"/></dir><file name="Api.php" hash="2e3224afc65897a87bed42441ef124ef"/></dir><dir name="Store"><dir name="Api"><file name="V2.php" hash="a6e77878c5381fca64e78345282039e5"/></dir><file name="Api.php" hash="5779a9fba1a66545cca8780278a0d997"/></dir></dir><dir name="etc"><file name="api.xml" hash="35d556b362351ad9eb02cbddce39db3d"/><file name="config.xml" hash="9554d5ed8ba3318646d0dba5a1af6288"/><file name="wsdl.xml" hash="80c23b574cb985611f11bf612143023b"/></dir><dir name="sql"><dir name="kaas_setup"><file name="mysql4-install-1.0.0.php" hash="ba340185bf02226645e753dc9a5fbf1c"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Getready_Kaas.xml" hash="f074e529238944862070b165459b5f2c"/></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|