Css (Magento)显示产品列表

Css (Magento)显示产品列表,css,Css,如何在列表中显示产品?将list.phtml的整个代码替换为此 <?php $_productCollection=$this->getLoadedProductCollection(); $_helper = $this->helper('catalog/output'); ?> <?php if(!$_productCollection->count()): ?> <p class="note-msg"><?php echo $th

如何在列表中显示产品?

将list.phtml的整个代码替换为此

<?php
$_productCollection=$this->getLoadedProductCollection();
$_helper = $this->helper('catalog/output');
?>
<?php if(!$_productCollection->count()): ?>
<p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
<?php else: ?>
<div class="category-products">
<?php echo $this->getToolbarHtml() ?>
<?php // List mode ?>
<?php if($this->getMode()!='grid'): ?>
<?php $_iterator = 0; ?>
<table id="itemtable" style="width:100%;">
<thead><tr><th>Name</th><th>Short description</th><th>Brand</th><th>Price With Tax</th><th>Price Without Tax</th><th>Add To Cart</th></tr></thead>
<tbody>
<?php foreach ($_productCollection as $_product): ?>
    <tr class="item<?php if( ++$_iterator == sizeof($_productCollection) ): ?> last<?php endif; ?>">
        <td><?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></td>
        <td><?php echo $_product->getShortDescription(); ?></td>
        <td>brand</td>
        <td><?php 
        $_priceIncludingTax = Mage::helper('tax')->getPrice($_product, $_product->getPrice(), true, null, null, null, null, false);
        echo $_priceIncludingTaxWithCurrency = Mage::helper('core')->currency($_priceIncludingTax); ?></td>
        <td><?php 
        $_priceExcludingTax = Mage::helper('tax')->getPrice($_product, $_product->getPrice(), false, null, null, null, null, false);
        echo $_priceExcludingTaxWithCurrency = Mage::helper('core')->currency($_priceExcludingTax); ?></td>
        <td>
        <?php if($_product->isSaleable() && !$_product->canConfigure()): ?>
       <form action="<?php echo $this->getAddToCartUrl($_product) ?>" method="post" id="product_addtocart_form_<?php echo $_product->getId(); ?>"><input name="qty" type="text" class="input-text qty" id="qty" maxlength="12" value="<?php echo $this->getMinimalQty($_product) ?>" /><button class="form-button" onclick="productAddToCartForm_<?php echo $_product->getId(); ?>.submit()"><span><?php echo $this->__('Add to Cart'); ?></span></button></form>
       <script type="text/javascript"> var productAddToCartForm_<?php echo $_product->getId(); ?> = new VarienForm('product_addtocart_form_<?php echo $_product->getId(); ?>');    productAddToCartForm_<?php echo $_product->getId(); ?>.submit = function(){ if (this.validator.validate()) {    this.form.submit(); }   }.bind(productAddToCartForm_<?php echo $_product->getId(); ?>);</script>
        <?php endif;?>
        </td>
    </tr>
<?php endforeach; ?>
</tbody>
</table>
<script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
<?php endif; ?>

<div class="toolbar-bottom">
    <?php echo $this->getToolbarHtml() ?>
</div>
</div>
<?php endif; ?>

<?php
//set product collection on after blocks
$_afterChildren = $this->getChild('after')->getSortedChildren();
foreach($_afterChildren as $_afterChildName):
    $_afterChild = $this->getChild('after')->getChild($_afterChildName);
    $_afterChild->setProductCollection($_productCollection);
?>
<?php echo $_afterChild->toHtml(); ?>
<?php endforeach; ?>
<style>
#itemtable th{ font-weight:bold!important;text-align:center!important;}
#itemtable tr{ height:50px!important;}
#itemtable tr td{ text-align:center!important;}
</style>

NameShort descriptionBrandPrice带TaxPrice不带TaxAdd到购物车 ); 装饰列表('products-list','none recursive') #itemtable th{字体重量:粗体!重要;文本对齐:居中!重要;} #itemtable tr{高度:50px!重要;} #itemtable tr td{text align:center!important;}

如果您有任何疑问,请告诉我…

1:-转到管理部分,然后单击系统>配置,在左侧有一个选项卡目录,单击它,然后在前端>列表模式下选择(仅列表)。2:-这将在列表视图中设置产品,但您必须更改html以获得准确的设计,请转到app/design/frontend/{your theme}/default/template/catalog/product/list.phtmlYes,所有内容都已存在。。如名称,天空,描述,添加到购物车框。。。您只需要根据您的要求进行设置。如果您想了解更多信息,请告诉我。在“list.phtml”中,我可以编辑内容本身(即简短描述),但不能编辑合成/定位。。。您是否建议代码将所有项目属性放在一行中,并在它们之间留有空格?(如:名称-品牌-颜色-价格)您能告诉我您使用的是哪个版本,以便我可以根据您的要求提供代码。。。谢谢