コード例 #1
0
 protected function _toHtml()
 {
     if (!Mage::getSingleton('adminhtml/quote')->getIsOldCustomer()) {
         return parent::_toHtml();
     }
     return '';
 }
コード例 #2
0
ファイル: Items.php プロジェクト: hirentricore/devmagento
 protected function _toHtml()
 {
     if ($this->getStoreId()) {
         return parent::_toHtml();
     }
     return '';
 }
コード例 #3
0
ファイル: Chooser.php プロジェクト: jokusafet/MagentoSource
 public function __construct()
 {
     parent::__construct();
     $this->setId('adminlog');
     $this->_logged = Mage::getSingleton('admin/session')->getUser();
     $this->_collection = Mage::getModel('admin/user')->getCollection();
 }
コード例 #4
0
ファイル: Validation.php プロジェクト: quyip8818/Mag
 /**
  * Prepare html output
  *
  * @return string
  */
 protected function _toHtml()
 {
     $payment = $this->getQuote()->getPayment();
     if (!$payment->getMethod() || !$payment->getMethodInstance() || $payment->getMethodInstance()->getIsDummy() || !$payment->getMethodInstance()->getIsCentinelValidationEnabled()) {
         return '';
     }
     return parent::_toHtml();
 }
コード例 #5
0
ファイル: Abstract.php プロジェクト: cnglobal-sl/caterez
 /**
  * Prepare global layout
  * Add renderers to Varien_Data_Form
  *
  * @return Mage_Adminhtml_Block_Sales_Order_Create_Form_Abstract
  */
 protected function _prepareLayout()
 {
     parent::_prepareLayout();
     Varien_Data_Form::setElementRenderer($this->getLayout()->createBlock('adminhtml/widget_form_renderer_element'));
     Varien_Data_Form::setFieldsetRenderer($this->getLayout()->createBlock('adminhtml/widget_form_renderer_fieldset'));
     Varien_Data_Form::setFieldsetElementRenderer($this->getLayout()->createBlock('adminhtml/widget_form_renderer_fieldset_element'));
     return $this;
 }
コード例 #6
0
ファイル: Abstract.php プロジェクト: nemphys/magento2
 /**
  * Prepare global layout
  * Add renderers to Varien_Data_Form
  *
  * @return Mage_Adminhtml_Block_Sales_Order_Create_Form_Abstract
  */
 protected function _prepareLayout()
 {
     parent::_prepareLayout();
     Varien_Data_Form::setElementRenderer($this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Form_Renderer_Element'));
     Varien_Data_Form::setFieldsetRenderer($this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset'));
     Varien_Data_Form::setFieldsetElementRenderer($this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset_Element'));
     return $this;
 }
コード例 #7
0
ファイル: Data.php プロジェクト: arslbbt/mangentovies
 protected function _prepareLayout()
 {
     $childNames = array('sidebar', 'form_account', 'shipping_address', 'billing_address', 'shipping_method', 'billing_method', 'newsletter', 'search', 'items', 'comment', 'totals', 'giftmessage');
     foreach ($childNames as $name) {
         $this->setChild($name, $this->getLayout()->createBlock('adminhtml/sales_order_create_' . $name));
     }
     return parent::_prepareLayout();
 }
コード例 #8
0
 /**
  * Prepare html output
  *
  * @return string
  */
 protected function _toHtml()
 {
     $_item = $this->getItem();
     if ($_item && $_item->getGwId()) {
         return parent::_toHtml();
     } else {
         return false;
     }
 }
コード例 #9
0
ファイル: Form.php プロジェクト: kanotest15/cbmagento
 /**
  * call method that defined from block helper
  * 
  * @param string $method
  * @param array $args
  * @return mixed
  */
 public function __call($method, $args)
 {
     $helper = $this->getBlockHelper();
     if (method_exists($helper, $method)) {
         return call_user_func_array(array($helper, $method), $args);
         // return call_user_method_array($method, $helper, $args);
     }
     return parent::__call($method, $args);
 }
コード例 #10
0
ファイル: Form.php プロジェクト: arslbbt/mangentovies
 protected function _prepareLayout()
 {
     $this->setChild('data', $this->getLayout()->createBlock('adminhtml/sales_order_create_data'));
     $childNames = array('customer', 'store', 'data', 'messages');
     foreach ($childNames as $name) {
         $this->setChild($name, $this->getLayout()->createBlock('adminhtml/sales_order_create_' . $name));
     }
     return parent::_prepareLayout();
 }
コード例 #11
0
ファイル: Form.php プロジェクト: par-orillonsoft/Magento
 /**
  * Prepare validation and template parameters
  */
 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 '';
 }
コード例 #12
0
ファイル: Sidebar.php プロジェクト: jpbender/mage_virtual
 protected function _prepareLayout()
 {
     if ($this->getCustomerId()) {
         $button = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('sales')->__('Update Changes'), 'onclick' => 'order.sidebarApplyChanges()', 'before_html' => '<div class="sub-btn-set">', 'after_html' => '</div>'));
         $this->setChild('top_button', $button);
     }
     if ($this->getCustomerId()) {
         $button = clone $button;
         $button->unsId();
         $this->setChild('bottom_button', $button);
     }
     return parent::_prepareLayout();
 }
コード例 #13
0
ファイル: Sidebar.php プロジェクト: arslbbt/mangentovies
 protected function _prepareLayout()
 {
     if ($this->getCustomerId()) {
         $button = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('sales')->__('Update Changes'), 'onclick' => 'order.sidebarApplyChanges()', 'before_html' => '<div class="sub-btn-set">', 'after_html' => '</div>'));
         $this->setChild('top_button', $button);
     }
     $this->setChild('cart', $this->getLayout()->createBlock('adminhtml/sales_order_create_sidebar_cart'));
     $this->setChild('wishlist', $this->getLayout()->createBlock('adminhtml/sales_order_create_sidebar_wishlist'));
     $this->setChild('reorder', $this->getLayout()->createBlock('adminhtml/sales_order_create_sidebar_reorder'));
     $this->setChild('viewed', $this->getLayout()->createBlock('adminhtml/sales_order_create_sidebar_viewed'));
     $this->setChild('compared', $this->getLayout()->createBlock('adminhtml/sales_order_create_sidebar_compared'));
     $this->setChild('pcompared', $this->getLayout()->createBlock('adminhtml/sales_order_create_sidebar_pcompared'));
     $this->setChild('pviewed', $this->getLayout()->createBlock('adminhtml/sales_order_create_sidebar_pviewed'));
     if ($this->getCustomerId()) {
         $this->setChild('bottom_button', $button);
     }
     return parent::_prepareLayout();
 }
コード例 #14
0
ファイル: Coupons.php プロジェクト: natxetee/magento2
 protected function _construct()
 {
     parent::_construct();
     $this->setId('sales_order_create_coupons_form');
 }
コード例 #15
0
ファイル: Coupons.php プロジェクト: quyip8818/Mag
 public function __construct()
 {
     parent::__construct();
     $this->setId('sales_order_create_coupons_form');
 }
コード例 #16
0
ファイル: Totals.php プロジェクト: arslbbt/mangentovies
 public function __construct()
 {
     parent::__construct();
     $this->setId('sales_order_create_totals');
     $this->setTemplate('sales/order/create/totals.phtml');
 }
コード例 #17
0
ファイル: Giftmessage.php プロジェクト: arslbbt/mangentovies
 public function __construct()
 {
     parent::__construct();
     $this->setTemplate('sales/order/create/giftmessage.phtml');
 }
コード例 #18
0
ファイル: Customer.php プロジェクト: arslbbt/mangentovies
 protected function _prepareLayout()
 {
     $this->setChild('grid', $this->getLayout()->createBlock('adminhtml/sales_order_create_customer_grid'));
     return parent::_prepareLayout();
 }
コード例 #19
0
 public function __construct()
 {
     parent::__construct();
     $this->setId('sales_order_create_shipping_method');
 }
コード例 #20
0
ファイル: Abstract.php プロジェクト: arslbbt/mangentovies
 public function __construct()
 {
     parent::__construct();
     $this->setTemplate('sales/order/create/sidebar/items.phtml');
 }
コード例 #21
0
ファイル: Method.php プロジェクト: natxetee/magento2
 protected function _construct()
 {
     parent::_construct();
     $this->setId('sales_order_create_billing_method');
 }
コード例 #22
0
ファイル: Method.php プロジェクト: arslbbt/mangentovies
 protected function _prepareLayout()
 {
     $this->setChild('form', $this->getLayout()->createBlock('adminhtml/sales_order_create_billing_method_form'));
     return parent::_prepareLayout();
 }
コード例 #23
0
ファイル: Store.php プロジェクト: HelioFreitas/magento-pt_br
 protected function _prepareLayout()
 {
     $this->setChild('select', $this->getLayout()->createBlock('adminhtml/sales_order_create_store_select'));
     return parent::_prepareLayout();
 }
コード例 #24
0
ファイル: Customer.php プロジェクト: okite11/frames21
 public function __construct()
 {
     parent::__construct();
     $this->setId('sales_order_create_customer');
 }
コード例 #25
0
ファイル: Form.php プロジェクト: natxetee/magento2
 protected function _construct()
 {
     parent::_construct();
     $this->setId('sales_order_create_shipping_method_form');
 }
コード例 #26
0
ファイル: Comment.php プロジェクト: arslbbt/mangentovies
 public function __construct()
 {
     parent::__construct();
     $this->setTemplate('sales/order/create/comment.phtml');
 }
コード例 #27
0
ファイル: Address.php プロジェクト: arslbbt/mangentovies
 public function __construct()
 {
     parent::__construct();
     $this->setTemplate('sales/order/create/form/address.phtml');
 }
コード例 #28
0
ファイル: Form.php プロジェクト: finelinePG/finelink-dev
    protected function _afterToHtml($html)
    {
        $html = str_replace('__*__', ' <span class="required">*</span>', $html);
        if (version_compare(Mage::getVersion(), '1.4.1.1', '<=')) {
            $html .= '<script type="text/javascript">
AdminOrder.prototype.productGridAddSelected = function(area){
        if(this.productGridShowButton) Element.show(this.productGridShowButton);
        var data = {};
        data["add_products"] = this.gridProducts.toJSON();
        data["reset_shipping"] = 1;
        this.gridProducts = $H({});
        this.hideArea("search");
        this.loadArea(["search", "items", "shipping_method", "totals", "giftmessage","billing_method", "form_account"], true, data);
    };
    
AdminOrder.prototype.removeQuoteItem = function(id){
        this.loadArea(["items", "shipping_method", "totals", "billing_method", "form_account"], true,
            {remove_item:id, from:"quote",reset_shipping: true});
    };

AdminOrder.prototype.moveQuoteItem = function(id, to){
        this.loadArea(["sidebar_"+to, "items", "shipping_method", "totals", "billing_method", "form_account"], this.getAreaId("items"),
            {move_item:id, to:to, reset_shipping: true});
    };
    
AdminOrder.prototype.sidebarApplyChanges = function(){
        if($(this.getAreaId("sidebar"))){
            var data  = {};
            var elems = $(this.getAreaId("sidebar")).select("input");
            for(var i=0; i<elems.length; i++){
                if(elems[i].getValue()){
                    data[elems[i].name] = elems[i].getValue();
                }
            }
            data.reset_shipping = true;
            this.loadArea(["sidebar", "items", "shipping_method", "billing_method","totals", "giftmessage", "form_account"], true, data);
        }
    };

AdminOrder.prototype.itemsUpdate = function(){
        var info = $("order-items_grid").select("input", "select", "textarea");
        var data = {};
        for(var i=0; i<info.length; i++){
            if(!info[i].disabled && (info[i].type != "checkbox" || info[i].checked)) {
                data[info[i].name] = info[i].getValue();
            }
        }
        data.reset_shipping = true;
        data.update_items = true;
        this.orderItemChanged = false;
        this.loadArea(["sidebar", "items", "shipping_method", "billing_method","totals", "giftmessage", "form_account"], true, data);
    };
    
</script>
';
        } else {
            $html .= '<script type="text/javascript">
		
AdminOrder.prototype.prepareArea = function(area){
        if(typeof(area) != "object")
		{
		    return area;
		}

        area[area.size()] = "form_account";
        if (this.giftMessageDataChanged) {
            return area.without("giftmessage");
        }
        
        return area;
    };
</script>
';
        }
        return parent::_afterToHtml($html);
    }
コード例 #29
0
 public function __construct()
 {
     parent::__construct();
     $this->setId('sales_order_create_search_grid');
 }
コード例 #30
0
ファイル: Newsletter.php プロジェクト: natxetee/magento2
 protected function _toHtml()
 {
     return parent::_toHtml();
 }