脚本宝典收集整理的这篇文章主要介绍了php – 链接到一个页面结帐中的特定步骤,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在开发一个付款模块,并且有一种“取消”操作,我希望将用户返回到结帐中您选择付款方式的步骤.
我目前将用户返回到结帐的第一步,如下所示:
$this->_redirect('checkout/onepage',array('_secure'=>true));
另一个问题是我不能一直工作,在某些浏览器中,我真的不喜欢“有时”命名这类作品.这是已知和/或普遍接受的东西吗?关于此,我几乎没有实际的信息,但我有客户对这种行为的抱怨.他们一般不会给我任何细节,所以这是一个死路一条.
在PHP中
$step = Mage::app()->getRequest()->getParam('step'); $stepCodes = array('billing','shipping','shipping_method','payment','review'); if (($step) && (in_array($step,$stepCodes)) && ($this->getActiveStep() == 'billing')) { $checkout = Mage::getSingleton('checkout/tyPE_onepage'); $checkout->saveBilling(Mage::getSingleton('checkout/session')->getQuote()->getBillingAddress()->toArray(),false); $checkout->saveShipping(Mage::getSingleton('checkout/session')->getQuote()->getShippingAddress()->toArray(),false); $checkout->saveShippingMethod(Mage::getSingleton('checkout/session')->getQuote()->getShippingAddress()->getShippingMethod()); $activestep = Mage::app()->getRequest()->getParam('step'); } else if($this->getActiveStep()) { $activestep = $this->getActiveStep(); }
在javascript中
accordion.openSection('opc-<?PHP /* edIT */ echo $activestep; ?>');
以上是脚本宝典为你收集整理的php – 链接到一个页面结帐中的特定步骤全部内容,希望文章能够帮你解决php – 链接到一个页面结帐中的特定步骤所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。