<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>onestic &#187; caja de cantidad</title>
	<atom:link href="http://onestic.com/tag/caja-de-cantidad/feed/" rel="self" type="application/rss+xml" />
	<link>http://onestic.com</link>
	<description>blog de onestic</description>
	<lastBuildDate>Wed, 30 Jun 2010 10:37:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Cantidad de productos en el listado de productos Magento</title>
		<link>http://onestic.com/cantidad-de-productos-en-el-listado-de-productos-magento/</link>
		<comments>http://onestic.com/cantidad-de-productos-en-el-listado-de-productos-magento/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 14:49:49 +0000</pubDate>
		<dc:creator>Sergio Baixauli</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[caja de cantidad]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[qty box]]></category>

		<guid isPermaLink="false">http://onestic.com/?p=475</guid>
		<description><![CDATA[Vamos a realizar una pequeña modificación en el código de Magento para poder la caja con la cantidad de productos que queremos agregar al carrito sin necesitad de entrar en el detalle. Es algo bastante útil si nuestros productos no disponen de "ficha" o "detalle". Viene muy bien para comprar rápidas.

El resultado lo podéis ver [...]]]></description>
			<content:encoded><![CDATA[Vamos a realizar una pequeña modificación en el código de Magento para poder la caja con la cantidad de productos que queremos agregar al carrito sin necesitad de entrar en el detalle. Es algo bastante útil si nuestros productos no disponen de "ficha" o "detalle". Viene muy bien para comprar rápidas.

El resultado lo podéis ver aqui:

<img class="alignnone size-full wp-image-476" title="cantidad-listado" src="http://onestic.com/wp-content/uploads/2009/10/cantidad-listado.jpg" alt="cantidad-listado" width="575" height="350" />

Abrimos el fichero /template/catalog/product/list.phtml

y cambiamos las líneas siguientes

<div class="igBar"><span id="lphp-3"><a href="#" onclick="javascript:showPlainTxt('php-3'); return false;">PLAIN TEXT</a></span></div><div class="syntax_hilite"><span class="langName">PHP:</span><br /><div id="php-3">
<div class="php"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span> <span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$_product</span>-&gt;<span style="color:#006600;">isSaleable</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>: <span style="color:#000000; font-weight:bold;">?&gt;</span></div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;button <span style="color:#000000; font-weight:bold;">class</span>=<span style="color:#FF0000;">"form-button"</span> onclick=<span style="color:#FF0000;">"setLocation('&lt;?php echo $this-&gt;getAddToCartUrl($_product) ?&gt;')"</span>&gt;&lt;span&gt;&lt;?php <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#0000FF;">$this</span>-&gt;__<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'Add to Cart'</span><span style="color:#006600; font-weight:bold;">&#41;</span> ?&gt;&lt;/span&gt;&lt;/button&gt; </div></li></ol></div>
</div></div><br />

por estas

<div class="igBar"><span id="lphp-4"><a href="#" onclick="javascript:showPlainTxt('php-4'); return false;">PLAIN TEXT</a></span></div><div class="syntax_hilite"><span class="langName">PHP:</span><br /><div id="php-4">
<div class="php"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;form action=<span style="color:#FF0000;">"&lt;?php echo $this-&gt;getAddToCartUrl($_product) ?&gt;"</span> method=<span style="color:#FF0000;">"post"</span> id=<span style="color:#FF0000;">"product_addtocart_form_&lt;?php echo $_product-&gt;getId(); ?&gt;"</span>&gt;</div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;input name=<span style="color:#FF0000;">"qty"</span> type=<span style="color:#FF0000;">"text"</span> <span style="color:#000000; font-weight:bold;">class</span>=<span style="color:#FF0000;">"input-text qty"</span> id=<span style="color:#FF0000;">"qty"</span> maxlength=<span style="color:#FF0000;">"12"</span> value=<span style="color:#FF0000;">"&lt;?php echo $this-&gt;getMinimalQty($_product) ?&gt;"</span> /&gt;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;button <span style="color:#000000; font-weight:bold;">class</span>=form-button<span style="color:#FF0000;">" onclick="</span>productAddToCartForm_&lt;?php <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#0000FF;">$_product</span>-&gt;<span style="color:#006600;">getId</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#000000; font-weight:bold;">?&gt;</span>.submit<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#FF0000;">"&gt;&lt;span&gt;&lt;?php echo $this-&gt;__('Add to Cart') ?&gt;&lt;/span&gt;&lt;/button&gt;</span></div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">&lt;/form&gt;</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">&lt;script type="</span>text/javascript<span style="color:#FF0000;">"&gt;</span></div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">&nbsp; &nbsp; &nbsp;var productAddToCartForm_&lt;?php echo $_product-&gt;getId(); ?&gt; = new VarienForm('product_addtocart_form_&lt;?php echo $_product-&gt;getId(); ?&gt;');</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">&nbsp; &nbsp; &nbsp;productAddToCartForm_&lt;?php echo $_product-&gt;getId(); ?&gt;.submit = function(){</span></div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">&nbsp; &nbsp; &nbsp;if (this.validator.validate()) {</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;this.form.submit();</span></div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">&nbsp; &nbsp; &nbsp;}.bind(productAddToCartForm_&lt;?php echo $_product-&gt;getId(); ?&gt;);</span></div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">&lt;/script&gt; </span></div></li></ol></div>
</div></div><br />

Recordar que estoy hay que tocarlo tanto en la vista de grid como en list. Está todo en el mismo fichero.
]]></content:encoded>
			<wfw:commentRss>http://onestic.com/cantidad-de-productos-en-el-listado-de-productos-magento/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>