如何使用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
}
答案 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')){
}
}