Exemple #1
0
 /**
  * Return HTML code of the block
  *
  * @return string
  */
 protected function _toHtml()
 {
     if ($this->getStoreId()) {
         return parent::_toHtml();
     }
     return '';
 }
 /**
  * Prepare global layout
  * Add renderers to \Magento\Framework\Data\Form
  *
  * @return $this
  */
 protected function _prepareLayout()
 {
     parent::_prepareLayout();
     \Magento\Framework\Data\Form::setElementRenderer($this->getLayout()->createBlock('Magento\\Backend\\Block\\Widget\\Form\\Renderer\\Element', $this->getNameInLayout() . '_element'));
     \Magento\Framework\Data\Form::setFieldsetRenderer($this->getLayout()->createBlock('Magento\\Backend\\Block\\Widget\\Form\\Renderer\\Fieldset', $this->getNameInLayout() . '_fieldset'));
     \Magento\Framework\Data\Form::setFieldsetElementRenderer($this->getLayout()->createBlock('Magento\\Backend\\Block\\Widget\\Form\\Renderer\\Fieldset\\Element', $this->getNameInLayout() . '_fieldset_element'));
     return $this;
 }
Exemple #3
0
 /**
  * Prepare html output
  *
  * @return string
  */
 protected function _toHtml()
 {
     $payment = $this->getQuote()->getPayment();
     if (!$payment->getMethod() || $payment->getMethodInstance()->getIsDummy() || !$payment->getMethodInstance()->getIsCentinelValidationEnabled()) {
         return '';
     }
     return parent::_toHtml();
 }
Exemple #4
0
 /**
  * Prepare validation and template parameters
  *
  * @return string
  */
 protected function _toHtml()
 {
     $payment = $this->getQuote()->getPayment();
     if ($payment && ($method = $payment->getMethodInstance())) {
         if ($method->getIsCentinelValidationEnabled() && ($centinel = $method->getCentinelValidator())) {
             $this->setFrameUrl($centinel->getValidatePaymentDataUrl())->setContainerId('centinel_authenticate_iframe')->setMethodCode($method->getCode());
             return parent::_toHtml();
         }
     }
     return '';
 }
Exemple #5
0
 /**
  * Preparing global layout
  *
  * @return $this
  */
 protected function _prepareLayout()
 {
     if ($this->getCustomerId()) {
         $button = $this->getLayout()->createBlock('Magento\\Backend\\Block\\Widget\\Button')->setData(['label' => __('Update Changes'), 'onclick' => 'order.sidebarApplyChanges()', 'class' => 'action-secondary', 'before_html' => '<div class="actions">', 'after_html' => '</div>']);
         $this->setChild('top_button', $button);
     }
     if ($this->getCustomerId()) {
         $button = clone $button;
         $button->unsId();
         $this->setChild('bottom_button', $button);
     }
     return parent::_prepareLayout();
 }
Exemple #6
0
 /**
  * Constructor
  *
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->setId('sales_order_create_search_grid');
 }
Exemple #7
0
 /**
  * Constructor
  *
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->setId('sales_order_create_form');
 }
 /**
  * @param \Magento\Backend\Block\Template\Context $context
  * @param \Magento\Backend\Model\Session\Quote $sessionQuote
  * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate
  * @param PriceCurrencyInterface $priceCurrency
  * @param \Magento\Sales\Model\Config $salesConfig
  * @param array $data
  */
 public function __construct(\Magento\Backend\Block\Template\Context $context, \Magento\Backend\Model\Session\Quote $sessionQuote, \Magento\Sales\Model\AdminOrder\Create $orderCreate, PriceCurrencyInterface $priceCurrency, \Magento\Sales\Model\Config $salesConfig, array $data = array())
 {
     parent::__construct($context, $sessionQuote, $orderCreate, $priceCurrency, $data);
     $this->_salesConfig = $salesConfig;
 }
Exemple #9
0
 /**
  * Constructor
  *
  * @param \Magento\Backend\Block\Template\Context $context
  * @param \Magento\Backend\Model\Session\Quote $sessionQuote
  * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate
  * @param PriceCurrencyInterface $priceCurrency
  * @param \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository
  * @param \Magento\Customer\Helper\View $customerViewHelper
  * @param array $data
  */
 public function __construct(\Magento\Backend\Block\Template\Context $context, \Magento\Backend\Model\Session\Quote $sessionQuote, \Magento\Sales\Model\AdminOrder\Create $orderCreate, PriceCurrencyInterface $priceCurrency, \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository, \Magento\Customer\Helper\View $customerViewHelper, array $data = [])
 {
     $this->customerRepository = $customerRepository;
     $this->_customerViewHelper = $customerViewHelper;
     parent::__construct($context, $sessionQuote, $orderCreate, $priceCurrency, $data);
 }
Exemple #10
0
 /**
  * @param \Magento\Backend\Block\Template\Context $context
  * @param \Magento\Backend\Model\Session\Quote $sessionQuote
  * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate
  * @param PriceCurrencyInterface $priceCurrency
  * @param \Magento\Directory\Model\CurrencyFactory $currencyFactory
  * @param \Magento\Framework\Locale\CurrencyInterface $localeCurrency
  * @param array $data
  */
 public function __construct(\Magento\Backend\Block\Template\Context $context, \Magento\Backend\Model\Session\Quote $sessionQuote, \Magento\Sales\Model\AdminOrder\Create $orderCreate, PriceCurrencyInterface $priceCurrency, \Magento\Directory\Model\CurrencyFactory $currencyFactory, \Magento\Framework\Locale\CurrencyInterface $localeCurrency, array $data = [])
 {
     $this->_currencyFactory = $currencyFactory;
     $this->_localeCurrency = $localeCurrency;
     parent::__construct($context, $sessionQuote, $orderCreate, $priceCurrency, $data);
 }
 /**
  * Constructor
  *
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->setId('sales_order_create_billing_method');
 }
Exemple #12
0
 /**
  * @param \Magento\Backend\Block\Template\Context $context
  * @param \Magento\Backend\Model\Session\Quote $sessionQuote
  * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate
  * @param PriceCurrencyInterface $priceCurrency
  * @param CustomerAccountServiceInterface $customerAccountService
  * @param \Magento\Customer\Helper\View $customerViewHelper
  * @param array $data
  */
 public function __construct(\Magento\Backend\Block\Template\Context $context, \Magento\Backend\Model\Session\Quote $sessionQuote, \Magento\Sales\Model\AdminOrder\Create $orderCreate, PriceCurrencyInterface $priceCurrency, CustomerAccountServiceInterface $customerAccountService, \Magento\Customer\Helper\View $customerViewHelper, array $data = array())
 {
     $this->_customerAccountService = $customerAccountService;
     $this->_customerViewHelper = $customerViewHelper;
     parent::__construct($context, $sessionQuote, $orderCreate, $priceCurrency, $data);
 }
 /**
  * {@inheritdoc}
  */
 protected function _toHtml()
 {
     return parent::_toHtml();
 }
 /**
  * @param \Magento\Backend\Block\Template\Context $context
  * @param \Magento\Backend\Model\Session\Quote $sessionQuote
  * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate
  * @param PriceCurrencyInterface $priceCurrency
  * @param \Magento\GiftMessage\Model\Save $giftMessageSave
  * @param \Magento\GiftMessage\Helper\Message $messageHelper
  * @param array $data
  */
 public function __construct(\Magento\Backend\Block\Template\Context $context, \Magento\Backend\Model\Session\Quote $sessionQuote, \Magento\Sales\Model\AdminOrder\Create $orderCreate, PriceCurrencyInterface $priceCurrency, \Magento\GiftMessage\Model\Save $giftMessageSave, \Magento\GiftMessage\Helper\Message $messageHelper, array $data = [])
 {
     $this->_messageHelper = $messageHelper;
     $this->_giftMessageSave = $giftMessageSave;
     parent::__construct($context, $sessionQuote, $orderCreate, $priceCurrency, $data);
 }