当前位置: 首页>>代码示例>>PHP>>正文


PHP Varien_Data_Form::toHtml方法代码示例

本文整理汇总了PHP中Varien_Data_Form::toHtml方法的典型用法代码示例。如果您正苦于以下问题:PHP Varien_Data_Form::toHtml方法的具体用法?PHP Varien_Data_Form::toHtml怎么用?PHP Varien_Data_Form::toHtml使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Varien_Data_Form的用法示例。


在下文中一共展示了Varien_Data_Form::toHtml方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: redirectAction

 /**
  * When a customer chooses Firstdatae4 on Checkout/Payment page
  *
  */
 public function redirectAction()
 {
     if ($this->getRequest()->getPost()) {
         $session = Mage::getSingleton("core/session");
         $session->setData("fde4-recurring", $this->getRequest()->getPost('recurring'));
         $session = Mage::getSingleton('checkout/session');
         $this->create($this->getRequest()->getPost('recurring'));
         $session->setFirstdatae4StandardQuoteId($session->getQuoteId());
         $this->getResponse()->setBody($this->getLayout()->createBlock('firstdatae4/standard_redirect')->toHtml());
         $session->unsQuoteId();
     } else {
         $recurring = new Varien_Data_Form();
         $recurring->setAction(Mage::getBaseUrl() . 'firstdatae4/standard/redirect/')->setId('recurring-profiles')->setName('recurring-profiles')->setMethod('POST')->setUseContainer(true);
         $model = Mage::getModel('firstdatae4/plans');
         $plans = $model->toOptionArray();
         foreach ($plans as $key => $value) {
             $radio = 'rp_' . $key;
             $config = Mage::getStoreConfig('firstdatae4/config/' . $radio, Mage::app()->getStore());
             if ($config != '0') {
                 $recurring->addField($radio, 'radio', array('name' => 'recurring', 'value' => $config, 'label' => $value));
             }
         }
         $recurring->addField('none', 'radio', array('name' => 'recurring', 'value' => 0, 'label' => Mage::helper('firstdatae4')->__("I do not want any plan at this time")));
         $recurring->addField('submit', 'submit', array('name' => 'button', 'value' => 'Submit'));
         $html = '<html>' . '<style>' . ' *{ margin: 0; padding:0 ; font-family: Arial; } #top-box{ background-color: #166700; padding: 10px; color: #fff; }' . ' #content { padding: 10px; } input { margin-right: 7px; }' . ' #submit { background: none repeat scroll 0 0 #738d00; border: 0 none; border-radius: 3px; box-shadow: none;  color: #fff; filter: none; line-height: 22px; outline: medium none; padding: 9px 20px; text-shadow: none; transition: background 0.2s linear 0s, color 0.2s linear 0s; white-space: normal; cursor: pointer; display: inline-block; font-size: 14px; font-weight: normal;  margin-top: 20px; }' . '</style>' . '<body>';
         $html .= '<div id="top-box">Habitos Saludables</div>';
         $html .= '<div id="content">' . $this->__('If you want to automatically repeat this purchases, please select the type of profiles you want:');
         $html .= $recurring->toHtml();
         $html .= '</div>';
         $html .= '<script type="text/javascript">document.getElementById("none").checked = true;</script>';
         $html .= '<style>.field-row{ display:block; } .field-row input { float: left;white-space:nowrap;}</style>';
         $html .= '</body></html>';
         echo $html;
     }
 }
开发者ID:Gilbertoavitia1,项目名称:AHBS,代码行数:39,代码来源:StandardController.php

示例2: _toHtml

    protected function _toHtml()
    {
        $standard = Mage::getModel('BoletoBancario/standard');
        //recupera dados da compra
        $order_id = Mage::getSingleton('checkout/session')->getLastOrderId();
        $order = Mage::getModel('sales/order')->load($order_id);
        $a = $order->getBillingAddress();
        //envia e-mail com a segunda via do boleto
        /*
        $to = $a->getEmail();
        $from = $this->getStandard()->getConfigData('MarchentEmailID');
        $subject = "Boleto Bancário - 2? via";
        $body = '<a href="' . Mage::getUrl("BoletoBancario/standard/view/order_id/$order_id") . '" target="boleto">Clique aqui para exibir a 2? via do boleto</a>';
        
        $this->getStandard()->sendHTMLemail($body, $from, $to, $subject);
        */
        $form = new Varien_Data_Form();
        $form->setAction($standard->getBoletoBancarioUrl())->setId('BoletoBancario_standard_checkout')->setName('BoletoBancario_standard_checkout')->setMethod('POST')->setTarget('boleto')->setUseContainer(true);
        foreach ($standard->getStandardCheckoutFormFields($order) as $field => $value) {
            $form->addField($field, 'hidden', array('name' => $field, 'value' => $value));
        }
        $home_url = $this->getSkinUrl('images/boleto/boleto.png');
        $carregando = $this->getSkinUrl('images/boleto/boletocarregando.gif');
        $html = '<html><body>';
        $html .= $this->__('<p align="center"><strong>Estamos gerando o seu Boleto.</strong></p>
		<p align="center"><strong>Aguarde...</strong></p>
			<p align="center">
			<img src="' . $carregando . '" width="169" height="70" /><br /><br />
			<input type="image" src="' . $home_url . '" value="Gerando o Boleto" width="128" height="128"/>
			</p>');
        $html .= $form->toHtml();
        $html .= '<script type="text/javascript">setTimeout(function(){document.getElementById("BoletoBancario_standard_checkout").submit()}, 2000);</script>';
        $html .= '</body></html>';
        return $html;
    }
开发者ID:mvnp,项目名称:MageBR-Boleto_Bancario_Magento,代码行数:35,代码来源:Redirect.php

示例3: _toHtml

    protected function _toHtml()
    {
        $ccavenuepay = Mage::getModel('ccavenuepay/method_ccavenuepay');
        $form = new Varien_Data_Form();
        $form->setAction($ccavenuepay->getCcavenuepayUrl())->setName('redirect')->setMethod('post')->setUseContainer(true);
        foreach ($ccavenuepay->getStandardCheckoutFormFields('redirect') as $field => $value) {
            $form->addField($field, 'hidden', array('name' => $field, 'value' => $value));
        }
        $html = '<html>
				<body style="text-align:center;">';
        $html .= $this->__('You will be redirected to Ccavenuepay in a few seconds.<br /><center>');
        $html .= '<img src="' . $this->getSkinUrl('ccavenue/ccavenue_bz.jpg') . '" border="1" alt="Logo" width="185px" height="70px" /><br /><br />';
        $html .= '<img src="' . $this->getSkinUrl('ccavenue/ajax-loader.gif') . '" alt="ajax-loader" align="center" width="128px" height="15px" /><br /></center>';
        $html .= $this->__('Copyright bluezeal.in');
        $html .= $form->toHtml();
        $html .= '<script type="text/javascript">
	   			  function formsubmit()
				  {
				  	document.redirect.submit();	
				  }
					setTimeout("formsubmit()", 3000);
	            </script>';
        $html .= '</body></html>';
        return $html;
    }
开发者ID:sagmahajan,项目名称:aswan_release,代码行数:25,代码来源:Redirect.php

示例4: _toHtml

 protected function _toHtml()
 {
     try {
         $form = new Varien_Data_Form();
         $form->setAction($this->_getSageSession()->getAcsurl())->setId('sagepaydirectpro_3dsecure')->setName('sagepaydirectpro_3dsecure')->setMethod('POST')->setUseContainer(true);
         $params = array('_secure' => true, 'storeid' => Mage::app()->getStore()->getId());
         $_shipSessData = Mage::getSingleton('checkout/type_onepage')->getQuote()->getShippingAddress()->getShippingMethod();
         if ($_shipSessData) {
             $params['shipmethod'] = $_shipSessData;
         }
         $postUrl = Mage::getModel('core/url')->addSessionParam()->getUrl('sgps/directPayment/callback3d', $params);
         $form->addField('PaReq', 'hidden', array('name' => 'PaReq', 'value' => $this->_getSageSession()->getPareq()));
         $form->addField('MD', 'hidden', array('name' => 'MD', 'value' => $this->_getSageSession()->getEmede()));
         #$form->addField('TermUrl', 'hidden', array('name'=>'TermUrl', 'value' => Mage::getUrl('sgps/directPayment/callback3d', array('_secure' => true))));
         $form->addField('TermUrl', 'hidden', array('name' => 'TermUrl', 'value' => $postUrl));
         $html = '<html><body>';
         $html .= '<code>' . $this->__('Loading 3D secure form...') . '</code>';
         $html .= $form->toHtml();
         $html .= '<script type="text/javascript">document.getElementById("sagepaydirectpro_3dsecure").submit();</script>';
         $html .= '</body></html>';
         Sage_Log::log($html, null, 'SagePaySuite_REQUEST.log');
     } catch (Exception $e) {
         Ebizmarts_SagePaySuite_Log::we($e);
     }
     return $html;
 }
开发者ID:CherylMuniz,项目名称:fashion,代码行数:26,代码来源:Threedredirectpost.php

示例5: _toHtml

 protected function _toHtml()
 {
     $standard = Mage::getModel('bradesco/standard');
     $form = new Varien_Data_Form();
     $scopusTipo = $standard->getScopusTipo();
     $form->setAction($standard->getBradescoUrl($bradesco_tipo))->setId('bradesco_standard_checkout')->setName('bradesco_standard_checkout')->setMethod('POST')->setUseContainer(true);
     $orderId = Mage::getSingleton('checkout/session')->getLastRealOrderId();
     $order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
     $bradesco = Mage::getModel('bradesco/bradesco')->setUrlBradesco($order->getId(), $standard->getBradescoUrl($bradesco_tipo));
     foreach ($standard->getStandardCheckoutFormFields() as $field => $value) {
         $form->addField($field, 'hidden', array('name' => $field, 'value' => $value));
     }
     $html = '<html>';
     $html .= '<head>';
     $html .= '<meta http-equiv="Content-Type" content="text/html; " /></head>';
     $html .= '<body>';
     $html .= $this->__('Você será redirecionado para o Bradesco em alguns instantes.');
     $html .= $form->toHtml();
     $html .= '<script type="text/javascript">document.getElementById("bradesco_standard_checkout").submit();</script>';
     $html .= '</body></html>';
     // echo '<pre>';
     // print_r($form->toHtml());
     // die();
     return $html;
 }
开发者ID:xiaoguizhidao,项目名称:emporiodopara,代码行数:25,代码来源:Redirect.php

示例6: _toHtml

 protected function _toHtml()
 {
     $session = Mage::getSingleton('checkout/session');
     $order = Mage::getModel('sales/order')->loadbyIncrementId($session->getLastRealOrderId());
     // Prevent ugly errors
     $data = $order->getData();
     if (empty($data) || !is_object($order) || !is_object($order->getBillingAddress())) {
         return "<h3>Please refresh the page</h3>";
     }
     $order->addStatusToHistory(Mage_Sales_Model_Order::STATE_HOLDED, 'Customer redirected to NETBANX payment page, awaiting payment confirmation from NETBANX', true);
     $order->save();
     // Construct the redirection form
     $form = new Varien_Data_Form(array('id' => 'netbanx_iframe', 'action' => $this->payment_url(), 'name' => 'netbanx_iframe', 'method' => 'POST'));
     $form->setUseContainer(true);
     $form->addField("clickhere", 'submit', array('name' => "clickhere", 'value' => "click here", 'label' => 'If it\'s taking too long'));
     // Add all the NETBANX parameters
     foreach ($this->craft_parameters($order) as $name => $value) {
         $form->addField($name, 'hidden', array('name' => $name, 'value' => $value));
     }
     // Craft the HTML and return
     $html = $form->toHtml();
     $html .= '<script type="text/javascript">document.getElementById("netbanx_iframe").submit();</script>';
     if (Mage::getStoreConfig('payment/Netbanx/iframe')) {
         $html = '<html><body>' . $this->__('Please wait whilst you\'re taken to the secure NETBANX page.') . '<br><br>' . $html . '</body></html>';
     }
     return $html;
 }
开发者ID:kzar,项目名称:NETBANX-Magento-payment-module--iitc-,代码行数:27,代码来源:Redirect.php

示例7: createRedirectForm

 public function createRedirectForm()
 {
     $form = new Varien_Data_Form();
     $form->setAction($this->getBancoUrl())->setId('debitobb_checkout')->setName('pagamento')->setMethod('POST')->setUseContainer(true);
     $fields = $this->getCheckoutFormFields();
     foreach ($fields as $field => $value) {
         $form->addField($field, 'hidden', array('name' => $field, 'value' => $value));
     }
     $submit_script = 'document.getElementById(\'debitobb_checkout\').submit();';
     $html = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
     $html .= '<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="pt-BR">';
     $html .= '<head>';
     $html .= '<meta http-equiv="Content-Language" content="pt-br" />';
     $html .= '<meta name="language" content="pt-br" />';
     $html .= '<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />';
     $html .= '<style type="text/css">';
     $html .= '* { font-family: Arial; font-size: 16px; line-height: 34px; text-align: center; color: #222222; }';
     $html .= 'small, a, a:link:visited:active, a:hover { font-size: 13px; line-height: normal; font-style: italic; }';
     $html .= 'a, a:link:visited:active { font-weight: bold; text-decoration: none; }';
     $html .= 'a:hover { font-weight: bold; text-decoration: underline; color: #555555; }';
     $html .= '</style>';
     $html .= '</head>';
     $html .= '<body onload="' . $submit_script . '">';
     $html .= 'Você será redirecionado ao <strong>Banco do Brasil</strong> em alguns instantes.<br />';
     $html .= '<small>Se a página não carregar, <a href="#" onclick="' . $submit_script . ' return false;">clique aqui</a>.</small>';
     $html .= $form->toHtml();
     $html .= '</body></html>';
     return utf8_decode($html);
 }
开发者ID:renanblecha,项目名称:Prestige_Debitobb,代码行数:29,代码来源:Standard.php

示例8: _getElementHtml

 /**
  * @param Varien_Data_Form_Element_Abstract $element
  * @return string
  */
 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     /** @var Mage_SalesRUle_Model_Rule $salesRuleModel */
     $salesRuleModel = Mage::getModel('salesrule/rule');
     /** @var Mage_Widget_Block_Adminhtml_Widget_Options $widgetOptions */
     $widgetOptions = $element->getForm()->getParent();
     $widgetValues = $widgetOptions->getWidgetValues();
     if ($widgetValues && isset($widgetValues['rule'])) {
         $rules = unserialize(base64_decode($widgetValues['rule']));
         $salesRuleModel->loadPost($rules);
         $salesRuleModel->getConditions()->setJsFormObject('rule_conditions_fieldset');
         $salesRuleModel->getActions()->setJsFormObject('rule_actions_fieldset');
     }
     $form = new Varien_Data_Form();
     $form->setHtmlIdPrefix('rule_');
     /** @var Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset $renderer */
     $renderer = Mage::getBlockSingleton('adminhtml/widget_form_renderer_fieldset')->setTemplate('rapidcampaign/fieldset.phtml')->setNewChildUrl($this->getUrl('*/promo_quote/newConditionHtml/form/rule_conditions_fieldset'));
     $fieldset = $form->addFieldset('conditions_fieldset', array())->setRenderer($renderer);
     $fieldset->addField('conditions', 'text', array('name' => 'conditions', 'label' => Mage::helper('salesrule')->__('Conditions'), 'title' => Mage::helper('salesrule')->__('Conditions'), 'required' => true))->setRule($salesRuleModel)->setRenderer(Mage::getBlockSingleton('rule/conditions'));
     $fieldset->addClass('fieldset-nowrap');
     $form->setValues($salesRuleModel->getData());
     Mage::register('rapidcampaign/widget/created', true, true);
     $html = $form->toHtml();
     if ($element->getNote()) {
         $html .= '<p class="note"><span>' . $element->getNote() . '</span></p>';
     }
     return $html;
 }
开发者ID:RapidCampaign,项目名称:rapid-magento-extension,代码行数:32,代码来源:Condition.php

示例9: _toHtml

	protected function _toHtml()
    {
		$standard = Mage::getModel('BoletoBancario/standard');
		$order_id = $this->getRequest()->getParam('order_id');

        $form = new Varien_Data_Form();
        $form->setAction($standard->getBoletoBancarioViewUrl())
            ->setId('BoletoBancario_standard_view')
            ->setName('BoletoBancario_standard_view')
            ->setMethod('POST')
            ->setUseContainer(true);
        
		foreach ($standard->getStandardViewFormFields($this->getOrder($order_id)) as $field=>$value) {
            $form->addField($field, 'hidden', array('name'=>$field, 'value'=>$value));
        }
		
		$home_url = $this->getSkinUrl('images/boleto/boleto.png');
		$carregando = $this->getSkinUrl('images/boleto/boletocarregando.gif');
        $html = '<html><body>';
        $html.= $this->__('<p align="center"><strong>Estamos gerando o seu Boleto.</strong></p>
		<p align="center"><strong>Aguarde...</strong></p>
			<p align="center">
			<img src="'. $carregando .'" width="169" height="70" /><br /><br />
			<input type="image" src="'. $home_url .'" value="Gerando o Boleto" width="128" height="128"/>
			</p>');
        $html.= $form->toHtml();
		
		//echo $this->getOrder()->getBillingAddress();
		
		$html.= '<script type="text/javascript">setTimeout(function(){document.getElementById("BoletoBancario_standard_view").submit()}, 2000);</script>';
        $html.= '</body></html>';

        return $html;
    }
开发者ID:rafaelferreiraxd,项目名称:modulos-magento,代码行数:34,代码来源:View.php

示例10: getPaymentInfoHtml

 public function getPaymentInfoHtml($ccType)
 {
     $form = new Varien_Data_Form();
     /*
      * Slip Settings.
      */
     $fieldset = $form->addFieldset("santander_slip_fieldset", array("legend" => null));
     $fieldset->addField("tax", "hidden", array("name" => 'tax', "value" => $this->_getStoreConfig($ccType, 'tax')));
     $fieldset->addField("demonstrative1", "hidden", array("name" => 'demonstrative1', "value" => $this->_getStoreConfig($ccType, 'demonstrative1')));
     $fieldset->addField("demonstrative2", "hidden", array("name" => 'demonstrative2', "value" => $this->_getStoreConfig($ccType, 'demonstrative2')));
     $fieldset->addField("demonstrative3", "hidden", array("name" => 'demonstrative3', "value" => $this->_getStoreConfig($ccType, 'demonstrative3')));
     $fieldset->addField("instructions1", "hidden", array("name" => 'instructions1', "value" => $this->_getStoreConfig($ccType, 'instructions1')));
     $fieldset->addField("instructions2", "hidden", array("name" => 'instructions2', "value" => $this->_getStoreConfig($ccType, 'instructions2')));
     $fieldset->addField("instructions3", "hidden", array("name" => 'instructions3', "value" => $this->_getStoreConfig($ccType, 'instructions3')));
     $fieldset->addField("instructions4", "hidden", array("name" => 'instructions4', "value" => $this->_getStoreConfig($ccType, 'instructions4')));
     $fieldset->addField("acceptance", "hidden", array("name" => 'acceptance', "value" => $this->_getStoreConfig($ccType, 'acceptance')));
     $fieldset->addField("specie", "hidden", array("name" => 'specie', "value" => $this->_getStoreConfig($ccType, 'specie')));
     $fieldset->addField("specie_doc", "hidden", array("name" => 'specie_doc', "value" => $this->_getStoreConfig($ccType, 'specie_doc')));
     $fieldset->addField("client_code", "hidden", array("name" => 'client_code', "value" => $this->_getStoreConfig($ccType, 'client_code')));
     $fieldset->addField("outlet", "hidden", array("name" => 'outlet', "value" => $this->_getStoreConfig($ccType, 'outlet')));
     $fieldset->addField("portfolio", "hidden", array("name" => 'portfolio', "value" => $this->_getStoreConfig($ccType, 'portfolio')));
     $fieldset->addField("portfolio_description", "hidden", array("name" => 'portfolio_description', "value" => $this->_getStoreConfig($ccType, 'portfolio_description')));
     /*
      * Slip Transaction Data.
      */
     $slip_data = $this->getSlipData();
     $fieldset->addField("number", "hidden", array("name" => 'number', "value" => $slip_data['number']));
     $fieldset->addField("expiration", "hidden", array("name" => 'expiration', "value" => $slip_data['expiration']));
     $fieldset->addField("amount", "hidden", array("name" => 'amount', "value" => $slip_data['amount']));
     /*
      * Order Information.
      */
     $_order = $this->getOrder();
     $order_id = $_order->getIncrementId();
     $billing_address = $_order->getBillingAddress();
     $customer_name = $billing_address->getName();
     $customer_address = $billing_address->getStreetFull();
     $customer_city = $billing_address->getCity();
     $customer_region = $billing_address->getRegion();
     $customer_postcode = $billing_address->getPostcode();
     $customer_city_region_postcode = "{$customer_city} - {$customer_region} - {$customer_postcode}";
     $order_items_count = count($_order->getAllVisibleItems());
     $fieldset->addField("order_id", "hidden", array("name" => 'order_id', "value" => $order_id));
     $fieldset->addField("customer_name", "hidden", array("name" => 'customer_name', "value" => $customer_name));
     $fieldset->addField("customer_address", "hidden", array("name" => 'customer_address', "value" => $customer_address));
     $fieldset->addField("customer_city_region_postcode", "hidden", array("name" => 'customer_city_region_postcode', "value" => $customer_city_region_postcode));
     /*
      * Company Information.
      */
     $company_address = Mage::getStoreConfig('general/store_information/address');
     $company_name = Mage::getStoreConfig('general/store_information/name');
     $company_logo_url = Mage::getStoreConfig('design/header/logo_src');
     $fieldset->addField("company_address", "hidden", array("name" => 'company_address', "value" => $company_address));
     $fieldset->addField("company_name", "hidden", array("name" => 'company_name', "value" => $company_name));
     $fieldset->addField("company_logo_url", "hidden", array("name" => 'company_logo_url', "value" => $this->getSkinUrl($company_logo_url)));
     $fieldset->addField("submit", "submit", array("label" => Mage::helper('slips')->__('Submit this transaction'), "value" => Mage::helper('slips')->__('Submit')));
     return $form->toHtml();
 }
开发者ID:Hospeed,项目名称:gamuza_slips-magento,代码行数:58,代码来源:Slip.php

示例11: generateForm

 /**
  * Generate HTML form
  *
  * @return string
  */
 public function generateForm()
 {
     $form = new Varien_Data_Form();
     $form->setAction($this->helper->getCheckoutSession()->getEmerchantPayCheckoutRedirectUrl())->setId('emerchantpay_redirect_notification')->setName('emerchantpay_redirect_notification')->setMethod('GET')->setUseContainer(true);
     $submitButton = new Varien_Data_Form_Element_Submit(array('value' => $this->__('Click here, if you are not redirected within 10 seconds...')));
     $submitButton->setId($this->getButtonId());
     $form->addElement($submitButton);
     return $form->toHtml();
 }
开发者ID:snehamalvankar,项目名称:magento-ce-emp-plugin,代码行数:14,代码来源:Checkout.php

示例12: getCrossSellFieldset

 public function getCrossSellFieldset($model)
 {
     $form = new Varien_Data_Form();
     $prefix = 'chain[' . $model->getId() . '][';
     $fieldset = $form->addFieldset('fieldset', array('legend' => Mage::helper('email')->__('Cross-sells')));
     $fieldset->addField('cross_sells_enabled', 'select', array('label' => Mage::helper('email')->__('Include cross-sells in email'), 'required' => false, 'name' => $prefix . 'cross_sells_enabled]', 'values' => Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray(), 'value' => $model->getCrossSellsEnabled()));
     $fieldset->addField('cross_sells_type_id', 'select', array('label' => Mage::helper('email')->__('Cross-sells source'), 'required' => false, 'name' => $prefix . 'cross_sells_type_id]', 'values' => Mage::getSingleton('email/system_source_crossSell')->toOptionArray(), 'value' => $model->getCrossSellsTypeId()));
     return $form->toHtml();
 }
开发者ID:ashfaqphplhr,项目名称:artificiallawnsforturf,代码行数:9,代码来源:Chain.php

示例13: _beforeToHtml

 /**
  * (non-PHPdoc)
  * @see Mage_Core_Block_Abstract::_beforeToHtml()
  */
 protected function _beforeToHtml()
 {
     $standard = $this->getStandard();
     $form = new Varien_Data_Form();
     $form->setAction($standard->getRequestUrl())->setId('standard_checkout')->setName('standard_checkout')->setMethod('POST')->setUseContainer(true);
     foreach ($standard->getRedirectFields() as $field => $value) {
         $form->addField($field, 'hidden', array('name' => $field, 'value' => $value));
     }
     $this->setData('message', Mage::helper('bb')->__('You will be redirected to your bank account in a few momments.'));
     $this->setData('form', $form->toHtml());
     return $this;
 }
开发者ID:albertobraschi,项目名称:Quack-BB,代码行数:16,代码来源:Redirect.php

示例14: _toHtml

 protected function _toHtml()
 {
     $dragonpay = Mage::getModel('dragonpay/standard');
     $form = new Varien_Data_Form();
     $form->setAction($dragonpay->getUrl())->setId('dragonpay_checkout')->setName('dragonpay_checkout')->setMethod('post')->setUseContainer(true);
     $html = '<html><body>';
     $html .= $this->__('You will be redirected to the payment gateway in a few seconds.');
     $html .= $form->toHtml();
     $html .= '<script type="text/javascript">document.getElementById("dragonpay_checkout").submit();</script>';
     $html .= '</body></html>';
     return $html;
 }
开发者ID:lordmodkore,项目名称:dragonpay_payment,代码行数:12,代码来源:Redirect.php

示例15: _toHtml

    protected function _toHtml()
    {
        $form = new Varien_Data_Form();
        $form->setAction($this->getTargetURL())->setId($this->getFormId())->setName($this->getFormId())->setMethod($this->getMethod())->setUseContainer(true);
        foreach ($this->_getFormFields() as $field => $value) {
            $form->addField($field, 'hidden', array('name' => $field, 'value' => $value));
        }
        //*******************************************
        // BEGIN PAP TRACKING EDITS
        //*******************************************
        $config = Mage::getSingleton('pap/config');
        // we'll need this
        // Add a special field to hold the affiliate cookie data
        $form->addField('pap_ab78y5t4a', 'hidden', array('name' => 'pap-cookie-data', 'id' => 'pap_ab78y5t4a', 'value' => ''));
        //*******************************************
        // END PAP TRACKING EDITS
        //*******************************************
        $html = $form->toHtml();
        //*******************************************
        // BEGIN PAP TRACKING EDITS
        //*******************************************
        ob_start();
        ?>
        <script type="text/javascript">
            (function () {
                var papDomain = (("https:" == document.location.protocol) ? "https://":"http://");papDomain+="<?php 
        echo preg_replace('~^(https?://)?~', '', $config->getRemotePath());
        ?>
";
                var papId = 'pap_x2s6df8d';
                // adjust the ID iff it would conflict with an existing element
                if ((function(elementId){var nodes=new Array();var tmpNode=document.getElementById(elementId);while(tmpNode){nodes.push(tmpNode);tmpNode.id="";tmpNode=document.getElementById(elementId);for(var x=0;x<nodes.length;x++){if(nodes[x]==tmpNode){tmpNode=false;}}}})('pap_x2s6df8d')) {papId += '_salestrack';}
                document.write(unescape("%3Cscript id='pap_x2s6df8d' src='" + papDomain + "/scripts/<?php 
        echo $config->getTracksalescript();
        ?>
' type='text/javascript'%3E%3C/script%3E"));
            })();
        </script>
        <?php 
        $script_block = ob_get_clean();
        // Append the script to make the affiliate tracking work
        $html .= $script_block;
        $html .= '<script type="text/javascript">';
        // Write the tracking data to the form, rather than registering the sale immediately
        $html .= 'PostAffTracker.writeCookieToCustomField(\'pap_ab78y5t4a\');';
        $html .= '</script>';
        //*******************************************
        // END PAP TRACKING EDITS
        //*******************************************
        $html .= '<script type="text/javascript">document.getElementById("' . $this->getFormId() . '").submit();</script>';
        return $html;
    }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:52,代码来源:Redirect.php


注:本文中的Varien_Data_Form::toHtml方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。