· Publicado por Sergio Baixauli en: Magento
Etiquetas: caja de cantidad, magento, qty box
Abrimos el fichero /template/catalog/product/list.phtml
y cambiamos las líneas siguientes
- <?php if($_product->isSaleable()): ?>
- <button class="form-button" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><?php echo $this->__('Add to Cart') ?></span></button>
por estas
- 109 <input name="qty" type="text" class="input-text qty" id="qty" maxlength="12" value="<?php echo $this->getMinimalQty($_product) ?>" />
- </form>
- <script type="text/javascript">
- var productAddToCartForm_<?php echo $_product->getId(); ?> = new VarienForm('product_addtocart_form_<?php echo $_product->getId(); ?>');
- if (this.validator.validate()) {
- this.form.submit();
- }
- </script>
Recordar que estoy hay que tocarlo tanto en la vista de grid como en list. Está todo en el mismo fichero.
Compartir:







Loading... 


Twitter
En estos momentos no existen comentarios. ¡Sé el primero!