php – 链接到一个页面结帐中的特定步骤

是否可以将浏览器重定向到单页结帐中的第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; ?>');

相关文章

统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
前言 之前做了微信登录,所以总结一下微信授权登录并获取用户...
FastAdmin是我第一个接触的后台管理系统框架。FastAdmin是一...
之前公司需要一个内部的通讯软件,就叫我做一个。通讯软件嘛...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...