當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Mage_Adminhtml_Block_Sales_Items_Abstract::_prepareLayout方法代碼示例

本文整理匯總了PHP中Mage_Adminhtml_Block_Sales_Items_Abstract::_prepareLayout方法的典型用法代碼示例。如果您正苦於以下問題:PHP Mage_Adminhtml_Block_Sales_Items_Abstract::_prepareLayout方法的具體用法?PHP Mage_Adminhtml_Block_Sales_Items_Abstract::_prepareLayout怎麽用?PHP Mage_Adminhtml_Block_Sales_Items_Abstract::_prepareLayout使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Mage_Adminhtml_Block_Sales_Items_Abstract的用法示例。


在下文中一共展示了Mage_Adminhtml_Block_Sales_Items_Abstract::_prepareLayout方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: _beforeToHtml

 /**
  * Prepare child blocks
  *
  * @return Mage_Adminhtml_Block_Sales_Order_Invoice_Create_Items
  */
 protected function _beforeToHtml()
 {
     $onclick = "submitAndReloadArea(\$('invoice_item_container'),'" . $this->getUpdateUrl() . "')";
     $this->setChild('update_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('class' => 'update-button', 'label' => Mage::helper('sales')->__('Update Qty\'s'), 'onclick' => $onclick)));
     $this->setChild('submit_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('sales')->__('Submit Invoice'), 'class' => 'save submit-button', 'onclick' => '$(\'edit_form\').submit()')));
     return parent::_prepareLayout();
 }
開發者ID:HelioFreitas,項目名稱:magento-pt_br,代碼行數:12,代碼來源:Items.php

示例2: _prepareLayout

 protected function _prepareLayout()
 {
     if ($this->getInvoice()->getId()) {
         $this->setChild('invoice_totals', $this->getLayout()->createBlock('pdfinvoiceplus/adminhtml_totals_invoice'));
     }
     if ($this->getOrder()->getId()) {
         $this->setChild('order_totals', $this->getLayout()->createBlock('pdfinvoiceplus/adminhtml_totals_order'));
     }
     if ($this->getCreditmemo()->getId()) {
         $this->setChild('creditmemo_totals', $this->getLayout()->createBlock('pdfinvoiceplus/adminhtml_totals_creditmemo'));
     }
     parent::_prepareLayout();
 }
開發者ID:cabrerabywaters,項目名稱:magentoSunshine,代碼行數:13,代碼來源:Pdf.php

示例3: _prepareLayout

 /**
  * Prepare child blocks
  *
  * @return Mage_Adminhtml_Block_Sales_Order_Creditmemo_Create_Items
  */
 protected function _prepareLayout()
 {
     $onclick = "submitAndReloadArea(\$('creditmemo_item_container'),'" . $this->getUpdateUrl() . "')";
     $this->setChild('update_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('sales')->__('Update Qty\'s'), 'class' => 'update-button', 'onclick' => $onclick)));
     if ($this->getCreditmemo()->canRefund()) {
         if ($this->getCreditmemo()->getInvoice() && $this->getCreditmemo()->getInvoice()->getTransactionId()) {
             $this->setChild('submit_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('sales')->__('Refund'), 'class' => 'save submit-button', 'onclick' => 'disableElements(\'submit-button\');submitCreditMemo()')));
         }
         $this->setChild('submit_offline', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('sales')->__('Refund Offline'), 'class' => 'save submit-button', 'onclick' => 'disableElements(\'submit-button\');submitCreditMemoOffline()')));
     } else {
         $this->setChild('submit_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('sales')->__('Refund Offline'), 'class' => 'save submit-button', 'onclick' => 'disableElements(\'submit-button\');submitCreditMemoOffline()')));
     }
     return parent::_prepareLayout();
 }
開發者ID:blazeriaz,項目名稱:youguess,代碼行數:19,代碼來源:Items.php

示例4: _beforeToHtml

 /**
  * Prepare child blocks
  *
  * @return Mage_Adminhtml_Block_Sales_Order_Invoice_Create_Items
  */
 protected function _beforeToHtml()
 {
     $onclick = "submitAndReloadArea(\$('invoice_item_container'),'" . $this->getUpdateUrl() . "')";
     $this->setChild('update_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('class' => 'update-button', 'label' => Mage::helper('sales')->__('Update Qty\'s'), 'onclick' => $onclick)));
     $this->_disableSubmitButton = true;
     $_submitButtonClass = ' disabled';
     foreach ($this->getInvoice()->getAllItems() as $item) {
         if ($item->getQty() || $this->getSource()->getData('base_grand_total')) {
             $this->_disableSubmitButton = false;
             $_submitButtonClass = '';
             break;
         }
     }
     $_submitLabel = $this->getOrder()->getForcedDoShipmentWithInvoice() ? 'Submit Invoice and Shipment' : 'Submit Invoice';
     $this->setChild('submit_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('sales')->__('%s', $_submitLabel), 'class' => 'save submit-button' . $_submitButtonClass, 'onclick' => '$(\'edit_form\').submit()', 'disabled' => $this->_disableSubmitButton)));
     return parent::_prepareLayout();
 }
開發者ID:jauderho,項目名稱:magento-mirror,代碼行數:22,代碼來源:Items.php

示例5: _beforeToHtml

 /**
  * Prepare child blocks
  *
  * @return Mage_Adminhtml_Block_Sales_Order_Invoice_Create_Items
  */
 protected function _beforeToHtml()
 {
     $onclick = "submitAndReloadArea(\$('invoice_item_container'),'" . $this->getUpdateUrl() . "')";
     $this->setChild('update_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('class' => 'update-button', 'label' => Mage::helper('sales')->__("Update Qty's"), 'onclick' => $onclick)));
     $this->_disableSubmitButton = true;
     $_submitButtonClass = ' disabled';
     foreach ($this->getInvoice()->getAllItems() as $item) {
         /**
          * @see bug #14839
          */
         if ($item->getQty()) {
             $this->_disableSubmitButton = false;
             $_submitButtonClass = '';
             break;
         }
     }
     $_saveLabel = Mage::helper('sales')->__('Save');
     $this->setChild('save_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => $_saveLabel, 'class' => 'save submit-button' . $_submitButtonClass, 'onclick' => 'disableElements(\'submit-button\');$(\'edit_form\').submit()', 'disabled' => $this->_disableSubmitButton)));
     return parent::_prepareLayout();
 }
開發者ID:jronatay,項目名稱:ultimo-magento-jron,代碼行數:25,代碼來源:Items.php

示例6: _beforeToHtml

 /**
  * Prepare child blocks
  *
  * @return Mage_Adminhtml_Block_Sales_Order_Invoice_Create_Items
  */
 protected function _beforeToHtml()
 {
     $onclick = "submitAndReloadArea(\$('invoice_item_container'),'" . $this->getUpdateUrl() . "')";
     $this->addChild('update_button', 'Mage_Adminhtml_Block_Widget_Button', array('class' => 'update-button', 'label' => Mage::helper('Mage_Sales_Helper_Data')->__('Update Qty\'s'), 'onclick' => $onclick));
     $this->_disableSubmitButton = true;
     $_submitButtonClass = ' disabled';
     foreach ($this->getInvoice()->getAllItems() as $item) {
         /**
          * @see bug #14839
          */
         if ($item->getQty()) {
             $this->_disableSubmitButton = false;
             $_submitButtonClass = '';
             break;
         }
     }
     if ($this->getOrder()->getForcedShipmentWithInvoice()) {
         $_submitLabel = Mage::helper('Mage_Sales_Helper_Data')->__('Submit Invoice and Shipment');
     } else {
         $_submitLabel = Mage::helper('Mage_Sales_Helper_Data')->__('Submit Invoice');
     }
     $this->addChild('submit_button', 'Mage_Adminhtml_Block_Widget_Button', array('label' => $_submitLabel, 'class' => 'save submit-button' . $_submitButtonClass, 'onclick' => 'disableElements(\'submit-button\');$(\'edit_form\').submit()', 'disabled' => $this->_disableSubmitButton));
     return parent::_prepareLayout();
 }
開發者ID:nayanchamp,項目名稱:magento2,代碼行數:29,代碼來源:Items.php

示例7: _prepareLayout

 protected function _prepareLayout()
 {
     parent::_prepareLayout();
 }
開發者ID:cabrerabywaters,項目名稱:magentoSunshine,代碼行數:4,代碼來源:Creditmemo.php


注:本文中的Mage_Adminhtml_Block_Sales_Items_Abstract::_prepareLayout方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。