Magento的:显示在一个页结帐的审查步骤 [英] Magento: Show the Review Step in One Page Checkout

查看:192
本文介绍了Magento的:显示在一个页结帐的审查步骤的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直没能算出这个对我的生活。我想表现的命令检查步骤(处理订单前的最后一步)马上就一页结帐在Magento。有什么建议么?感谢所有。

I have not been able to figure this out for the life of me. I wanted to show the order review step(final step before processing the order) right away on the one page checkout in Magento. Any suggestions? Thanks all.

推荐答案

如果你看一下onepage.phtml的底部,你会看到

If you look at the bottom of onepage.phtml, you will see

<?php if($this->getActiveStep()): ?>
   accordion.openSection('opc-<?php echo $this->getActiveStep() ?>');
<?php endif; ?>

这就要求 Mage_Checkout_Block_Onepage :: getActiveStep()来确定首次表明了哪一步。您可以通过创建自己的onepage.phtml在你的主题,并改变块以上是覆盖这样的:

which calls Mage_Checkout_Block_Onepage::getActiveStep() to determine which step to show first. You can override this by creating your own onepage.phtml in your theme and changing the block above to be:

   accordion.openSection('opc-review');

然而,openSection功能仅执行如果在这种情况下,目标元素('OPC-审查'),具有一类的允许,这是由Magento的AJAX设置一旦previous结帐步骤完成。你可以使用原型手动添加允许类,但一旦你的步显示,你会看到,它是空的,因为AJAX还没有填充的基础上previous步骤为$内容没有发生p $ pvious步骤呢!

However, the openSection function only executes if the target element ('opc-review') in this case, has a class of "allow" which is set by Magento's AJAX once the previous checkout steps are completed. You could manually add the "allow" class using prototype, but once you get the step to display, you'll see that it is empty, since the AJAX hasn't populated the content based on the previous steps as the previous steps haven't happened yet!

所以...你可以创建一个基于Cart.php一个新块,并插入到onepage.phtml使用 $这个 - &GT;直到最底层(块ID')和布局XML。您需要在 OL#checkoutSteps 李#OPC-summary.section允许或类似的东西里面插入这一点,让JS上述更改为 accordion.openSection(OPC-摘要);

So... You could create a new block based on Cart.php and insert that into onepage.phtml using $this->getChildHtml('block-id') and the layout xml. You would need to insert it inside the ol#checkoutSteps as an li#opc-summary.section allow or something like that, and make the js change above to be accordion.openSection('opc-summary');

这是最好的,我可以在此刻为你做。 HTH, JD

That's the best I can do at the moment for you. HTH, JD

这篇关于Magento的:显示在一个页结帐的审查步骤的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆