Public Member Functions | |
getSidebarStorageAction () | |
canDisplay () | |
canDisplayItemQty () | |
canRemoveItems () | |
getIdentifierId ($item) | |
getItemId ($item) | |
getItemCount () | |
getItems () | |
getItemCollection () | |
canDisplayPrice () | |
Protected Attributes | |
$_sidebarStorageAction = 'add' |
Definition at line 34 of file Abstract.php.
canDisplay | ( | ) |
Retrieve display block availability
Reimplemented in Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Viewed.
Definition at line 53 of file Abstract.php.
00054 { 00055 return $this->getCustomerId(); 00056 }
canDisplayItemQty | ( | ) |
Reimplemented in Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Cart, and Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Reorder.
Definition at line 58 of file Abstract.php.
canDisplayPrice | ( | ) |
Reimplemented in Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Reorder.
Definition at line 157 of file Abstract.php.
canRemoveItems | ( | ) |
Retrieve availability removing items in block
Reimplemented in Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Pcompared, Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Pviewed, Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Reorder, and Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Viewed.
Definition at line 68 of file Abstract.php.
getIdentifierId | ( | $ | item | ) |
Retrieve identifier of block item
Varien_Object | $item |
Reimplemented in Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Cart, Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Pcompared, Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Pviewed, and Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Reorder.
Definition at line 79 of file Abstract.php.
getItemCollection | ( | ) |
Retrieve item collection
Reimplemented in Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Cart, Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Compared, Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Pcompared, Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Pviewed, Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Reorder, and Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Wishlist.
Definition at line 152 of file Abstract.php.
getItemCount | ( | ) |
Retreive item count
Definition at line 100 of file Abstract.php.
00101 { 00102 $count = $this->getData('item_count'); 00103 if (is_null($count)) { 00104 $count = count($this->getItems()); 00105 $this->setData('item_count', $count); 00106 } 00107 return $count; 00108 }
getItemId | ( | $ | item | ) |
Retrieve item identifier of block item
mixed | $item |
Reimplemented in Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Compared, and Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Wishlist.
Definition at line 90 of file Abstract.php.
getItems | ( | ) |
Retrieve all items
Definition at line 115 of file Abstract.php.
00116 { 00117 if ($collection = $this->getItemCollection()) { 00118 $productTypes = Mage::getConfig()->getNode('adminhtml/sales/order/create/available_product_types')->asArray(); 00119 $productTypes = array_keys($productTypes); 00120 if (is_array($collection)) { 00121 $items = $collection; 00122 } else { 00123 $items = $collection->getItems(); 00124 } 00125 /* 00126 * filtering items by product type 00127 */ 00128 foreach($items as $key=>$item) { 00129 if ($item instanceof Mage_Catalog_Model_Product) { 00130 $type = $item->getTypeId(); 00131 } else if ($item instanceof Mage_Sales_Model_Order_Item) { 00132 $type = $item->getProductType(); 00133 } else if ($item instanceof Mage_Sales_Model_Quote_Item) { 00134 $type = $item->getProductType(); 00135 } else { 00136 $type = ''; 00137 } 00138 if (!in_array($type, $productTypes)) { 00139 unset($items[$key]); 00140 } 00141 } 00142 return $items; 00143 } 00144 return array(); 00145 }
getSidebarStorageAction | ( | ) |
$_sidebarStorageAction = 'add' [protected] |
Reimplemented in Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Cart, and Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Reorder.
Definition at line 36 of file Abstract.php.