<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Show quantity in cart on each product_info.php page</title>
	<atom:link href="http://www.clubosc.com/show-quantity-in-cart-on-each-product_infophp-page.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.clubosc.com/show-quantity-in-cart-on-each-product_infophp-page.html</link>
	<description>Showcasing osCommerce...the good, the bad and the ugly!</description>
	<lastBuildDate>Wed, 08 Sep 2010 00:18:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Will</title>
		<link>http://www.clubosc.com/show-quantity-in-cart-on-each-product_infophp-page.html/comment-page-1#comment-3238</link>
		<dc:creator>Will</dc:creator>
		<pubDate>Wed, 29 Jul 2009 05:40:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.clubosc.com/?p=389#comment-3238</guid>
		<description>Well just wanted to say that you&#039;re code work with ajax too. I was wrong!

Thank&#039;s for your help on the forum and on your great blog.
Will</description>
		<content:encoded><![CDATA[<p>Well just wanted to say that you&#039;re code work with ajax too. I was wrong!</p>
<p>Thank&#039;s for your help on the forum and on your great blog.<br />
Will</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gary</title>
		<link>http://www.clubosc.com/show-quantity-in-cart-on-each-product_infophp-page.html/comment-page-1#comment-3235</link>
		<dc:creator>Gary</dc:creator>
		<pubDate>Tue, 28 Jul 2009 08:24:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.clubosc.com/?p=389#comment-3235</guid>
		<description>No...

echo $cart-&gt;get_quantity(tep_get_prid($product_info[&#039;products_id&#039;]));

would work (possibly) with attributes - haven&#039;t tested.  Don&#039;t ever do more code than is necessary.

a product with attribute is like this:  product_info.php?products_id=1{4}1{3}5

the function tep_get_prid strips out the options, to make it back to this: product_info.php?products_id=1</description>
		<content:encoded><![CDATA[<p>No&#8230;</p>
<p>echo $cart->get_quantity(tep_get_prid($product_info['products_id']));</p>
<p>would work (possibly) with attributes &#8211; haven&#039;t tested.  Don&#039;t ever do more code than is necessary.</p>
<p>a product with attribute is like this:  product_info.php?products_id=1{4}1{3}5</p>
<p>the function tep_get_prid strips out the options, to make it back to this: product_info.php?products_id=1</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Will</title>
		<link>http://www.clubosc.com/show-quantity-in-cart-on-each-product_infophp-page.html/comment-page-1#comment-3234</link>
		<dc:creator>Will</dc:creator>
		<pubDate>Tue, 28 Jul 2009 08:18:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.clubosc.com/?p=389#comment-3234</guid>
		<description>Ho yeah...
and my first code and yours won&#039;t work with attribute...

Someone from the french osc forum helped me and this would work with attribute:

$superid = $product_info[&#039;products_id&#039;];
$products = $cart-&gt;get_products();
for ($i=0, $n=sizeof($products); $i&lt;$n; $i++) {
     $prid = tep_get_prid($products[$i][&#039;id&#039;]);
     if ($prid == $superid) {
        $qtyencart = $products[$i][&#039;quantity&#039;];
        echo&quot;Vous avez &lt;b&gt;$qtyencart unitÃ©&lt;/b&gt; de cet item dans votre panier actuellement.&quot;;
        break;
     }
}


Hope this can help someone!

Now I want to add this code also on the categorie page near each add to cart button..
this might be harder...

Bye</description>
		<content:encoded><![CDATA[<p>Ho yeah&#8230;<br />
and my first code and yours won&#039;t work with attribute&#8230;</p>
<p>Someone from the french osc forum helped me and this would work with attribute:</p>
<p>$superid = $product_info['products_id'];<br />
$products = $cart-&gt;get_products();<br />
for ($i=0, $n=sizeof($products); $i&lt;$n; $i++) {<br />
     $prid = tep_get_prid($products[$i]['id']);<br />
     if ($prid == $superid) {<br />
        $qtyencart = $products[$i]['quantity'];<br />
        echo&#034;Vous avez <b>$qtyencart unitÃ©</b> de cet item dans votre panier actuellement.&#034;;<br />
        break;<br />
     }<br />
}</p>
<p>Hope this can help someone!</p>
<p>Now I want to add this code also on the categorie page near each add to cart button..<br />
this might be harder&#8230;</p>
<p>Bye</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Will</title>
		<link>http://www.clubosc.com/show-quantity-in-cart-on-each-product_infophp-page.html/comment-page-1#comment-3233</link>
		<dc:creator>Will</dc:creator>
		<pubDate>Tue, 28 Jul 2009 08:12:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.clubosc.com/?p=389#comment-3233</guid>
		<description>Hey Gary,

It&#039;s Will here... :)

You&#039;re code is very good but for a reason, it does&#039;nt work if I want to use it with AJAX.

Like on my site... http://www.khe   opsinternational.ca/catalog/product_info.php?products_id=1150

Very great website BTW !
Will</description>
		<content:encoded><![CDATA[<p>Hey Gary,</p>
<p>It&#039;s Will here&#8230; <img src='http://www.clubosc.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>You&#039;re code is very good but for a reason, it does&#039;nt work if I want to use it with AJAX.</p>
<p>Like on my site&#8230; <a href="http://www.khe" rel="nofollow">http://www.khe</a>   opsinternational.ca/catalog/product_info.php?products_id=1150</p>
<p>Very great website BTW !<br />
Will</p>
]]></content:encoded>
	</item>
</channel>
</rss>
