php – 链接到一个页面结帐中的特定步骤
发布时间:2020-12-13 18:11:45 所属栏目:PHP教程 来源:网络整理
导读:是否可以将浏览器重定向到单页结帐中的第n步?如果是这样,怎么会去做呢? 我正在开发一个付款模块,并且有一种“取消”操作,我希望将用户返回到结帐中您选择付款方式的步骤. 我目前将用户返回到结帐的第一步,如下所示: $this-_redirect('checkout/onepage',a
是否可以将浏览器重定向到单页结帐中的第n步?如果是这样,怎么会去做呢?
我正在开发一个付款模块,并且有一种“取消”操作,我希望将用户返回到结帐中您选择付款方式的步骤. 我目前将用户返回到结帐的第一步,如下所示: $this->_redirect('checkout/onepage',array('_secure'=>true)); 另一个问题是我不能一直工作,在某些浏览器中,我真的不喜欢“有时”命名这类作品.这是已知和/或普遍接受的东西吗?关于此,我几乎没有实际的信息,但我有客户对这种行为的抱怨.他们一般不会给我任何细节,所以这是一个死路一条.
结帐/ onepage.phtml:
在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; ?>'); (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |