예제 #1
0
 /**
  * Retrieve product info
  *
  * @param int|string $productId
  * @param string|int $store
  * @param array $attributes
  * @return array
  */
 public function info($productId, $store = null, $attributes = null, $identifierType = null)
 {
     $result = parent::info($productId, $store, $attributes, $identifierType);
     if ($result['type'] == Mage_Catalog_Model_Product_Type_Configurable::TYPE_CODE) {
         $product = Mage::getModel('catalog/product')->load($result['product_id']);
         if ($product->isConfigurable()) {
             $ids = $product->getTypeInstance(true)->getUsedProductIds($product);
             $result['subproduct_ids'] = $ids;
         }
     }
     return $result;
 }