00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 class Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Compared extends Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Abstract
00036 {
00037
00038 public function __construct()
00039 {
00040 parent::__construct();
00041 $this->setId('sales_order_create_sidebar_compared');
00042 $this->setDataId('compared');
00043 }
00044
00045 public function getHeaderText()
00046 {
00047 return Mage::helper('sales')->__('Products in Compare List');
00048 }
00049
00050
00051
00052
00053
00054
00055 public function getItemCollection()
00056 {
00057 $collection = $this->getData('item_collection');
00058 if (is_null($collection)) {
00059 if ($collection = $this->getCreateOrderModel()->getCustomerCompareList()) {
00060 $collection = $collection->getItemCollection()
00061 ->useProductItem(true)
00062 ->setStoreId($this->getQuote()->getStoreId())
00063 ->addStoreFilter($this->getQuote()->getStoreId())
00064 ->setCustomerId($this->getCustomerId())
00065 ->addAttributeToSelect('name')
00066 ->addAttributeToSelect('price')
00067 ->addAttributeToSelect('image')
00068 ->addAttributeToSelect('status')
00069 ->load();
00070 }
00071 $this->setData('item_collection', $collection);
00072 }
00073 return $collection;
00074 }
00075
00076 public function getItemId($item)
00077 {
00078 return $item->getCatalogCompareItemId();
00079 }
00080
00081 }