繁体   English   中英

Magento数量框,在list.phtml上带有JQUERY

[英]Magento Quantity box with JQUERY on list.phtml

我想在magento的list.phtml上添加一个数量框。 当前该框的代码是:

<div>
       <button type="button" style=" margin-left:185px; min-height:48px;"title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocationAjax('<?php echo $this->getAddToCartUrl($_product) ?>','<?php echo $_product->getId()?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button><br /><br/>
       </div>

现在仅添加1种产品即可使用,但是没有数量盒。 如何在不重新加载页面的情况下使它正常工作?

这些是我在该页面底部加载的脚本。 http://pastebin.com/0bdey92h

希望有人来救我!

尝试这个:

jQuery('button.btn-cart').parent().append('<input type="text" name="qty">');

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM