/** * @return Mage_Catalog_Model_Product_Type_Abstract * @throws Exception */ public function getTypeInstance() { $cacheKey = array(__METHOD__); if ($this->isCacheEnabled && !is_null($cacheResult = $this->getCache()->getData($cacheKey))) { return $cacheResult; } return $this->getCache()->setData($cacheKey, parent::getTypeInstance()); }
protected function getGroupedProductValue(Ess_M2ePro_Model_Magento_Product $product) { $value = 0; /** @var $productTypeInstance Mage_Catalog_Model_Product_Type_Grouped */ $productTypeInstance = $product->getTypeInstance(); foreach ($productTypeInstance->getAssociatedProducts() as $childProduct) { /** @var $childProduct Ess_M2ePro_Model_Magento_Product */ $childProduct = Mage::getModel('M2ePro/Magento_Product')->setProduct($childProduct); $variationValue = (double) $childProduct->getSpecialPrice(); $variationValue <= 0 && ($variationValue = (double) $childProduct->getPrice()); if ($variationValue < $value || $value == 0) { $value = $variationValue; } } return $this->convertValueFromStoreToMarketplace($value); }