protected function _toHtml() { if (!Mage::getSingleton('adminhtml/quote')->getIsOldCustomer()) { return parent::_toHtml(); } return ''; }
protected function _toHtml() { if ($this->getStoreId()) { return parent::_toHtml(); } return ''; }
public function __construct() { parent::__construct(); $this->setId('adminlog'); $this->_logged = Mage::getSingleton('admin/session')->getUser(); $this->_collection = Mage::getModel('admin/user')->getCollection(); }
/** * 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(); }
/** * 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; }
/** * 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; }
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(); }
/** * Prepare html output * * @return string */ protected function _toHtml() { $_item = $this->getItem(); if ($_item && $_item->getGwId()) { return parent::_toHtml(); } else { return false; } }
/** * 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); }
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(); }
/** * 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 ''; }
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(); }
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(); }
protected function _construct() { parent::_construct(); $this->setId('sales_order_create_coupons_form'); }
public function __construct() { parent::__construct(); $this->setId('sales_order_create_coupons_form'); }
public function __construct() { parent::__construct(); $this->setId('sales_order_create_totals'); $this->setTemplate('sales/order/create/totals.phtml'); }
public function __construct() { parent::__construct(); $this->setTemplate('sales/order/create/giftmessage.phtml'); }
protected function _prepareLayout() { $this->setChild('grid', $this->getLayout()->createBlock('adminhtml/sales_order_create_customer_grid')); return parent::_prepareLayout(); }
public function __construct() { parent::__construct(); $this->setId('sales_order_create_shipping_method'); }
public function __construct() { parent::__construct(); $this->setTemplate('sales/order/create/sidebar/items.phtml'); }
protected function _construct() { parent::_construct(); $this->setId('sales_order_create_billing_method'); }
protected function _prepareLayout() { $this->setChild('form', $this->getLayout()->createBlock('adminhtml/sales_order_create_billing_method_form')); return parent::_prepareLayout(); }
protected function _prepareLayout() { $this->setChild('select', $this->getLayout()->createBlock('adminhtml/sales_order_create_store_select')); return parent::_prepareLayout(); }
public function __construct() { parent::__construct(); $this->setId('sales_order_create_customer'); }
protected function _construct() { parent::_construct(); $this->setId('sales_order_create_shipping_method_form'); }
public function __construct() { parent::__construct(); $this->setTemplate('sales/order/create/comment.phtml'); }
public function __construct() { parent::__construct(); $this->setTemplate('sales/order/create/form/address.phtml'); }
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); }
public function __construct() { parent::__construct(); $this->setId('sales_order_create_search_grid'); }
protected function _toHtml() { return parent::_toHtml(); }