<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<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">
	<channel>
		<title>Tips and Tricks HQ Forum &#187; Topic: Discount- Changing $item[&#039;price&#039;]</title>
		<link>http://www.tipsandtricks-hq.com/forum/topic/discount-changing-itemprice</link>
		<description>Support Forum for Tips and Tricks HQ Products</description>
		<language>en-US</language>
		<pubDate>Wed, 08 Feb 2012 17:56:55 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.tipsandtricks-hq.com/forum/search.php</link>
		</textInput>
		<atom:link href="http://www.tipsandtricks-hq.com/forum/rss/topic/discount-changing-itemprice" rel="self" type="application/rss+xml" />

		<item>
			<title>amin007 on "Discount- Changing $item[&#039;price&#039;]"</title>
			<link>http://www.tipsandtricks-hq.com/forum/topic/discount-changing-itemprice#post-4524</link>
			<pubDate>Sun, 30 May 2010 02:31:28 +0000</pubDate>
			<dc:creator>amin007</dc:creator>
			<guid isPermaLink="false">4524@http://www.tipsandtricks-hq.com/forum/</guid>
			<description>&#60;p&#62;You won't be able to follow that shipping cost example and do what you are after. It's because you will need to modify the item price itself if the quantity is greater than 2 and modification needs to happen when the &#34;Add to Cart&#34; button is clicked or the quantity change happens. So you code to change the item price needs to go inside the &#60;code&#62;if ($_POST[&#38;#39;addcart&#38;#39;])&#60;/code&#62; block of code and also in the &#60;code&#62;else if ($_POST[&#38;#39;cquantity&#38;#39;])&#60;/code&#62; block.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>usr_local on "Discount- Changing $item[&#039;price&#039;]"</title>
			<link>http://www.tipsandtricks-hq.com/forum/topic/discount-changing-itemprice#post-4512</link>
			<pubDate>Sat, 29 May 2010 14:06:37 +0000</pubDate>
			<dc:creator>usr_local</dc:creator>
			<guid isPermaLink="false">4512@http://www.tipsandtricks-hq.com/forum/</guid>
			<description>&#60;p&#62;&#60;a href=&#34;http://www.tipsandtricks-hq.com/forum/topic/free-shipping-for-quantity-1&#34; rel=&#34;nofollow&#34;&#62;http://www.tipsandtricks-hq.com/forum/topic/free-shipping-for-quantity-1&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;There ya go admin007. Thats where I got the idea that my code edit might work.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>amin007 on "Discount- Changing $item[&#039;price&#039;]"</title>
			<link>http://www.tipsandtricks-hq.com/forum/topic/discount-changing-itemprice#post-4511</link>
			<pubDate>Sat, 29 May 2010 13:55:06 +0000</pubDate>
			<dc:creator>amin007</dc:creator>
			<guid isPermaLink="false">4511@http://www.tipsandtricks-hq.com/forum/</guid>
			<description>&#60;p&#62;Can you please post a link to the shipping cost post that you are referring to so we can both be on the same page?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>usr_local on "Discount- Changing $item[&#039;price&#039;]"</title>
			<link>http://www.tipsandtricks-hq.com/forum/topic/discount-changing-itemprice#post-4507</link>
			<pubDate>Sat, 29 May 2010 12:18:49 +0000</pubDate>
			<dc:creator>usr_local</dc:creator>
			<guid isPermaLink="false">4507@http://www.tipsandtricks-hq.com/forum/</guid>
			<description>&#60;p&#62;This is similar to the shipping cost post. Am attempting to drop the item price by 1 if item quantity is &#38;gt; 2. I tried this and got no results at all. Any ideas or help with my coding would be great. I am no PHP guru. Thanks!&#60;/p&#62;
&#60;p&#62;This is what I added to the function:&#60;/p&#62;
&#60;p&#62;{&#60;br /&#62;
 if ($item['quantity'] &#38;gt; 2)&#60;br /&#62;
                  {&#60;br /&#62;
                    $item['price'] += $item['price'] - 1;&#60;br /&#62;
                    return $item['price'];&#60;br /&#62;
                    $total += $item['price'] * $item['quantity'];&#60;br /&#62;
                  }&#60;br /&#62;
                    else&#60;br /&#62;
                  {&#60;br /&#62;
                    $total += $item['price'] * $item['quantity'];&#60;br /&#62;
                  }&#60;/p&#62;
&#60;p&#62;	            $item_total_shipping += $item['shipping'] * $item['quantity'];&#60;br /&#62;
	            $total_items +=  $item['quantity'];&#60;br /&#62;
	    }
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>

