sellbrite - Version 1.1.0

Version Notes

Major overhaul to extension, which enables greater capabilities within the Sellbrite platform. Better support for configurable products and orders.

Download this release

Release Info

Developer Sellbrite
Extension sellbrite
Version 1.1.0
Comparing to
See all releases


Code changes from version 1.0.3 to 1.1.0

app/code/community/Sellbrite/Api/Block/Adminhtml/System/Config/Fieldset/Hint.php CHANGED
@@ -1,13 +1,178 @@
1
  <?php
2
-
 
 
 
 
3
  class Sellbrite_Api_Block_Adminhtml_System_Config_Fieldset_Hint
4
  extends Mage_Adminhtml_Block_Abstract
5
  implements Varien_Data_Form_Element_Renderer_Interface
6
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  protected $_template = 'sellbrite/api/system/config/fieldset/hint.phtml';
8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  public function render(Varien_Data_Form_Element_Abstract $element)
10
  {
11
  return $this->toHtml();
12
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  }
1
  <?php
2
+ /**
3
+ * Class Sellbrite_Api_Block_Adminhtml_System_Config_Fieldset_Hint
4
+ *
5
+ * Sellbrite API fieldset renderer
6
+ */
7
  class Sellbrite_Api_Block_Adminhtml_System_Config_Fieldset_Hint
8
  extends Mage_Adminhtml_Block_Abstract
9
  implements Varien_Data_Form_Element_Renderer_Interface
10
  {
11
+ /**
12
+ * Minimal supported Magento version
13
+ *
14
+ * @var string
15
+ */
16
+ protected $minVersion = '1.7.0.0';
17
+
18
+ /**
19
+ * Maximum supported Magento version
20
+ *
21
+ * @var string
22
+ */
23
+ protected $maxVersion = '1.9.1.1';
24
+
25
+ /**
26
+ * Fieldset render template
27
+ *
28
+ * @var string
29
+ */
30
  protected $_template = 'sellbrite/api/system/config/fieldset/hint.phtml';
31
 
32
+ /**
33
+ * @var Sellbrite_Api_Model_Credentials
34
+ */
35
+ protected $credentials;
36
+
37
+ /**
38
+ * @param array $args
39
+ */
40
+ public function __construct(array $args = array())
41
+ {
42
+ parent::__construct($args);
43
+ $this->credentials = Mage::getSingleton('sellbrite_api/credentials');
44
+ }
45
+
46
+ /**
47
+ * Render fieldset
48
+ *
49
+ * @param Varien_Data_Form_Element_Abstract $element
50
+ * @return string
51
+ */
52
  public function render(Varien_Data_Form_Element_Abstract $element)
53
  {
54
  return $this->toHtml();
55
  }
56
+
57
+ /**
58
+ * Get min version
59
+ *
60
+ * @return string
61
+ */
62
+ public function getMinVersion()
63
+ {
64
+ return $this->minVersion;
65
+ }
66
+
67
+ /**
68
+ * Get max version
69
+ *
70
+ * @return string
71
+ */
72
+ public function getMaxVersion()
73
+ {
74
+ return $this->maxVersion;
75
+ }
76
+
77
+ /**
78
+ * Check if current Magento version is supported by extension
79
+ *
80
+ * @return bool
81
+ */
82
+ public function isSupportedVersion()
83
+ {
84
+ $version = $this->getMagentoVersion();
85
+ return version_compare($version, $this->minVersion, '>=') && version_compare($version, $this->maxVersion, '<=');
86
+ }
87
+
88
+ /**
89
+ * Get current Magento version
90
+ *
91
+ * @return string
92
+ */
93
+ public function getMagentoVersion()
94
+ {
95
+ return Mage::getVersion();
96
+ }
97
+
98
+ /**
99
+ * Get consumer key
100
+ *
101
+ * @return string
102
+ */
103
+ public function getConsumerKey()
104
+ {
105
+ return $this->credentials->getConsumerKey();
106
+ }
107
+
108
+ /**
109
+ * Get consumer secret
110
+ *
111
+ * @return string
112
+ */
113
+ public function getConsumerSecret()
114
+ {
115
+ return $this->credentials->getConsumerSecret();
116
+ }
117
+
118
+ /**
119
+ * Get access key
120
+ *
121
+ * @return string
122
+ */
123
+ public function getAccessToken()
124
+ {
125
+ return $this->credentials->getAccessToken();
126
+ }
127
+
128
+ /**
129
+ * Get access secret
130
+ *
131
+ * @return string
132
+ */
133
+ public function getAccessSecret()
134
+ {
135
+ return $this->credentials->getAccessSecret();
136
+ }
137
+
138
+ /**
139
+ * Get SOAP user
140
+ *
141
+ * @return string
142
+ */
143
+ public function getSoapUser()
144
+ {
145
+ return $this->credentials->getSoapUser();
146
+ }
147
+
148
+
149
+ /**
150
+ * Get site URL
151
+ *
152
+ * @return string
153
+ */
154
+ public function getSiteURL()
155
+ {
156
+ return $this->credentials->getSiteURL();
157
+ }
158
+
159
+ /**
160
+ * Get Sellbrite end point URL
161
+ *
162
+ * @return string
163
+ */
164
+ public function getEndPointUrl()
165
+ {
166
+ return $this->credentials->getEndPointUrl();
167
+ }
168
+
169
+ /**
170
+ * Get API Key
171
+ *
172
+ * @return string
173
+ */
174
+ public function getApiKey()
175
+ {
176
+ return $this->credentials->getApiKey();
177
+ }
178
  }
app/code/community/Sellbrite/Api/Helper/Catalog/Product.php DELETED
@@ -1,232 +0,0 @@
1
- <?php
2
-
3
- class Sellbrite_Api_Helper_Catalog_Product extends Mage_Core_Helper_Abstract
4
- {
5
- const CATEGORIES_SEPARATOR_PATH_XML = 'sellbrite_api/config/categories_separator';
6
-
7
- /**
8
- * @param Mage_Catalog_Model_Product $product
9
- * @param array $simpleSkus
10
- * @param array $priceChanges
11
- * @return Sellbrite_Api_Helper_Catalog_Product
12
- */
13
- public function associateProducts(Mage_Catalog_Model_Product $product, $simpleSkus, $priceChanges = array(), $configurableAttributes = array())
14
- {
15
- if (!empty($simpleSkus)) {
16
- $newProductIds = Mage::getModel('catalog/product')->getCollection()
17
- ->addFieldToFilter('sku', array('in' => (array) $simpleSkus))
18
- ->addFieldToFilter('type_id', Mage_Catalog_Model_Product_Type::TYPE_SIMPLE)
19
- ->getAllIds();
20
-
21
- $oldProductIds = Mage::getModel('catalog/product_type_configurable')->setProduct($product)->getUsedProductCollection()
22
- ->addAttributeToSelect('*')
23
- ->addFilterByRequiredOptions()
24
- ->getAllIds();
25
-
26
- $usedProductIds = array_unique(array_merge($newProductIds, $oldProductIds));
27
-
28
- if (!empty($usedProductIds)) {
29
- if ($product->isConfigurable()) {
30
- $this->_initConfigurableAttributesData($product, $usedProductIds, $priceChanges, $configurableAttributes);
31
- } elseif ($product->isGrouped()) {
32
- $relations = array_fill_keys($usedProductIds, array('qty' => 0, 'position' => 0));
33
- $product->setGroupedLinkData($relations);
34
- }
35
- }
36
- }
37
-
38
- return $this;
39
- }
40
-
41
- /**
42
- * @param array $categoryNames
43
- * @return array
44
- */
45
- public function getCategoryIdsByNames($categoryNames)
46
- {
47
- $categories = array();
48
- $separator = $this->_getCatagoriesSeparator();
49
- foreach ($categoryNames as $category) {
50
- if (is_string($category) && !is_numeric($category)) {
51
- $pieces = explode($separator, $category);
52
- $addCategories = array();
53
- $parentIds = array();
54
- foreach ($pieces as $level => $name) {
55
- $collection = Mage::getModel('catalog/category')->getCollection()
56
- ->setStoreId(0)
57
- ->addFieldToFilter('level', $level + 2)
58
- ->addAttributeToFilter('name', $name);
59
- if (!empty($parentIds)) {
60
- $collection->getSelect()->where('parent_id IN (?)', $parentIds);
61
- }
62
- if ($collection->count()) {
63
- foreach ($collection as $category) {
64
- $addCategories[] = (int) $category->getId();
65
- if ($level > 0) {
66
- $addCategories[] = (int) $category->getParentId();
67
- }
68
- $parentIds[] = $category->getId();
69
- }
70
- } else {
71
- if ($level > 0) {
72
- $parentId = end($parentIds);
73
- } else {
74
- $parentId = Mage::app()->getWebsite(1)->getDefaultStore()->getRootCategoryId();
75
- }
76
- $newCategoryId = $this->createCategory($name, $parentId);
77
- $addCategories[] = $newCategoryId;
78
- $parentIds[] = $newCategoryId;
79
- }
80
- }
81
- if (!empty($addCategories)) {
82
- $categories = array_merge($categories, $addCategories);
83
- }
84
- }
85
- }
86
-
87
- return !empty($categories) ? $categories : $categoryNames;
88
- }
89
-
90
- /**
91
- * @param string $name
92
- * @param int|string $parentId
93
- * @return string
94
- */
95
- public function createCategory($name, $parentId)
96
- {
97
- $category = Mage::getModel('catalog/category');
98
- $parentCategory = Mage::getModel('catalog/category')->load($parentId);
99
-
100
- $category->setName($name)
101
- ->setIsActive(1)
102
- ->setPath($parentCategory->getPath());
103
- $category->save();
104
-
105
- return $category->getId();
106
- }
107
-
108
- /**
109
- * @param string $attributeCode
110
- * @param string $label
111
- * @return mixed
112
- */
113
- public function getOptionKeyByLabel($attributeCode, $label)
114
- {
115
- $attribute = Mage::getModel('catalog/product')->getResource()
116
- ->getAttribute($attributeCode);
117
- if ($attribute && $attribute->getId() && $attribute->usesSource()) {
118
- foreach ($attribute->getSource()->getAllOptions(true, true) as $option) {
119
- if ($label == $option['label'] || $label == $option['value']) {
120
- return $option['value'];
121
- }
122
- }
123
- }
124
-
125
- // if ($newOptionId = $this->createOption($attribute, $label)) {
126
- // return $newOptionId;
127
- // }
128
-
129
- return $label;
130
- }
131
-
132
- /**
133
- * @param Mage_Catalog_Model_Resource_Eav_Attribute $attribute
134
- * @param string $label
135
- * @return string|null
136
- */
137
- public function createOption(Mage_Catalog_Model_Resource_Eav_Attribute $attribute, $label)
138
- {
139
- $option = array(
140
- 'value' => array(
141
- 'option' => array($label)
142
- )
143
- );
144
- $attribute->setOption($option);
145
- $attribute->save();
146
-
147
- $optionId = Mage::getModel('eav/entity_attribute_source_table')
148
- ->setAttribute($attribute)
149
- ->getOptionId($label);
150
-
151
- return $optionId;
152
- }
153
-
154
- protected function _getCatagoriesSeparator()
155
- {
156
- return Mage::getStoreConfig(self::CATEGORIES_SEPARATOR_PATH_XML);
157
- }
158
-
159
- /**
160
- * @param Mage_Catalog_Model_Product $mainProduct
161
- * @param array $simpleProductIds
162
- * @param array $priceChanges
163
- * @return Sellbrite_Api_Helper_Catalog_Product
164
- */
165
- protected function _initConfigurableAttributesData(Mage_Catalog_Model_Product $mainProduct, $simpleProductIds, $priceChanges = array(), $configurableAttributes = array())
166
- {
167
- if (!$mainProduct->isConfigurable() || empty($simpleProductIds)) {
168
- return $this;
169
- }
170
-
171
- $mainProduct->setConfigurableProductsData(array_flip($simpleProductIds));
172
- $productType = $mainProduct->getTypeInstance(true);
173
- $productType->setProduct($mainProduct);
174
- $attributesData = $productType->getConfigurableAttributesAsArray();
175
-
176
- if (empty($attributesData)) {
177
- // Auto generation if configurable product has no attribute
178
- $attributeIds = array();
179
- foreach ($productType->getSetAttributes() as $attribute) {
180
- if ($productType->canUseAttribute($attribute)) {
181
- $attributeIds[] = $attribute->getAttributeId();
182
- }
183
- }
184
- $productType->setUsedProductAttributeIds($attributeIds);
185
- $attributesData = $productType->getConfigurableAttributesAsArray();
186
- }
187
- if (!empty($configurableAttributes)){
188
- foreach ($attributesData as $idx => $val) {
189
- if (!in_array($val['attribute_code'], $configurableAttributes)) {
190
- unset($attributesData[$idx]);
191
- }
192
- }
193
- }
194
-
195
- $products = Mage::getModel('catalog/product')->getCollection()
196
- ->addIdFilter($simpleProductIds);
197
-
198
- if (count($products)) {
199
- foreach ($attributesData as &$attribute) {
200
- $attribute['label'] = $attribute['frontend_label'];
201
- $attributeCode = $attribute['attribute_code'];
202
- foreach ($products as $product) {
203
- $product->load($product->getId());
204
- $optionId = $product->getData($attributeCode);
205
- $isPercent = 0;
206
- $priceChange = 0;
207
- if (!empty($priceChanges) && isset($priceChanges[$attributeCode])) {
208
- $optionText = $product->getResource()
209
- ->getAttribute($attribute['attribute_code'])
210
- ->getSource()
211
- ->getOptionText($optionId);
212
- if (isset($priceChanges[$attributeCode][$optionText])) {
213
- if (false !== strpos($priceChanges[$attributeCode][$optionText], '%')) {
214
- $isPercent = 1;
215
- }
216
- $priceChange = preg_replace('/[^0-9\.,-]/', '', $priceChanges[$attributeCode][$optionText]);
217
- $priceChange = (float) str_replace(',', '.', $priceChange);
218
- }
219
- }
220
- $attribute['values'][$optionId] = array(
221
- 'value_index' => $optionId,
222
- 'is_percent' => $isPercent,
223
- 'pricing_value' => $priceChange,
224
- );
225
- }
226
- }
227
- $mainProduct->setConfigurableAttributesData($attributesData);
228
- }
229
-
230
- return $this;
231
- }
232
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Sellbrite/Api/Helper/Data.php CHANGED
@@ -1,14 +1,8 @@
1
  <?php
2
-
3
- class Sellbrite_Api_Helper_Data extends Mage_Core_Helper_Abstract
 
 
4
  {
5
- /**
6
- * @param string $attrSetName
7
- * @return string
8
- */
9
- public function getAttributeSetIdByName($attrSetName, $entityType = 'catalog_product')
10
- {
11
- return Mage::getSingleton('catalog/config')
12
- ->getAttributeSetId($entityType, $attrSetName);
13
- }
14
  }
1
  <?php
2
+ /**
3
+ * Class Sellbrite_Api_Helper_Data
4
+ */
5
+ class Sellbrite_Api_Helper_Data extends Mage_Core_Helper_Data
6
  {
7
+
 
 
 
 
 
 
 
 
8
  }
app/code/community/Sellbrite/Api/Model/Catalog/Api2/Product/Rest/Admin/V1/Interceptor.php ADDED
@@ -0,0 +1,1037 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class Sellbrite_Api_Model_Catalog_Api2_Product_Rest_Admin_V1_Interceptor
4
+ *
5
+ * How To Extend a Logic of This Class?
6
+ *
7
+ * This class is designed to provide new extension points for overridden class Mage_Catalog_Model_Api2_Product_Rest_Admin_V1
8
+ * Every extension can decorate/pluginize all methods of Mage_Catalog_Model_Api2_Product_Rest_Admin_V1 (public and protected)
9
+ * using config.xml file. Please, declare your configuration in the following format:
10
+ * <config>
11
+ * <global>
12
+ * <catalog_product_list_item_plugins>
13
+ * <{intercepted_method_name}>
14
+ * <{strategy_type}>
15
+ * <any_node_name>namespace_module/class_name</any_node_name>
16
+ * </{strategy_type}>
17
+ * </{intercepted_method_name}>
18
+ * </catalog_product_list_item_plugins>
19
+ * </global>
20
+ * </config>
21
+ *
22
+ * where {intercepted_method_name} - one of the method of Mage_Catalog_Model_Api2_Product_Rest_Admin_V1,
23
+ * {strategy_type} - interception strategy type:
24
+ * - before (method invokeBefore of your class will be called before original call),
25
+ * - after (method invokeAfter of your class will be called after original call),
26
+ * - around (method invokeAround of your class will be called instead of original call)
27
+ */
28
+ class Sellbrite_Api_Model_Catalog_Api2_Product_Rest_Admin_V1_Interceptor extends
29
+ Mage_Catalog_Model_Api2_Product_Rest_Admin_V1
30
+ {
31
+ const LISTENER_BEFORE = 'before';
32
+ const LISTENER_AROUND = 'around';
33
+ const LISTENER_AFTER = 'after';
34
+
35
+ /**
36
+ * Get declared plugins
37
+ *
38
+ * @param string $methodName
39
+ * @return array|null
40
+ */
41
+ protected function _getPluginsInfo($methodName)
42
+ {
43
+ $pluginInfo = Mage::getConfig()->getNode(
44
+ 'global/catalog_product_list_item_plugins/' . $methodName
45
+ );
46
+
47
+ if (!$pluginInfo) {
48
+ return null;
49
+ }
50
+ return $pluginInfo->asArray();
51
+ }
52
+
53
+ /**
54
+ * Call plugins
55
+ *
56
+ * @param string $method
57
+ * @param array $arguments
58
+ * @param array $pluginInfo
59
+ * @return mixed
60
+ */
61
+ protected function ___callPlugins($method, array $arguments, array $pluginInfo)
62
+ {
63
+ $result = null;
64
+ if (isset($pluginInfo[self::LISTENER_BEFORE])) {
65
+ // Call 'before' listeners
66
+ foreach ($pluginInfo[self::LISTENER_BEFORE] as $code) {
67
+ $beforeResult = call_user_func_array(array(Mage::getSingleton($code), 'invokeBefore'), $arguments);
68
+ if ($beforeResult) {
69
+ $arguments = $beforeResult;
70
+ }
71
+ }
72
+ }
73
+
74
+ if (isset($pluginInfo[self::LISTENER_AROUND])) {
75
+ // Call 'around' listener
76
+ foreach ($pluginInfo[self::LISTENER_AFTER] as $code) {
77
+ $result = call_user_func_array(
78
+ array(Mage::getSingleton($code), 'invokeAround'),
79
+ array_merge($arguments, $result)
80
+ );
81
+ }
82
+ } else {
83
+ // Call original method
84
+ $result = call_user_func_array(array('parent', $method), $arguments);
85
+ }
86
+
87
+ if (isset($pluginInfo[self::LISTENER_AFTER])) {
88
+ // Call 'after' listeners
89
+ foreach ($pluginInfo[self::LISTENER_AFTER] as $code) {
90
+ $result = call_user_func_array(array(Mage::getSingleton($code), 'invokeAfter'), array($result));
91
+ }
92
+ }
93
+ return $result;
94
+ }
95
+
96
+
97
+ //======================================= Start Auto-generated Code ======================================//
98
+
99
+ /**
100
+ * {@inheritdoc}
101
+ */
102
+ public function getAvailableAttributes($userType, $operation)
103
+ {
104
+ $pluginInfo = $this->_getPluginsInfo('getAvailableAttributes');
105
+ if (!$pluginInfo) {
106
+ return parent::getAvailableAttributes($userType, $operation);
107
+ } else {
108
+ return $this->___callPlugins('getAvailableAttributes', func_get_args(), $pluginInfo);
109
+ }
110
+ }
111
+
112
+ /**
113
+ * {@inheritdoc}
114
+ */
115
+ protected function _isAttributeVisible(Mage_Catalog_Model_Resource_Eav_Attribute $attribute, $userType)
116
+ {
117
+ $pluginInfo = $this->_getPluginsInfo('_isAttributeVisible');
118
+ if (!$pluginInfo) {
119
+ return parent::_isAttributeVisible($attribute, $userType);
120
+ } else {
121
+ return $this->___callPlugins('_isAttributeVisible', func_get_args(), $pluginInfo);
122
+ }
123
+ }
124
+
125
+ /**
126
+ * {@inheritdoc}
127
+ */
128
+ public function dispatch()
129
+ {
130
+ $pluginInfo = $this->_getPluginsInfo('dispatch');
131
+ if (!$pluginInfo) {
132
+ parent::dispatch();
133
+ } else {
134
+ return $this->___callPlugins('dispatch', func_get_args(), $pluginInfo);
135
+ }
136
+ }
137
+
138
+ /**
139
+ * {@inheritdoc}
140
+ */
141
+ protected function _errorIfMethodNotExist($methodName)
142
+ {
143
+ $pluginInfo = $this->_getPluginsInfo('_errorIfMethodNotExist');
144
+ if (!$pluginInfo) {
145
+ parent::_errorIfMethodNotExist($methodName);
146
+ } else {
147
+ return $this->___callPlugins('_errorIfMethodNotExist', func_get_args(), $pluginInfo);
148
+ }
149
+ }
150
+
151
+ /**
152
+ * {@inheritdoc}
153
+ */
154
+ protected function _checkMethodExist($methodName)
155
+ {
156
+ $pluginInfo = $this->_getPluginsInfo('_checkMethodExist');
157
+ if (!$pluginInfo) {
158
+ return parent::_checkMethodExist($methodName);
159
+ } else {
160
+ return $this->___callPlugins('_checkMethodExist', func_get_args(), $pluginInfo);
161
+ }
162
+ }
163
+
164
+ /**
165
+ * {@inheritdoc}
166
+ */
167
+ public function getRequest()
168
+ {
169
+ $pluginInfo = $this->_getPluginsInfo('getRequest');
170
+ if (!$pluginInfo) {
171
+ return parent::getRequest();
172
+ } else {
173
+ return $this->___callPlugins('getRequest', func_get_args(), $pluginInfo);
174
+ }
175
+ }
176
+
177
+ /**
178
+ * {@inheritdoc}
179
+ */
180
+ public function setRequest(Mage_Api2_Model_Request $request)
181
+ {
182
+ $pluginInfo = $this->_getPluginsInfo('setRequest');
183
+ if (!$pluginInfo) {
184
+ return parent::setRequest($request);
185
+ } else {
186
+ return $this->___callPlugins('setRequest', func_get_args(), $pluginInfo);
187
+ }
188
+ }
189
+
190
+ /**
191
+ * {@inheritdoc}
192
+ */
193
+ public function getResourceType()
194
+ {
195
+ $pluginInfo = $this->_getPluginsInfo('getResourceType');
196
+ if (!$pluginInfo) {
197
+ return parent::getResourceType();
198
+ } else {
199
+ return $this->___callPlugins('getResourceType', func_get_args(), $pluginInfo);
200
+ }
201
+ }
202
+
203
+ /**
204
+ * {@inheritdoc}
205
+ */
206
+ public function setResourceType($resourceType)
207
+ {
208
+ $pluginInfo = $this->_getPluginsInfo('setResourceType');
209
+ if (!$pluginInfo) {
210
+ return parent::setResourceType($resourceType);
211
+ } else {
212
+ return $this->___callPlugins('setResourceType', func_get_args(), $pluginInfo);
213
+ }
214
+ }
215
+
216
+ /**
217
+ * {@inheritdoc}
218
+ */
219
+ public function getApiType()
220
+ {
221
+ $pluginInfo = $this->_getPluginsInfo('getApiType');
222
+ if (!$pluginInfo) {
223
+ return parent::getApiType();
224
+ } else {
225
+ return $this->___callPlugins('getApiType', func_get_args(), $pluginInfo);
226
+ }
227
+ }
228
+
229
+ /**
230
+ * {@inheritdoc}
231
+ */
232
+ public function setApiType($apiType)
233
+ {
234
+ $pluginInfo = $this->_getPluginsInfo('setApiType');
235
+ if (!$pluginInfo) {
236
+ return parent::setApiType($apiType);
237
+ } else {
238
+ return $this->___callPlugins('setApiType', func_get_args(), $pluginInfo);
239
+ }
240
+ }
241
+
242
+ /**
243
+ * {@inheritdoc}
244
+ */
245
+ public function getVersion()
246
+ {
247
+ $pluginInfo = $this->_getPluginsInfo('getVersion');
248
+ if (!$pluginInfo) {
249
+ return parent::getVersion();
250
+ } else {
251
+ return $this->___callPlugins('getVersion', func_get_args(), $pluginInfo);
252
+ }
253
+ }
254
+
255
+ /**
256
+ * {@inheritdoc}
257
+ */
258
+ public function setVersion($version)
259
+ {
260
+ $pluginInfo = $this->_getPluginsInfo('setVersion');
261
+ if (!$pluginInfo) {
262
+ parent::setVersion($version);
263
+ } else {
264
+ return $this->___callPlugins('setVersion', func_get_args(), $pluginInfo);
265
+ }
266
+ }
267
+
268
+ /**
269
+ * {@inheritdoc}
270
+ */
271
+ public function getResponse()
272
+ {
273
+ $pluginInfo = $this->_getPluginsInfo('getResponse');
274
+ if (!$pluginInfo) {
275
+ return parent::getResponse();
276
+ } else {
277
+ return $this->___callPlugins('getResponse', func_get_args(), $pluginInfo);
278
+ }
279
+ }
280
+
281
+ /**
282
+ * {@inheritdoc}
283
+ */
284
+ public function setResponse(Mage_Api2_Model_Response $response)
285
+ {
286
+ $pluginInfo = $this->_getPluginsInfo('setResponse');
287
+ if (!$pluginInfo) {
288
+ parent::setResponse($response);
289
+ } else {
290
+ return $this->___callPlugins('setResponse', func_get_args(), $pluginInfo);
291
+ }
292
+ }
293
+
294
+ /**
295
+ * {@inheritdoc}
296
+ */
297
+ public function getFilter()
298
+ {
299
+ $pluginInfo = $this->_getPluginsInfo('getFilter');
300
+ if (!$pluginInfo) {
301
+ return parent::getFilter();
302
+ } else {
303
+ return $this->___callPlugins('getFilter', func_get_args(), $pluginInfo);
304
+ }
305
+ }
306
+
307
+ /**
308
+ * {@inheritdoc}
309
+ */
310
+ public function setFilter(Mage_Api2_Model_Acl_Filter $filter)
311
+ {
312
+ $pluginInfo = $this->_getPluginsInfo('setFilter');
313
+ if (!$pluginInfo) {
314
+ parent::setFilter($filter);
315
+ } else {
316
+ return $this->___callPlugins('setFilter', func_get_args(), $pluginInfo);
317
+ }
318
+ }
319
+
320
+ /**
321
+ * {@inheritdoc}
322
+ */
323
+ public function getRenderer()
324
+ {
325
+ $pluginInfo = $this->_getPluginsInfo('getRenderer');
326
+ if (!$pluginInfo) {
327
+ return parent::getRenderer();
328
+ } else {
329
+ return $this->___callPlugins('getRenderer', func_get_args(), $pluginInfo);
330
+ }
331
+ }
332
+
333
+ /**
334
+ * {@inheritdoc}
335
+ */
336
+ public function setRenderer(Mage_Api2_Model_Renderer_Interface $renderer)
337
+ {
338
+ $pluginInfo = $this->_getPluginsInfo('setRenderer');
339
+ if (!$pluginInfo) {
340
+ parent::setRenderer($renderer);
341
+ } else {
342
+ return $this->___callPlugins('setRenderer', func_get_args(), $pluginInfo);
343
+ }
344
+ }
345
+
346
+ /**
347
+ * {@inheritdoc}
348
+ */
349
+ public function getUserType()
350
+ {
351
+ $pluginInfo = $this->_getPluginsInfo('getUserType');
352
+ if (!$pluginInfo) {
353
+ return parent::getUserType();
354
+ } else {
355
+ return $this->___callPlugins('getUserType', func_get_args(), $pluginInfo);
356
+ }
357
+ }
358
+
359
+ /**
360
+ * {@inheritdoc}
361
+ */
362
+ public function setUserType($userType)
363
+ {
364
+ $pluginInfo = $this->_getPluginsInfo('setUserType');
365
+ if (!$pluginInfo) {
366
+ return parent::setUserType($userType);
367
+ } else {
368
+ return $this->___callPlugins('setUserType', func_get_args(), $pluginInfo);
369
+ }
370
+ }
371
+
372
+ /**
373
+ * {@inheritdoc}
374
+ */
375
+ public function getApiUser()
376
+ {
377
+ $pluginInfo = $this->_getPluginsInfo('getApiUser');
378
+ if (!$pluginInfo) {
379
+ return parent::getApiUser();
380
+ } else {
381
+ return $this->___callPlugins('getApiUser', func_get_args(), $pluginInfo);
382
+ }
383
+ }
384
+
385
+ /**
386
+ * {@inheritdoc}
387
+ */
388
+ public function setApiUser(Mage_Api2_Model_Auth_User_Abstract $apiUser)
389
+ {
390
+ $pluginInfo = $this->_getPluginsInfo('setApiUser');
391
+ if (!$pluginInfo) {
392
+ return parent::setApiUser($apiUser);
393
+ } else {
394
+ return $this->___callPlugins('setApiUser', func_get_args(), $pluginInfo);
395
+ }
396
+ }
397
+
398
+ /**
399
+ * {@inheritdoc}
400
+ */
401
+ public function getActionType()
402
+ {
403
+ $pluginInfo = $this->_getPluginsInfo('getActionType');
404
+ if (!$pluginInfo) {
405
+ return parent::getActionType();
406
+ } else {
407
+ return $this->___callPlugins('getActionType', func_get_args(), $pluginInfo);
408
+ }
409
+ }
410
+
411
+ /**
412
+ * {@inheritdoc}
413
+ */
414
+ public function setActionType($actionType)
415
+ {
416
+ $pluginInfo = $this->_getPluginsInfo('setActionType');
417
+ if (!$pluginInfo) {
418
+ return parent::setActionType($actionType);
419
+ } else {
420
+ return $this->___callPlugins('setActionType', func_get_args(), $pluginInfo);
421
+ }
422
+ }
423
+
424
+ /**
425
+ * {@inheritdoc}
426
+ */
427
+ public function getOperation()
428
+ {
429
+ $pluginInfo = $this->_getPluginsInfo('getOperation');
430
+ if (!$pluginInfo) {
431
+ return parent::getOperation();
432
+ } else {
433
+ return $this->___callPlugins('getOperation', func_get_args(), $pluginInfo);
434
+ }
435
+ }
436
+
437
+ /**
438
+ * {@inheritdoc}
439
+ */
440
+ public function setOperation($operation)
441
+ {
442
+ $pluginInfo = $this->_getPluginsInfo('setOperation');
443
+ if (!$pluginInfo) {
444
+ return parent::setOperation($operation);
445
+ } else {
446
+ return $this->___callPlugins('setOperation', func_get_args(), $pluginInfo);
447
+ }
448
+ }
449
+
450
+ /**
451
+ * {@inheritdoc}
452
+ */
453
+ public function getConfig()
454
+ {
455
+ $pluginInfo = $this->_getPluginsInfo('getConfig');
456
+ if (!$pluginInfo) {
457
+ return parent::getConfig();
458
+ } else {
459
+ return $this->___callPlugins('getConfig', func_get_args(), $pluginInfo);
460
+ }
461
+ }
462
+
463
+ /**
464
+ * {@inheritdoc}
465
+ */
466
+ public function getWorkingModel()
467
+ {
468
+ $pluginInfo = $this->_getPluginsInfo('getWorkingModel');
469
+ if (!$pluginInfo) {
470
+ return parent::getWorkingModel();
471
+ } else {
472
+ return $this->___callPlugins('getWorkingModel', func_get_args(), $pluginInfo);
473
+ }
474
+ }
475
+
476
+ /**
477
+ * {@inheritdoc}
478
+ */
479
+ protected function _render($data)
480
+ {
481
+ $pluginInfo = $this->_getPluginsInfo('_render');
482
+ if (!$pluginInfo) {
483
+ parent::_render($data);
484
+ } else {
485
+ return $this->___callPlugins('_render', func_get_args(), $pluginInfo);
486
+ }
487
+ }
488
+
489
+ /**
490
+ * {@inheritdoc}
491
+ */
492
+ protected function _critical($message, $code = null)
493
+ {
494
+ $pluginInfo = $this->_getPluginsInfo('_critical');
495
+ if (!$pluginInfo) {
496
+ parent::_critical($message, $code);
497
+ } else {
498
+ return $this->___callPlugins('_critical', func_get_args(), $pluginInfo);
499
+ }
500
+ }
501
+
502
+ /**
503
+ * {@inheritdoc}
504
+ */
505
+ protected function _getCriticalErrors()
506
+ {
507
+ $pluginInfo = $this->_getPluginsInfo('_getCriticalErrors');
508
+ if (!$pluginInfo) {
509
+ return parent::_getCriticalErrors();
510
+ } else {
511
+ return $this->___callPlugins('_getCriticalErrors', func_get_args(), $pluginInfo);
512
+ }
513
+ }
514
+
515
+ /**
516
+ * {@inheritdoc}
517
+ */
518
+ protected function _error($message, $code)
519
+ {
520
+ $pluginInfo = $this->_getPluginsInfo('_error');
521
+ if (!$pluginInfo) {
522
+ return parent::_error($message, $code);
523
+ } else {
524
+ return $this->___callPlugins('_error', func_get_args(), $pluginInfo);
525
+ }
526
+ }
527
+
528
+ /**
529
+ * {@inheritdoc}
530
+ */
531
+ protected function _successMessage($message, $code, $params = array())
532
+ {
533
+ $pluginInfo = $this->_getPluginsInfo('_successMessage');
534
+ if (!$pluginInfo) {
535
+ return parent::_successMessage($message, $code, $params);
536
+ } else {
537
+ return $this->___callPlugins('_successMessage', func_get_args(), $pluginInfo);
538
+ }
539
+ }
540
+
541
+ /**
542
+ * {@inheritdoc}
543
+ */
544
+ protected function _errorMessage($message, $code, $params = array())
545
+ {
546
+ $pluginInfo = $this->_getPluginsInfo('_errorMessage');
547
+ if (!$pluginInfo) {
548
+ return parent::_errorMessage($message, $code, $params);
549
+ } else {
550
+ return $this->___callPlugins('_errorMessage', func_get_args(), $pluginInfo);
551
+ }
552
+ }
553
+
554
+ /**
555
+ * {@inheritdoc}
556
+ */
557
+ protected function _applyFilter(Varien_Data_Collection_Db $collection)
558
+ {
559
+ $pluginInfo = $this->_getPluginsInfo('_applyFilter');
560
+ if (!$pluginInfo) {
561
+ return parent::_applyFilter($collection);
562
+ } else {
563
+ return $this->___callPlugins('_applyFilter', func_get_args(), $pluginInfo);
564
+ }
565
+ }
566
+
567
+ /**
568
+ * {@inheritdoc}
569
+ */
570
+ protected function _multicall($resourceInstanceId)
571
+ {
572
+ $pluginInfo = $this->_getPluginsInfo('_multicall');
573
+ if (!$pluginInfo) {
574
+ return parent::_multicall($resourceInstanceId);
575
+ } else {
576
+ return $this->___callPlugins('_multicall', func_get_args(), $pluginInfo);
577
+ }
578
+ }
579
+
580
+ /**
581
+ * {@inheritdoc}
582
+ */
583
+ protected function _getSubModel($resourceId, array $requestParams)
584
+ {
585
+ $pluginInfo = $this->_getPluginsInfo('_getSubModel');
586
+ if (!$pluginInfo) {
587
+ return parent::_getSubModel($resourceId, $requestParams);
588
+ } else {
589
+ return $this->___callPlugins('_getSubModel', func_get_args(), $pluginInfo);
590
+ }
591
+ }
592
+
593
+ /**
594
+ * {@inheritdoc}
595
+ */
596
+ protected function _isSubCallAllowed($resourceId)
597
+ {
598
+ $pluginInfo = $this->_getPluginsInfo('_isSubCallAllowed');
599
+ if (!$pluginInfo) {
600
+ return parent::_isSubCallAllowed($resourceId);
601
+ } else {
602
+ return $this->___callPlugins('_isSubCallAllowed', func_get_args(), $pluginInfo);
603
+ }
604
+ }
605
+
606
+ /**
607
+ * {@inheritdoc}
608
+ */
609
+ public function setReturnData($flag)
610
+ {
611
+ $pluginInfo = $this->_getPluginsInfo('setReturnData');
612
+ if (!$pluginInfo) {
613
+ return parent::setReturnData($flag);
614
+ } else {
615
+ return $this->___callPlugins('setReturnData', func_get_args(), $pluginInfo);
616
+ }
617
+ }
618
+
619
+ /**
620
+ * {@inheritdoc}
621
+ */
622
+ protected function _getLocation($resource)
623
+ {
624
+ $pluginInfo = $this->_getPluginsInfo('_getLocation');
625
+ if (!$pluginInfo) {
626
+ return parent::_getLocation($resource);
627
+ } else {
628
+ return $this->___callPlugins('_getLocation', func_get_args(), $pluginInfo);
629
+ }
630
+ }
631
+
632
+ /**
633
+ * {@inheritdoc}
634
+ */
635
+ protected function _getResourceAttributes()
636
+ {
637
+ $pluginInfo = $this->_getPluginsInfo('_getResourceAttributes');
638
+ if (!$pluginInfo) {
639
+ return parent::_getResourceAttributes();
640
+ } else {
641
+ return $this->___callPlugins('_getResourceAttributes', func_get_args(), $pluginInfo);
642
+ }
643
+ }
644
+
645
+ /**
646
+ * {@inheritdoc}
647
+ */
648
+ public function getExcludedAttributes($userType, $operation)
649
+ {
650
+ $pluginInfo = $this->_getPluginsInfo('getExcludedAttributes');
651
+ if (!$pluginInfo) {
652
+ return parent::getExcludedAttributes($userType, $operation);
653
+ } else {
654
+ return $this->___callPlugins('getExcludedAttributes', func_get_args(), $pluginInfo);
655
+ }
656
+ }
657
+
658
+ /**
659
+ * {@inheritdoc}
660
+ */
661
+ public function getForcedAttributes()
662
+ {
663
+ $pluginInfo = $this->_getPluginsInfo('getForcedAttributes');
664
+ if (!$pluginInfo) {
665
+ return parent::getForcedAttributes();
666
+ } else {
667
+ return $this->___callPlugins('getForcedAttributes', func_get_args(), $pluginInfo);
668
+ }
669
+ }
670
+
671
+ /**
672
+ * {@inheritdoc}
673
+ */
674
+ public function getIncludedAttributes($userType, $operationType)
675
+ {
676
+ $pluginInfo = $this->_getPluginsInfo('getIncludedAttributes');
677
+ if (!$pluginInfo) {
678
+ return parent::getIncludedAttributes($userType, $operationType);
679
+ } else {
680
+ return $this->___callPlugins('getIncludedAttributes', func_get_args(), $pluginInfo);
681
+ }
682
+ }
683
+
684
+ /**
685
+ * {@inheritdoc}
686
+ */
687
+ public function getEntityOnlyAttributes($userType, $operationType)
688
+ {
689
+ $pluginInfo = $this->_getPluginsInfo('getEntityOnlyAttributes');
690
+ if (!$pluginInfo) {
691
+ return parent::getEntityOnlyAttributes($userType, $operationType);
692
+ } else {
693
+ return $this->___callPlugins('getEntityOnlyAttributes', func_get_args(), $pluginInfo);
694
+ }
695
+ }
696
+
697
+ /**
698
+ * {@inheritdoc}
699
+ */
700
+ public function getAvailableAttributesFromConfig()
701
+ {
702
+ $pluginInfo = $this->_getPluginsInfo('getAvailableAttributesFromConfig');
703
+ if (!$pluginInfo) {
704
+ return parent::getAvailableAttributesFromConfig();
705
+ } else {
706
+ return $this->___callPlugins('getAvailableAttributesFromConfig', func_get_args(), $pluginInfo);
707
+ }
708
+ }
709
+
710
+ /**
711
+ * {@inheritdoc}
712
+ */
713
+ public function getDbAttributes()
714
+ {
715
+ $pluginInfo = $this->_getPluginsInfo('getDbAttributes');
716
+ if (!$pluginInfo) {
717
+ return parent::getDbAttributes();
718
+ } else {
719
+ return $this->___callPlugins('getDbAttributes', func_get_args(), $pluginInfo);
720
+ }
721
+ }
722
+
723
+ /**
724
+ * {@inheritdoc}
725
+ */
726
+ public function getEavAttributes($onlyVisible = false, $excludeSystem = false)
727
+ {
728
+ $pluginInfo = $this->_getPluginsInfo('getEavAttributes');
729
+ if (!$pluginInfo) {
730
+ return parent::getEavAttributes($onlyVisible, $excludeSystem);
731
+ } else {
732
+ return $this->___callPlugins('getEavAttributes', func_get_args(), $pluginInfo);
733
+ }
734
+ }
735
+
736
+ /**
737
+ * {@inheritdoc}
738
+ */
739
+ protected function _getStore()
740
+ {
741
+ $pluginInfo = $this->_getPluginsInfo('_getStore');
742
+ if (!$pluginInfo) {
743
+ return parent::_getStore();
744
+ } else {
745
+ return $this->___callPlugins('_getStore', func_get_args(), $pluginInfo);
746
+ }
747
+ }
748
+
749
+ /**
750
+ * {@inheritdoc}
751
+ */
752
+ protected function _retrieve()
753
+ {
754
+ $pluginInfo = $this->_getPluginsInfo('_retrieve');
755
+ if (!$pluginInfo) {
756
+ return parent::_retrieve();
757
+ } else {
758
+ return $this->___callPlugins('_retrieve', func_get_args(), $pluginInfo);
759
+ }
760
+ }
761
+
762
+ /**
763
+ * {@inheritdoc}
764
+ */
765
+ protected function _applyCategoryFilter(Mage_Catalog_Model_Resource_Product_Collection $collection)
766
+ {
767
+ $pluginInfo = $this->_getPluginsInfo('_applyCategoryFilter');
768
+ if (!$pluginInfo) {
769
+ parent::_applyCategoryFilter($collection);
770
+ } else {
771
+ return $this->___callPlugins('_applyCategoryFilter', func_get_args(), $pluginInfo);
772
+ }
773
+ }
774
+
775
+ /**
776
+ * {@inheritdoc}
777
+ */
778
+ protected function _getProduct()
779
+ {
780
+ $pluginInfo = $this->_getPluginsInfo('_getProduct');
781
+ if (!$pluginInfo) {
782
+ return parent::_getProduct();
783
+ } else {
784
+ return $this->___callPlugins('_getProduct', func_get_args(), $pluginInfo);
785
+ }
786
+ }
787
+
788
+ /**
789
+ * {@inheritdoc}
790
+ */
791
+ protected function _setProduct(Mage_Catalog_Model_Product $product)
792
+ {
793
+ $pluginInfo = $this->_getPluginsInfo('_setProduct');
794
+ if (!$pluginInfo) {
795
+ parent::_setProduct($product);
796
+ } else {
797
+ return $this->___callPlugins('_setProduct', func_get_args(), $pluginInfo);
798
+ }
799
+ }
800
+
801
+ /**
802
+ * {@inheritdoc}
803
+ */
804
+ protected function _getCategoryById($categoryId)
805
+ {
806
+ $pluginInfo = $this->_getPluginsInfo('_getCategoryById');
807
+ if (!$pluginInfo) {
808
+ return parent::_getCategoryById($categoryId);
809
+ } else {
810
+ return $this->___callPlugins('_getCategoryById', func_get_args(), $pluginInfo);
811
+ }
812
+ }
813
+
814
+ /**
815
+ * {@inheritdoc}
816
+ */
817
+ protected function _getPrice($price, $includingTax = null, $shippingAddress = null,
818
+ $billingAddress = null, $ctc = null, $priceIncludesTax = null
819
+ )
820
+ {
821
+ $pluginInfo = $this->_getPluginsInfo('_getPrice');
822
+ if (!$pluginInfo) {
823
+ return parent::_getPrice($price, $includingTax, $shippingAddress, $billingAddress, $ctc, $priceIncludesTax);
824
+ } else {
825
+ return $this->___callPlugins('_getPrice', func_get_args(), $pluginInfo);
826
+ }
827
+ }
828
+
829
+ /**
830
+ * {@inheritdoc}
831
+ */
832
+ protected function _calculatePrice($price, $percent, $includeTax)
833
+ {
834
+ $pluginInfo = $this->_getPluginsInfo('_calculatePrice');
835
+ if (!$pluginInfo) {
836
+ return parent::_calculatePrice($price, $percent, $includeTax);
837
+ } else {
838
+ return $this->___callPlugins('_calculatePrice', func_get_args(), $pluginInfo);
839
+ }
840
+ }
841
+
842
+ /**
843
+ * {@inheritdoc}
844
+ */
845
+ protected function _getTierPrices()
846
+ {
847
+ $pluginInfo = $this->_getPluginsInfo('_getTierPrices');
848
+ if (!$pluginInfo) {
849
+ return parent::_getTierPrices();
850
+ } else {
851
+ return $this->___callPlugins('_getTierPrices', func_get_args(), $pluginInfo);
852
+ }
853
+ }
854
+
855
+ /**
856
+ * {@inheritdoc}
857
+ */