для темы RWD, v1.9.2.1, есть ли способ отобразить промежуточный итог, отгрузку и итоговую сумму, как последний блок проверки, перед отправкой заказа?
Согласно: app / design / frontend / rwd / default / layout / checkout.xml:
<!-- One page checkout order review block -->
<checkout_onepage_review translate="label">
<label>One Page Checkout Overview</label>
<!-- Mage_Checkout -->
<remove name="right"/>
<remove name="left"/>
<block type="checkout/onepage_review_info" name="root" output="toHtml" template="checkout/onepage/review/info.phtml">
<action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/onepage/review/item.phtml</template></action>
<action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/onepage/review/item.phtml</template></action>
<action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/onepage/review/item.phtml</template></action>
<block type="checkout/cart_totals" name="checkout.onepage.review.info.totals" as="totals" template="checkout/onepage/review/totals.phtml"/>
<block type="core/text_list" name="checkout.onepage.review.info.items.before" as="items_before" translate="label">
<label>Items Before</label>
</block>
<block type="core/text_list" name="checkout.onepage.review.info.items.after" as="items_after" translate="label">
<label>Items After</label>
</block>
<block type="checkout/agreements" name="checkout.onepage.agreements" as="agreements" template="checkout/onepage/agreements.phtml"/>
<block type="core/template" name="checkout.onepage.review.button" as="button" template="checkout/onepage/review/button.phtml"/>
</block>
<block type="core/text_list" name="additional.product.info" translate="label">
<label>Additional Product Info</label>
</block>
</checkout_onepage_review>
Не похоже, что эта строка выполняется:
<block type="checkout/cart_totals" name="checkout.onepage.review.info.totals" as="totals" template="checkout/onepage/review/totals.phtml"/>
У меня есть: app / design / frontend / rwd / default / template / checkout / onepage / review / totals.phtml:
/**
* @see Mage_Checkout_Block_Cart_Totals
*/
?>
<?php if ($this->getTotals()): ?>
<tfoot>
<?php $_colspan = $this->helper('tax')->displayCartBothPrices() ? 5 : 3; ?>
<?php // echo $this->renderTotals(null, $_colspan); ?>
<?php echo $this->renderTotals('footer', $_colspan); ?>
<?php if ($this->needDisplayBaseGrandtotal()):?>
<tr>
<td class="a-right" colspan="<?php echo $_colspan; ?>">
<small><?php echo $this->helper('sales')->__('Your credit card will be charged for') ?></small>
</td>
<td class="a-right">
<small><?php echo $this->displayBaseGrandtotal() ?></small>
</td>
</tr>
<?php endif?>
</tfoot>
<?php endif; ?>
Любая помощь будет оценена!
Я нашел решение:
приложение / дизайн / интерфейс / RWD / по умолчанию / шаблон / выписка / OnePage / обзор / totals.phtml
<?php
$quote = Mage::getSingleton('checkout/session')->getQuote();
$totalQuantity = $quote->getItemsQty();
$subTotal = $quote->getSubtotal();
$grandTotal = $quote->getGrandTotal();
$shippingTotal = $grandTotal - $subTotal;
?>
<?php if ($this->getTotals()): ?>
<tfoot>
<?php $_colspan = $this->helper('tax')->displayCartBothPrices() ? 5 : 3; ?>
<?php // echo $this->renderTotals(null, $_colspan); ?>
<?php echo $this->renderTotals('footer', $_colspan); ?>
<tr>
<td class="a-right" colspan="<?php echo $_colspan; ?>">
<?php echo $this->helper('sales')->__('Subtotal') ?>
</td>
<td class="a-right">
<?php echo Mage::helper('core')->currency($subTotal,true,false); ?>
</td>
</tr>
<tr>
<td class="a-right" colspan="<?php echo $_colspan; ?>">
<?php echo $this->helper('sales')->__('Shipping & Handling') ?>
</td>
<td class="a-right">
<?php echo Mage::helper('core')->currency($shippingTotal,true,false); ?>
</td>
</tr>
<tr>
<td class="a-right" colspan="<?php echo $_colspan; ?>">
<strong><?php echo $this->helper('sales')->__('Your credit card will be charged for') ?></strong>
</td>
<td class="a-right">
<strong><?php echo $this->displayBaseGrandtotal() ?></strong>
</td>
</tr>
</tfoot>
<?php endif; ?>
Других решений пока нет …