是否可以将浏览器重定向到单页结帐的第 n 步?如果是这样,人们将如何去做?
Is it possible to redirect the browser to nth step in the onepage checkout? If so, how would one go about doing it?
我正在开发一个付款模块,并且有一种取消"操作,我希望将用户返回到您选择付款方式的结帐步骤.
I'm working on a payment module and have a sort of "cancel" action that i would like to return the user to the step in checkout where you choose the payment method.
我目前将用户返回到结帐的第一步,如下所示:
I currently return the user to the first step of the checkout like so:
$this->_redirect('checkout/onepage', array('_secure'=>true));
另一个问题是我不是一直都在工作,在某些浏览器中,我真的不想将这种作品命名为有时".这是众所周知的和/或普遍接受的吗?我对此的实际信息很少,但我收到了客户对这种行为的投诉.他们通常不会给我任何细节,所以这是一个死胡同.
Another issue with this is that i does not work all the time, in certain browsers i'd really not like to name this sort of works "sometimes". Is that something that is known and/or commonly accepted? I have very little actual information regarding this, but i've had complaints from customers about this behaviour. They generally won't give me any specifics so it's kind of a dead end.
在 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; ?>');
这篇关于链接到单页结帐中的特定步骤的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
在 SELECT(MYSQL/PHP) 中加入 2 个表Joining 2 tables in SELECT(MYSQL/PHP)(在 SELECT(MYSQL/PHP) 中加入 2 个表)
如何使<option selected=“selected">由How to make lt;option selected=quot;selectedquot;gt; set by MySQL and PHP?(如何使lt;option selected=“selectedgt;由 MySQL 和 PHP 设置?)
使用 PHP 中的数组自动填充选择框Auto populate a select box using an array in PHP(使用 PHP 中的数组自动填充选择框)
PHP SQL SELECT where like search item with multiple wordsPHP SQL SELECT where like search item with multiple words(PHP SQL SELECT where like search item with multiple words)
json_encode 从 MSSQL-SELECT 产生 JSON_ERROR_UTF8json_encode produce JSON_ERROR_UTF8 from MSSQL-SELECT(json_encode 从 MSSQL-SELECT 产生 JSON_ERROR_UTF8)
MySQL ORDER BY rand(),名称 ASCMySQL ORDER BY rand(), name ASC(MySQL ORDER BY rand(),名称 ASC)