Magento产品列表页加入购物车带数量:在list.phtml中,以list列表模式为例:
<?php if($_product->isSaleable()): ?>
<p>
<form action="<?php echo $this->getAddToCartUrl($_product) ?>" method="post" id="product_addtocart_form_<?php echo $_product->getId()?>"<?php if($_product->getOptions()): ?> enctype="multipart/form-data"<?php endif; ?>>
<?php if(!$_product->isGrouped()): ?>
<label for="qty"><?php echo $this->__('Qty') ?>:</label>
<input type="text" name="qty" id="qty" maxlength="12" value="<?php echo ($this->getMinimalQty($_product)?$this->getMinimalQty($_product):1) ?>" />
<?php endif; ?>
<button type="button" onclick="this.form.submit()"><span><span><span><?php echo $this->__('Add to Cart') ?></span></span></span></button>
</form>
</p>
<?php else: ?>
<p><span><?php echo $this->__('Out of stock') ?></span></p>
<?php endif; ?>
(责任编辑:最模板) |

仿万家购物返利网程序源
人气:5666
ecshop易趣英文外贸模板
人气:1288
ecshop仿蘑菇街2016最新模板
人气:711
shopex仿妙乐乐母婴用品商
人气:1012
仿taonpost代购网站系统整站
人气:902
ecshop免费模板仿一号店综
人气:5019