Beispiel #1
0
 /**
  * Constructor
  *
  * @return void
  */
 protected function _construct()
 {
     $this->_objectId = 'order_id';
     $this->_controller = 'order';
     $this->_mode = 'create';
     parent::_construct();
     $this->setId('sales_order_create');
     $customerId = $this->_sessionQuote->getCustomerId();
     $storeId = $this->_sessionQuote->getStoreId();
     $this->buttonList->update('save', 'label', __('Submit Order'));
     $this->buttonList->update('save', 'onclick', 'order.submit()');
     $this->buttonList->update('save', 'class', 'primary');
     // Temporary solution, unset button widget. Will have to wait till jQuery migration is complete
     $this->buttonList->update('save', 'data_attribute', array());
     $this->buttonList->update('save', 'id', 'submit_order_top_button');
     if (is_null($customerId) || !$storeId) {
         $this->buttonList->update('save', 'style', 'display:none');
     }
     $this->buttonList->update('back', 'id', 'back_order_top_button');
     $this->buttonList->update('back', 'onclick', 'setLocation(\'' . $this->getBackUrl() . '\')');
     $this->buttonList->update('reset', 'id', 'reset_order_top_button');
     if (is_null($customerId)) {
         $this->buttonList->update('reset', 'style', 'display:none');
     } else {
         $this->buttonList->update('back', 'style', 'display:none');
     }
     $confirm = __('Are you sure you want to cancel this order?');
     $this->buttonList->update('reset', 'label', __('Cancel'));
     $this->buttonList->update('reset', 'class', 'cancel');
     $this->buttonList->update('reset', 'onclick', 'deleteConfirm(\'' . $confirm . '\', \'' . $this->getCancelUrl() . '\')');
     $pageTitle = $this->getLayout()->createBlock('Magento\\Sales\\Block\\Adminhtml\\Order\\Create\\Header')->toHtml();
     if (is_object($this->getLayout()->getBlock('page-title'))) {
         $this->getLayout()->getBlock('page-title')->setPageTitle($pageTitle);
     }
 }
Beispiel #2
0
 /**
  * Constructor
  *
  * @return void
  */
 protected function _construct()
 {
     $this->_objectId = 'order_id';
     $this->_controller = 'order';
     $this->_mode = 'create';
     parent::_construct();
     $this->setId('sales_order_create');
     $customerId = $this->_sessionQuote->getCustomerId();
     $storeId = $this->_sessionQuote->getStoreId();
     $this->buttonList->update('save', 'label', __('Submit Order'));
     $this->buttonList->update('save', 'onclick', 'order.submit()');
     $this->buttonList->update('save', 'class', 'primary');
     // Temporary solution, unset button widget. Will have to wait till jQuery migration is complete
     $this->buttonList->update('save', 'data_attribute', []);
     $this->buttonList->update('save', 'id', 'submit_order_top_button');
     if ($customerId === null || !$storeId) {
         $this->buttonList->update('save', 'style', 'display:none');
     }
     $this->buttonList->update('back', 'id', 'back_order_top_button');
     $this->buttonList->update('back', 'onclick', 'setLocation(\'' . $this->getBackUrl() . '\')');
     $this->buttonList->update('reset', 'id', 'reset_order_top_button');
     if ($customerId === null) {
         $this->buttonList->update('reset', 'style', 'display:none');
     } else {
         $this->buttonList->update('back', 'style', 'display:none');
     }
     $confirm = __('Are you sure you want to cancel this order?');
     $this->buttonList->update('reset', 'label', __('Cancel'));
     $this->buttonList->update('reset', 'class', 'cancel');
     $this->buttonList->update('reset', 'onclick', 'deleteConfirm(\'' . $confirm . '\', \'' . $this->getCancelUrl() . '\')');
 }
Beispiel #3
0
 /**
  * @return array
  */
 public function getOneClickCards()
 {
     $customerId = $this->_sessionQuote->getCustomerId();
     $storeId = $this->_sessionQuote->getStoreId();
     $grandTotal = $this->_sessionQuote->getQuote()->getGrandTotal();
     // For backend only allow recurring payments
     $recurringType = \Adyen\Payment\Model\RecurringType::RECURRING;
     $cards = $this->_adyenHelper->getOneClickPaymentMethods($customerId, $storeId, $grandTotal, $recurringType);
     return $cards;
 }
 /**
  * Returns merchant id
  *
  * @return string
  */
 public function getMerchantId()
 {
     return $this->scopeConfig->getValue(self::CONFIG_PATH_MERCHANT_ID, $this->sessionQuote->getStoreId());
 }