这是持久模块的原因(从 Magento 1.6 开始)
查看您的模板文件:
app/design/frontend/[base/default]/[default/yourTheme]/template/persistent/checkout/onepage/login.phtml
这行代码:
<?php if ($this->getQuote()->isAllowedGuestCheckout()): ?>
<button id="onepage-guest-register-button" type="button" class="button" onclick="checkout.setMethod();"><span><span><?php echo $this->__('Continue') ?></span></span></button>
<?php else: ?>
<form action="<?php echo $this->getUrl('persistent/index/saveMethod'); ?>">
<button id="onepage-guest-register-button" type="submit" class="button"><span><span><?php echo $this->__('Register') ?></span></span></button>
</form>
<?php endif; ?>
查看表单操作 -> 它是使您的页面重新加载的原因
它如何改变模板?
app/design/frontend/[base/default]/[default/yourTheme]/layout/persistent.xml
这行代码:
<checkout_onepage_index>
<reference name="checkout.onepage.login">
<action method="setTemplate"><template>persistent/checkout/onepage/login.phtml</template></action>
<block type="persistent/form_remember" name="persistent.remember.me" template="persistent/remember_me.phtml" />
</reference>
<reference name="checkout.onepage.billing">
<action method="setTemplate"><template>persistent/checkout/onepage/billing.phtml</template></action>
<block type="persistent/form_remember" name="persistent.remember.me" template="persistent/remember_me.phtml" />
<block type="core/template" name="persistent.remember.me.tooltip" template="persistent/remember_me_tooltip.phtml" />
</reference>
</checkout_onepage_index>
如果你没有使用你的持久化模块,你可以通过改变 app/etc/modules/Mage_Persistent.xml 来禁用它<active>false</active>
看起来那个模块已经被巧妙地创建了,所以如果你禁用它,它不会破坏任何东西,虽然我不太确定
另一种方法是更改模板,将该行代码更改为:
<button type="button" class="button" onclick="checkout.setMethod();"><span><span><?php echo ($this->getQuote()->isAllowedGuestCheckout() ? $this->__('Continue') : $this->__('Register')) ?></span></span></button>