小智 8
Order Review表的设计模板位于frontend/{your_theme}/decault/template/checkout/onepage/review /文件夹中.您需要更新的文件是info.phtml(添加列)和item.phtml(添加实际图像).
前端/ {your_theme} /decault/template/checkout/onepage/review/info.phtml
<table class="data-table" id="checkout-review-table">
<?php if ($this->helper('tax')->displayCartBothPrices()): $colspan = $rowspan = 2; else: $colspan = $rowspan = 1; endif; ?>
<col />
<col width="1" />
<col width="1" />
<col width="1" />
<col width="1" /> <!-- <---Add this new col in table description -->
...
Run Code Online (Sandbox Code Playgroud)
然后找到表头并添加图像列:
<thead>
<tr>
<th rowspan="<?php echo $rowspan ?>"> </th> <!-- Here's the empty col for the image -->
<th rowspan="<?php echo $rowspan ?>"><?php echo $this->__('Product Name') ?></th>
<th colspan="<?php echo $colspan ?>" class="a-center"><?php echo $this->__('Price') ?></th>
...
Run Code Online (Sandbox Code Playgroud)
前端/ {your_theme} /decault/template/checkout/onepage/review/item.phtml
在item.phtml文件的开头,添加您的图片:
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
*/
?>
<?php $_item = $this->getItem()?>
<tr>
<!-- Product Image Here -->
<td><img src="<?php echo $this->getProductThumbnail()->resize(75); ?>" width="75" height="75" alt="<?php echo $this->htmlEscape($this->getProductName()) ?>" /></td>
<td><h3 class="product-name"><?php echo $this->htmlEscape($this->getProductName()) ?></h3>
...
Run Code Online (Sandbox Code Playgroud)
请记住 - 请勿更改核心文件,而是更新您自己主题中的模板文件.