示例#1
0
 /**
  * {@inheritdoc}
  */
 public function isConfigurationRequired($productType)
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'isConfigurationRequired');
     if (!$pluginInfo) {
         return parent::isConfigurationRequired($productType);
     } else {
         return $this->___callPlugins('isConfigurationRequired', func_get_args(), $pluginInfo);
     }
 }
示例#2
0
 /**
  * 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;
 }
示例#3
0
 /**
  * Constructor
  *
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->setId('sales_order_create_sidebar_reorder');
     $this->setDataId('reorder');
 }
示例#4
0
 /**
  * Prepare layout
  *
  * Add button that clears customer's shopping cart
  *
  * @return $this
  */
 protected function _prepareLayout()
 {
     $deleteAllConfirmString = __('Are you sure you want to delete all items from shopping cart?');
     $this->addChild('empty_customer_cart_button', 'Magento\\Backend\\Block\\Widget\\Button', ['label' => __('Clear Shopping Cart'), 'onclick' => 'order.clearShoppingCart(\'' . $deleteAllConfirmString . '\')']);
     return parent::_prepareLayout();
 }
 public function testIsConfigurationRequired()
 {
     $productTypeMock = $this->getMock('Magento\\Catalog\\Model\\Product\\Type', [], [], '', false);
     $this->assertEquals(false, $this->abstractSidebar->isConfigurationRequired($productTypeMock));
 }