/** * Retrieve all items * * @return array */ public function getItems() { $items = parent::getItems(); foreach ($items as $item) { $product = $item->getProduct(); $item->setName($product->getName()); $item->setPrice($product->getFinalPrice(1)); $item->setTypeId($product->getTypeId()); } return $items; }
protected function _construct() { parent::_construct(); $this->setId('sales_order_create_sidebar_viewed'); $this->setDataId('viewed'); }
/** * Prepare layout * * Add button that clears customer's shopping cart * * @return Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Cart */ protected function _prepareLayout() { $deleteAllConfirmString = Mage::helper('request4quote')->__('Are you sure you want to delete all items from shopping cart?'); $button = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('request4quote')->__('Clear Shopping Cart'), 'onclick' => 'order.clearShoppingCart(\'' . $deleteAllConfirmString . '\')', 'style' => 'float: right;')); $this->setChild('empty_customer_cart_button', $button); return parent::_prepareLayout(); }