getready_kaas - Version 1.0.1

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 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')->load($category_id);
 
 
 
 
 
33
  return $category;
34
  }
35
 
36
- public function getCategory($category_id)
37
  {
38
  $category = null;
39
- if(isset($this->_categories[$category_id]))
 
40
  {
41
- $category = $this->_categories[$category_id];
42
  }
43
  else
44
  {
45
- $category = $this->loadCategory($category_id);
46
- $this->_categories[$category_id] = $category;
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
- public function getCategoryInfo($category,$root_level = 0)
30
- {
31
- $category_info = array(
32
- 'category_id' => '',
33
- 'url' => '',
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
- public function getCategoryName($parent_id)
142
- {
143
- $parent_name = '';
144
- $category = $this->getCategory($parent_id);
145
- if($category->getId())
146
- {
147
- $parent_name = $category->getName();
148
- }
149
- return $parent_name;
150
- }
 
 
 
 
151
 
152
- public function getRootId($category_path_ids)
153
- {
154
- $path_ids_array = explode('/', $category_path_ids);
155
- if(!empty($path_ids_array))
156
- {
157
- $root_id = $path_ids_array[0];
158
- }
159
- return $root_id;
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
- if(isset($this->_generated_categories[$category_id]))
 
 
35
  {
36
- $category_info = $this->_generated_categories[$category_id];
37
  }
38
  else
39
  {
40
  $category_info = $this->_generateCategoryInfo($category_id);
41
- $this->_generated_categories[$category_id] = $category_info;
42
  }
43
  return $category_info;
44
  }
45
 
46
- public function _generateCategoryInfo($category_id)
47
- {
48
- $root_level = 1;
49
- $category_info = array(
50
- 'id' => '',
51
- 'name' => '',
52
- 'path_ids' => '',
53
- 'level' => '',
54
- 'parent_id' => '',
55
- 'parent_name' => '',
56
- 'url' => '',
57
- 'path_url_key' => '',
58
- 'path' => '',
59
- 'root_id' => '',
60
- 'root_name' => '',
61
- );
62
-
63
- $category = $this->_getCategory($category_id);
64
- if($category->getId())
65
- {
66
- $category_info['id'] = $category->getId();
67
- $category_info['name'] = $category->getName();
68
- $category_info['url'] = $category->getUrl();
69
-
70
- $category_path_ids = $this->_formatPathIdsForRootCategory($category->getPath(),$root_level);
71
-
72
- $category_info['path_ids'] = $category_path_ids;
73
- $category_info['path_url_key'] = $this->_getCategoryUrlKey($category_path_ids);
74
- $category_info['path'] = $this->_getCategoryPath($category_path_ids);
75
-
76
- $level = $this->_formatLevelForRootCategory($category->getLevel(),$root_level);
77
- $category_info['level'] = $level;
78
-
79
- if($level == $root_level)
80
- {
81
- $category_info['parent_id'] = null;
82
- $category_info['parent_name'] = null;
 
 
 
 
 
 
83
 
84
- $category_info['root_id'] = $category->getId();
85
- $category_info['root_name'] = $category->getName();
86
- }
87
- else
88
- {
89
- $parent_id = $category->getParentId();
90
- $category_info['parent_id'] = $parent_id;
91
- $category_info['parent_name'] = $this->_getParentCategoryName($parent_id);
92
 
93
- $root_id = $this->_getRootId($category_path_ids);
94
- $category_info['root_id'] = $root_id;
95
- $category_info['root_name'] = $this->_getParentCategoryName($root_id);
96
- }
97
- }
98
-
99
- return $category_info;
100
- }
101
 
102
- public function _getCategory($category_id)
103
- {
104
- $category = null;
105
- if(isset($this->_categories[$category_id]))
106
- {
107
- $category = $this->_categories[$category_id];
108
- }
109
- else
110
- {
111
- $category = Mage::getModel('catalog/category')->load($category_id);
112
- $this->_categories[$category_id] = $category;
113
- }
114
- return $category;
115
- }
 
 
 
 
 
 
 
116
 
117
- public function _formatPathIdsForRootCategory($category_path_ids, $root_level)
118
- {
119
- $formated_path_ids = $category_path_ids;
120
- $path_ids_array = explode('/', $category_path_ids);
121
- if(!empty($path_ids_array))
122
- {
123
- for($i=0;$i < $root_level;$i++)
124
- {
125
- unset($path_ids_array[$i]);
126
- }
127
- $formated_path_ids = implode('/', $path_ids_array);
128
- }
129
- return $formated_path_ids;
130
- }
131
 
132
- public function _formatLevelForRootCategory($level, $root_level)
133
- {
134
- $formated_level = $level;
135
- if($root_level > 1)
136
- {
137
- $formated_level = $level - $root_level + 1;
138
- }
139
- return $formated_level;
140
- }
141
 
142
- public function _getCategoryPath($category_path_ids)
143
- {
144
- $category_path_array = array();
145
- $path_ids_array = explode('/', $category_path_ids);
146
- foreach($path_ids_array as $_category_id)
147
- {
148
- $category = $this->_getCategory($_category_id);
149
- $category_path_array[] = $category->getName();
150
- }
151
- $category_path = implode('/', $category_path_array);
152
- return $category_path;
153
- }
154
 
155
- public function _getCategoryUrlKey($category_path_ids)
156
- {
157
- $category_url_key_array = array();
158
- $path_ids_array = explode('/', $category_path_ids);
159
- foreach($path_ids_array as $_category_id)
160
- {
161
- $category = $this->_getCategory($_category_id);
162
- $category_url_key_array[] = $category->getUrlKey();
163
- }
164
- $category_url_key = implode('/', $category_url_key_array);
165
- return $category_url_key;
166
- }
167
 
168
- public function _getParentCategoryName($parent_id)
169
- {
170
- $parent_name = '';
171
- $category = $this->_getCategory($parent_id);
172
- if($category->getId())
173
- {
174
- $parent_name = $category->getName();
175
- }
176
- return $parent_name;
177
- }
178
 
179
- public function _getRootId($category_path_ids)
180
- {
181
- $path_ids_array = explode('/', $category_path_ids);
182
- if(!empty($path_ids_array))
183
- {
184
- $root_id = $path_ids_array[0];
185
- }
186
- return $root_id;
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
- public function getProductInfo($product)
29
- {
30
- $product_info = array(
31
- //header
32
- 'product_id' => '',
33
- 'group_id' => '',
34
- 'url' => '',
35
- 'created_at' => array('sec' => '', 'usec' => ''),
36
- 'creation_datetime' => '',
37
- 'creation_date' => '',
38
- 'creation_time' => '',
39
- 'updated_at' => array('sec' => '', 'usec' => ''),
40
- 'updated_datetime' => '',
41
- 'updated_date' => '',
42
- 'updated_time' => '',
43
- 'is_visible' => '',
44
- 'is_parent' => '',
45
- 'is_child' => '',
46
- //flat
47
- 'flat' => array(),
48
- //price
49
- 'price_original_include_tax' => '',
50
- 'price_original_exclude_tax' => '',
51
- 'price_final_include_tax' => '',
52
- 'price_final_exclude_tax' => '',
53
- 'price_cost' => '',
54
- 'tax_percent' => '',
55
- 'discount' => '',
56
- //invertory
57
- 'qty' => 0,
58
- 'stock_status' => false,
59
- //media
60
- 'gallery' => array(),
61
- //category
62
- 'category' => array(),
63
- 'children' => array(),
64
- );
65
-
66
- //header
67
- $product_info['product_id'] = $product->getId();
68
- /* TODO */$product_info['group_id'] = $this->_getGroupId($product);
69
- $product_info['url'] = $product->getProductUrl();
70
- $created_at = $product->getCreatedAt();
71
-
72
- $product_info['created_at'] = array(
73
- 'sec' => strtotime($created_at),
74
- 'usec' => 0
75
- );
76
- $product_info['creation_datetime'] = date('Y-m-d H:i:s', strtotime($created_at));
77
- $product_info['creation_date'] = date('Y-m-d', strtotime($created_at));
78
- $product_info['creation_time'] = date('H:i:s', strtotime($created_at));
79
-
80
- $updated_at = $product->getUpdatedAt();
81
- $product_info['updated_at'] = array(
82
- 'sec' => strtotime($updated_at),
83
- 'usec' => 0
84
- );
85
- $product_info['updated_datetime'] = date('Y-m-d H:i:s', strtotime($updated_at));
86
- $product_info['updated_date'] = date('Y-m-d', strtotime($updated_at));
87
- $product_info['updated_time'] = date('H:i:s', strtotime($updated_at));
88
-
89
- $visibility = false;
90
- if($product->getVisibility() == '2' || $product->getVisibility() == '4')
91
- {
92
- $visibility = true;
93
- }
94
- $product_info['is_visible'] = $visibility;
95
- $product_info['is_parent'] = $this->_isParent($product);
96
- $product_info['is_child'] = $this->_isChild($product);
97
-
98
- //flat
99
- $flat_attributes = $this->_getFlatAttributes($product);
100
- $product_info['flat'] = $flat_attributes;
101
-
102
- //price
103
- $prices = $this->_getPrices($product);
104
-
105
- $product_info['price_original_include_tax'] = $prices['price_original_include_tax'];
106
- $product_info['price_original_exclude_tax'] = $prices['price_original_exclude_tax'];
107
- $product_info['price_final_include_tax'] = $prices['price_final_include_tax'];
108
- $product_info['price_final_exclude_tax'] = $prices['price_final_exclude_tax'];
109
- $product_info['price_cost'] = $prices['price_cost'];
110
- $product_info['tax_percent'] = $prices['tax_percent'];
111
- $product_info['discount'] = $prices['discount'];
112
-
113
- //inventory
114
- $stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product);
115
- $product_info['qty'] = (int)number_format($stock->getQty(),0);
116
- $product_info['stock_status'] = (boolean)$stock->getIsInStock();
117
-
118
- //media
119
- $product_info['gallery'] = $this->_getGallery($product);
120
-
121
- //category
122
- $product_info['category'] = $this->_getCategory($product);
123
-
124
- //children
125
- $product_info['children'] = $this->_getChildren($product);
126
-
127
- return $product_info;
128
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
129
 
130
- public function _getGroupId($product)
131
- {
132
- $group_id = 0; //$product->getId();
133
-
134
- return $group_id;
135
- }
136
 
137
- public function _isParent($product)
138
- {
139
- $is_parent = false;
140
- $product_id = $product->getId();
141
-
142
- if($product->getTypeId() != 'simple' )
143
- {
144
- $child_ids = Mage::getModel('catalog/product_type_configurable')->getChildrenIds($product_id);
145
- if(!$child_ids)
146
- {
147
- $child_ids = Mage::getModel('catalog/product_type_grouped')->getChildrenIds($product_id);
148
- }
149
-
150
- // if(!$child_ids)
151
- // {
152
- // $child_ids = Mage::getModel('bundle/product_type')->getChildrenIds($product_id);
153
- // }
154
-
155
- if($child_ids)
156
- {
157
- $is_parent = true;
158
- }
159
- }
160
-
161
- return $is_parent;
162
- }
163
 
164
- public function _isChild($product)
165
- {
166
- $is_child = false;
167
- $product_id = $product->getId();
168
-
169
- if($product->getTypeId() == 'simple' )
170
- {
171
- $parent_ids = Mage::getModel('catalog/product_type_grouped')->getParentIdsByChild($product_id);
172
- if(!$parent_ids)
173
- {
174
- $parent_ids = Mage::getModel('catalog/product_type_configurable')->getParentIdsByChild($product_id);
175
- }
176
-
177
- // if(!$parent_ids)
178
- // {
179
- // $parent_ids = $parent_ids = Mage::getModel('bundle/product_type')->getParentIdsByChild($product_id);
180
- // }
181
-
182
- if($parent_ids)
183
- {
184
- $is_child = true;
185
- }
186
- }
187
-
188
- return $is_child;
189
- }
190
 
191
- public function _getChildren($product)
192
- {
193
- $children = array();
194
- $product_id = $product->getId();
195
-
196
- if($product->getTypeId() != 'simple' )
197
- {
198
- $conf_child_ids = Mage::getModel('catalog/product_type_configurable')->getChildrenIds($product_id);
199
- if(isset($conf_child_ids[0]))
200
- {
201
- $child_ids = $conf_child_ids[0];
202
- foreach($child_ids as $child_id)
203
- {
204
- $children[] = $child_id;
205
- }
206
- }
207
-
208
- $group_child_ids = Mage::getModel('catalog/product_type_grouped')->getChildrenIds($product_id);
209
- if(isset($group_child_ids[Mage_Catalog_Model_Product_Link::LINK_TYPE_GROUPED]))
210
- {
211
- $child_ids = $group_child_ids[Mage_Catalog_Model_Product_Link::LINK_TYPE_GROUPED];
212
- foreach($child_ids as $child_id)
213
- {
214
- $children[] = $child_id;
215
- }
216
- }
217
-
218
- // $bundle_child_ids = Mage::getModel('bundle/product_type')->getChildrenIds($product_id);
219
- // foreach($bundle_child_ids as $child_id)
220
- // {
221
- // $children[] = $child_id;
222
- // }
223
- }
224
-
225
- return $children;
226
- }
227
 
228
- public function _getFlatAttributes($product)
229
- {
230
- $flat_attributes = array();
231
- $attributes = $product->getAttributes();
232
- $not_exported_attributes_codes = array(
233
- 'type_id',
234
- 'entity_id',
235
- 'attribute_set_id',
236
- 'entity_type_id',
237
- 'old_id',
238
- 'url_path',
239
- 'category_ids',
240
- 'required_options',
241
- 'has_options',
242
- 'created_at',
243
- 'updated_at',
244
- 'media_gallery',
245
- 'gallery',
246
- 'custom_design',
247
- 'custom_design_from',
248
- 'custom_design_to',
249
- 'custom_layout_update',
250
- 'page_layout',
251
- 'options_container',
252
- 'thumbnail_label',
253
- 'image_label',
254
- 'small_image_label'
255
- );
256
- foreach ($attributes as $attribute) {
257
-
258
- $attributeCode = $attribute->getAttributeCode();
259
- if (!in_array($attributeCode, $not_exported_attributes_codes))
260
- {
261
- $label = $attribute->getStoreLabel($product->getStoreId());
262
- $value = $attribute->getFrontend()->getValue($product);
263
-
264
- $flat_attribute = array(
265
- 'code' => $attributeCode,
266
- 'label' => $label,
267
- 'value' => $this->_getProductAttributeValue($product,$attribute)
268
- );
269
-
270
- $flat_attributes[] = $flat_attribute;
271
- }
272
- }
273
-
274
- return $flat_attributes;
275
- }
276
 
277
- public function _getProductAttributeValue($product,$attribute)
278
- {
279
- $formated_value = $attribute->getFrontend()->getValue($product);
280
-
281
- $attributeCode = $attribute->getAttributeCode();
282
- if($attributeCode == 'image')
283
- {
284
- $base_image = $product->getImage();
285
- if($base_image)
286
- {
287
- $formated_value = Mage::getModel('catalog/product_media_config')->getMediaUrl( $base_image);
288
- }
289
- }
290
- elseif($attributeCode == 'small_image')
291
- {
292
- $small_image = $product->getSmallImage();
293
- if($small_image)
294
- {
295
- $formated_value = Mage::getModel('catalog/product_media_config')->getMediaUrl( $small_image);
296
- }
297
- }
298
- elseif($attributeCode == 'thumbnail')
299
- {
300
- $thumbnail = $product->getThumbnail();
301
- if($thumbnail)
302
- {
303
- $formated_value = Mage::getModel('catalog/product_media_config')->getMediaUrl( $thumbnail);
304
- }
305
- }
306
-
307
- $backend_type = $attribute->getBackendType();
308
- switch ($backend_type)
309
- {
310
- case 'decimal':
311
- $formated_value = number_format($formated_value,2);
312
- break;
313
- }
314
-
315
- return $formated_value;
316
- }
317
 
318
- public function _getPrices($product)
319
- {
320
- $prices = array(
321
- 'price_original_include_tax' => 0,
322
- 'price_original_exclude_tax' => 0,
323
- 'price_final_include_tax' => 0,
324
- 'price_final_exclude_tax' => 0,
325
- 'price_cost' => 0,
326
- 'tax_percent' => 0,
327
- 'discount' => 0,
328
- );
329
-
330
- //price
331
- $tax_helper = Mage::Helper('tax');
332
-
333
- $_price = $product->getPrice();
334
- $_final_price = $product->getFinalPrice();
335
-
336
- $price = $tax_helper->getPrice($product, $_price);
337
- $price_incl_tax = $tax_helper->getPrice($product, $_price, true);
338
- $final_price = $tax_helper->getPrice($product, $_final_price);
339
- $final_price_incl_tax = $tax_helper->getPrice($product, $_final_price, true);
340
-
341
- $prices['price_original_include_tax'] = (double) $price_incl_tax; //number_format($price_incl_tax,2);
342
- $prices['price_original_exclude_tax'] = (double) $price; //number_format($price,2);
343
- $prices['price_final_include_tax'] = (double) $final_price_incl_tax; //number_format($final_price_incl_tax,2);
344
- $prices['price_final_exclude_tax'] = (double) $final_price; //number_format($final_price,2);
345
-
346
- //cost
347
- $prices['price_cost'] = (double)number_format($product->getCost(),2);
348
-
349
- //tax
350
- $prices['tax_percent'] = (double)$this->_getTax($product);
351
-
352
- //discount
353
- $discount = abs((double)$price_incl_tax - (double)$final_price_incl_tax);
354
- $prices['discount'] = (double)number_format($discount,2);
355
-
356
- return $prices;
357
- }
358
 
359
- public function _getTax($product)
360
- {
361
- $tax = 0;
362
- $store_id = $product->getStoreId();
363
-
364
- if($store_id)
365
- {
366
- $store = Mage::app()->getStore($store_id);
367
- if($store->getId())
368
- {
369
- $taxCalculation = Mage::getModel('tax/calculation');
370
- $request = $taxCalculation->getRateRequest(null, null, null, $store);
371
- $taxClassId = $product->getTaxClassId();
372
- $tax = $taxCalculation->getRate($request->setProductClassId($taxClassId));
373
- }
374
- }
375
- return $tax;
376
- }
377
 
378
- //nepouziva se
379
- public function _getImages($product)
380
- {
381
- $images = array(
382
- 'thumbnail' => '',
383
- 'small_image' => '',
384
- 'image' => ''
385
- );
386
-
387
- $thumbnail = $product->getThumbnail();
388
- if($thumbnail)
389
- {
390
- $images['thumbnail'] = Mage::getModel('catalog/product_media_config')->getMediaUrl( $thumbnail); //(string)Mage::Helper('catalog/image')->init($product, 'thumbnail');
391
- }
392
- $small_image = $product->getSmallImage();
393
- if($small_image)
394
- {
395
- $images['small_image'] = Mage::getModel('catalog/product_media_config')->getMediaUrl( $small_image); //(string)Mage::Helper('catalog/image')->init($product, 'small_image');
396
- }
397
- $base_image = $product->getImage();
398
- if($base_image)
399
- {
400
- $images['image'] = Mage::getModel('catalog/product_media_config')->getMediaUrl( $base_image); //(string)Mage::Helper('catalog/image')->init($product, 'image');
401
- }
402
-
403
- return $images;
404
- }
405
 
406
- public function _getGallery($product)
407
- {
408
- $gallery = array();
409
-
410
- foreach ($product->getMediaGalleryImages() as $image)
411
- {
412
- $product_image = array(
413
- 'label' => $image->getLabel(),
414
- 'thumbnail_image' => $image->getUrl(),
415
- 'small_image' => $image->getUrl(),
416
- 'base_image' => $image->getUrl(),
417
- );
418
- $gallery[] = $product_image;
419
- }
420
-
421
- return $gallery;
422
- }
423
 
424
- public function _getCategory($product)
425
- {
426
- $category = array();
427
-
428
- $category_ids = $product->getCategoryIds();
429
- foreach($category_ids as $category_id)
430
- {
431
- if(Mage::Helper('kaas_product_store')->isStoreCategory($category_id,$product->getStoreId()))
432
- {
433
- $category_info = Mage::Helper('kaas_product_category')->getCategoryInfo($category_id);
434
- $category[] = $category_info;
435
- }
436
- }
437
-
438
- return $category;
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
- 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_info = Mage::Helper('kaas_category')->getCategoryInfo($category,1);
42
-
43
- return $category_info;
44
- }
 
45
 
46
 
47
 
48
- public function items($storeId)
49
- {
50
- try {
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
- $root_id = $store->getRootCategoryId();
61
 
62
- /* @var $tree Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Tree */
63
- $tree = Mage::getResourceSingleton('catalog/category_tree')
64
- ->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,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
- return $category_info;
83
- }
84
 
85
- protected function _nodeToArray(Varien_Data_Tree_Node $node)
86
  {
87
- $result = array();
88
- $category_id = $node->getId();
89
- $category = Mage::Helper('kaas_category_cache')->getCategory($category_id);
90
- $category_info = Mage::Helper('kaas_category')->getCategoryInfo($category,1);
91
-
92
- $result[] = $category_info;
93
-
94
- foreach ($node->getChildren() as $child) {
95
- $result = array_merge($result,$this->_nodeToArray($child));
 
 
 
 
 
 
 
 
 
 
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 = Mage::Helper('kaas_product')->getProductInfo($product);
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 = Mage::Helper('kaas_product')->getProductInfo($product);
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 = Mage::Helper('kaas_product')->getProductInfo($product);
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 = Mage::Helper('kaas_product')->getProductInfo($product);
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.0</version>
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.0</version>
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&#x2019;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-03-24</date>
14
- <time>15:08:45</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="d7ab70ef0fcd3ef76fba644ac65657b9"/></dir><file name="Data.php" hash="1d1e87fac121929c349a46a9f7877952"/></dir><file name="Data.php" hash="bd38134d9a36590307269b333723941e"/><dir name="Product"><dir name="Category"><file name="Data.php" hash="c30cbcdc5d00d4a7390f588d6f580c8c"/></dir><file name="Data.php" hash="02e2d01b1d5700e894cafbb46a339e6d"/><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="6608d4b4201dd3da09ad72bb6f42229d"/></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="648985181c2613673970f3be39583668"/></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="ff7beb17b9aac0c81b9a05bc5ba615db"/><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>
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&#x2019;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>