我想覆盖现有的购物车模板,因为我在其中添加了一些模块。我使用下面的 XML 来更新布局。
<checkout_cart_index>
<reference name="checkout.cart">
<action method="setCartTemplate">
<value>magefd/shipandpay/checkout/cart.phtml</value>
</action>
<action method="setEmptyTemplate">
<value>checkout/cart/noItems.phtml</value>
</action>
<action method="chooseTemplate"/>
<block type="fdshipandpay/checkout_cart_fee" name="magefd.shipandpay.cart.fee"
as="fee" template="magefd/shipandpay/checkout/cart/fee.phtml" />
</reference>
</checkout_cart_index>
但是,当新用户首次访问购物车时,将使用原始模板。刷新后,它工作完美。会话超时后,如果用户刷新它,则会出现相同的问题。我不知道它是怎么发生的。有人可以帮忙吗?
只需将您的 .phtml 文件复制到所有模板目录即可。例如,默认和基本主题。清理缓存,然后重试。.