Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何让 magento 1.7 为捆绑产品呈现 view.phtml,为简单产品呈现 view.phtml,反之亦然?
基本上我该如何为不同的产品类型做不同的视图?
我对此也还是新手,如果有人有比我做的更好的方法,请发布。(我也可以从中学习..)
但我会使用一个view.phtml 文件并将其放在您想要用于捆绑视图的代码周围
<?php if($_product->getTypeId() == "bundle"){ ?> <div class="product-view"> ... </div> <?php } else { ?> <div class="product-view"> ... </div> <?php } ?>