Yoogui_Comunicación Posted July 1, 2010 Share Posted July 1, 2010 Mi problema es el siguiente, estoy utilizando por defecto el tema PRESTASHOP, cuando me salen los productos en la pagina de productos, me sale el listado donde tengo el producto en forma de lista con la opción Ver y AÑADIR AL CARRITO. Yo quisiera tambien que me apareciera la opción de UNIDADES, que eso ya lo he conseguido, pero cuando le doy al botón de AÑADIR AL CARRITO siempre me pone 1 UNIDAD en vez de las que le he colocado... alguien sabe como pasar ese numero de unidades al CARRITO.Os pongo mi codigo modificado de PRODUCT-LIST.TPL > {if isset($products)} <!-- Products list --> </pre> <ul> {foreach from=$products item=product name=products} getImageLink($product.link_rewrite, $product.id_image, 'home')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" /> {if $product.new == 1}{l s='new'}{/if}{$product.name|escape:'htmlall':'UTF-8'|truncate:35:'...'} {$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'} <!-- quantity wanted --> {if $logged} quantity == 0) || $virtual} style="display:none;"{/if}> {l s='Cantidad :'} <input type="text" name="qty" id="quantity_wanted" class="text" value="{if isset($quantityBackup)}{$quantityBackup|intval}{else}1{/if}" size="2" maxlength="3" /> {/if} {if $logged} {if $product.on_sale} {l s='On sale!'} {elseif ($product.reduction_price != 0 || $product.reduction_percent != 0) && ($product.reduction_from == $product.reduction_to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $product.reduction_to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $product.reduction_from))} {l s='Price lowered!'} {/if} {if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if} {if ($product.allow_oosp OR $product.quantity > 0)}{l s='Available'}{else}{l s='Out of stock'}{/if} {if ($product.allow_oosp OR $product.quantity > 0) && $product.customizable != 2} {l s='Comprar'} {else} {l s='Add to cart'} {/if} {/if} {l s='View'} {/foreach} </ul> <br> <!-- /Products list --><br Link to comment Share on other sites More sharing options...
Yoogui_Comunicación Posted July 1, 2010 Author Share Posted July 1, 2010 He descubierto que hay que pasarle el valor con el parametro QTYpero alguien sabe como hay que colocar la varible CANTIDAD para que lo entienda prestashop >{if isset($products)} <!-- Products list --> </pre> <ul> {foreach from=$products item=product name=products} getImageLink($product.link_rewrite, $product.id_image, 'home')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" /> {if $product.new == 1}{l s='new'}{/if}{$product.name|escape:'htmlall':'UTF-8'|truncate:35:'...'} {$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'} <!-- quantity wanted --> {if $logged} quantity == 0) || $virtual} style="display:none;"{/if}> {l s='Cantidad :'} <[color=purple]input type="text" name="cantidad" id="cantidad_vendida" c[/color]lass="text" value="1" size="2" maxlength="3" /> {/if} {if $logged} {if $product.on_sale} {l s='On sale!'} {elseif ($product.reduction_price != 0 || $product.reduction_percent != 0) && ($product.reduction_from == $product.reduction_to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $product.reduction_to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $product.reduction_from))} {l s='Price lowered!'} {/if} {if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if} {if ($product.allow_oosp OR $product.quantity > 0)}{l s='Available'}{else}{l s='Out of stock'}{/if} {if ($product.allow_oosp OR $product.quantity > 0) && $product.customizable != 2} {l s='Comprar'} {else} {l s='Add to cart'} {/if} {/if} {l s='View'} {/foreach} </ul> <br> <!-- /Products list --><br Link to comment Share on other sites More sharing options...
juanmaminage Posted July 28, 2010 Share Posted July 28, 2010 did you find the solution 4 this?I need the same. Link to comment Share on other sites More sharing options...
achica Posted July 28, 2010 Share Posted July 28, 2010 A ver si es esto lo que buscas:http://www.prestashop.com/forums/viewthread/28136/P0/general_discussion/solved_add_quantity_box_to_product_listingSalu2. Link to comment Share on other sites More sharing options...
juanmaminage Posted July 28, 2010 Share Posted July 28, 2010 thanks, i made it by my own and made it work.i replaced Cart.php classshopping-cart-product-line.tpl templatecart.php from rootif anyone needs the solution, let me know and i post the solution more detailed.thankzzz Link to comment Share on other sites More sharing options...
Recommended Posts