私は、magento のさまざまなストアの製品価格と説明を取得しようとしています。次のようにこれを達成できます:-
foreach ($productObj->getStoreIds() as $_storeId) {
$tempStoreObj = new Mage_Core_Model_Store();
$tempStoreObj->load($_storeId);
$tempProductObj = new Mage_Catalog_Model_Product();
$tempProductObj->setStoreId($_storeId);
$tempProductObj->load($productObj->getId());
$tempPriceArray[] = array(
'websiteId' => $tempStoreObj->getWebsiteId(),
'price' => $tempProductObj->getPrice(),
'baseCurrency' => $tempStoreObj->getBaseCurrencyCode(),
);
$tempDescArray[]=array(
'descprition' => $tempProductObj->getData('description'),
'shortDescription' => $tempProductObj->getData('short_description'),
);
}
上記のコードでは、最初に特定の製品のストアをフェッチし、次にストアをロードしてから、製品のオブジェクトを再度作成し、wrt product idと store idをロードしました。このようにして、必要なタスクを達成しました。
多くの製品と多くのストアのパフォーマンスの問題が発生し、読み込みプロセスがこれを遅くするときに、私の問題がここから始まります。
同じことを達成する他の方法はありますか?