1

如何使用 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
}
4

2 回答 2

0

您可以通过使用类来使用此方法

public function getSomePostData()
{



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

    }

}

或者你可以functionbutton click

于 2012-11-06T07:14:24.587 回答
0

尝试

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

请参阅Zend 框架:我可以只获取 GET 参数吗?

于 2012-11-06T08:19:38.483 回答