前台看到 相幹商品
後台設定 商品->保持
可看到設定欄位
如要修改可以
找到catalog\view\theme\default\template\product.tpl
- <?php if ($products) { ?>
- <div id="tab-related" class="tab-content"><br>
- <div class="box-product">
- <?php foreach ($products as $product) { ?>
- <div>
- <?php if ($product['thumb']) { ?>
- <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div>
- <?php } ?>
- <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>
- <?php if ($product['price']) { ?>
- <div class="price">
- <?php if (!$product['special']) { ?>
- <?php echo $product['price']; ?>
- <?php } else { ?>
- <span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span>
- <?php } ?>
- </div>
- <?php } ?>
- <?php if ($product['rating']) { ?>
- <div class="rating"><img src="catalog/view/theme/default/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div>
- <?php } ?>
- <a onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button"><?php echo $button_cart; ?></a></div>
- <?php } ?>
- </div>
- </div>
- <?php } ?>
複製代碼
如想找到相幹輸出
找到 catalog\controller\product\product.php
- $results = $this->model_catalog_product->getProductRelated($this->request->get['product_id']);
複製代碼 這就是 related_id 輸出信號網頁設計
本文引用自:
留言列表