我添加了一个自定义模块,用于从我的商店结帐流程中删除登录步骤,使结算详情成为第一步。即使客户已退出,我也希望显示结算明细表。我不知道如何更改以下代码以实现我想要的目标。
<?php
class Step_Removal_Block_Onepage extends Mage_Checkout_Block_Onepage
{
public function getSteps()
{
$steps = array();
if (!$this->isCustomerLoggedIn()) {
//$steps['login'] = $this->getCheckout()->getStepData('login');
}
$stepCodes = array('billing', 'shipping', 'shipping_method', 'payment', 'review');
foreach ($stepCodes as $step) {
$steps[$step] = $this->getCheckout()->getStepData($step);
}
return $steps;
}
public function getActiveStep()
{
//return $this->isCustomerLoggedIn() ? 'billing' : 'login';
return $this->isCustomerLoggedIn() ? 'billing' : 'billing';
}
}
答案 0 :(得分:0)
替换此代码
foreach ($stepCodes as $step) {
$steps[$step] = $this->getCheckout()->getStepData($step);
}
return $steps;
带
foreach ($stepCodes as $step) {
$steps[$step] = $this->getCheckout()->getStepData($step);
}
$steps['billing']['allow']=1;
return $steps;