(Ebay Extension からの) いくつかの注文をリバース エンジニアリングして、彼らが実際に使用したストアを見つけるように依頼されました。
例を具体化するには; さまざまな製品を販売する 1 つの Magento バックエンドから複数のストアを運営しています。これらはすべて、単一のマーチャント アカウントを使用して eBay で販売されています。
だから私がする必要があるのは、eBay ストアに対して割り当てられた状態で注文をロードし、その注文に添付されたアイテムをロードして、そのアイテムが使用されている他のストアを確認することです。そこまでたどり着いたら、管理者の storeID と eBay の storeID を除外するだけで、探しているストアが表示されます。
これは私がこれまでに持っているものです:
foreach($collection->getItems() as $order):
// need to do this to load correct order information
$order = Mage::getModel('sales/order')->loadByIncrementID($order->getIncrementId());
$items = $order->getItemsCollection();
foreach($items as $item) {
// need to do this to get the actual item, not the item on the order
$item = Mage::getModel('catalog/product')->load($item->getItemId());
// do something to get the other store ids
}
endforeach;