如何使用Magento_Payment_Block_Info在结账时捕获POST

时间:2012-11-06 05:03:22

标签: magento magento-1.6

如何使用Magento_Payment_Block_Info在页面结帐时捕获POST?

class Ks_Gippayment_Block_Info extends Mage_Payment_Block_Info
{


protected function _construct()
{
    parent::_construct();
    $this->setTemplate('ks/info.phtml');
}
public function getSomePostData()
{

    //****direct get POST/GET data from onepage checkout
}

2 个答案:

答案 0 :(得分:0)

您可以使用类

来使用此方法
public function getSomePostData()
{



if(isset ($_POST['submit']))
    {
        $name=$_POST['firstname'];
       /**like that**/

    }

}

或者您可以从function

传递button click

答案 1 :(得分:0)

尝试

public function getSomePostData()
{
    //****direct get POST/GET data from onepage checkout
    if(Mage::app()->getRequest()->getPost('firstname')){  
    }
}

请参阅Zend Framework: Can i just get GET params?