<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<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>Gravity Support Forums Topic: Getting an Item Quantity</title>
		<link>https://legacy.forums.gravityhelp.com/topic/gettig-an-item-quantity</link>
		<description>Gravity Support Forums Topic: Getting an Item Quantity</description>
		<language>en-US</language>
		<pubDate>Sun, 19 Apr 2026 23:36:08 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/gettig-an-item-quantity" rel="self" type="application/rss+xml" />

		<item>
			<title>David Smith on "Getting an Item Quantity"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/gettig-an-item-quantity#post-37814</link>
			<pubDate>Thu, 13 Oct 2011 12:26:32 +0000</pubDate>
			<dc:creator>David Smith</dc:creator>
			<guid isPermaLink="false">37814@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Jessica,&#60;/p&#62;
&#60;p&#62;Here are two little helper functions that you can pass the $product_info variable to and retrieve the desired information.&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://pastie.org/2689776&#34; rel=&#34;nofollow&#34;&#62;http://pastie.org/2689776&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Look for &#60;strong&#62;get_product_quantity&#60;/strong&#62; and &#60;strong&#62;get_order_quantity&#60;/strong&#62; in the snippet above.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Jessica Rousseau Design on "Getting an Item Quantity"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/gettig-an-item-quantity#post-37707</link>
			<pubDate>Wed, 12 Oct 2011 11:16:53 +0000</pubDate>
			<dc:creator>Jessica Rousseau Design</dc:creator>
			<guid isPermaLink="false">37707@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi I am trying to create a from that will change the shipping price based on specific item quantity.&#60;br /&#62;
X = Product 1 = 6 books&#60;br /&#62;
Y = Product 2 = 1 book&#60;br /&#62;
Z = Product 3 = 1 book&#60;br /&#62;
....&#60;/p&#62;
&#60;p&#62;How can I access the X quantity?  I am trying the :&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_product_info_1&#38;quot;, &#38;quot;add_fee&#38;quot;, 10, 3);
function add_fee($product_info, $form, $lead){
$quantity = $product_info[&#38;quot;products&#38;quot;][1][&#38;quot;quantity&#38;quot;];&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;but I just can't figure how to get the quantity for that specific element.&#60;br /&#62;
And how to get form quantity and general as well.&#60;/p&#62;
&#60;p&#62;I am trying to create something like this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if ( X quantity &#38;gt; 1 )
  { total = (total + (X quantity* shipping cost)) - shipping cost;
  }else {
      if ( X,Y,Z quantity of the form &#38;gt; 6 ) {
       total = (total + (X,Y,Z quantity/6)*shipping cost)- shipping cost;
     }
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;So all I really need is the ability to access X quantity, and total form quantity.&#60;/p&#62;
&#60;p&#62;Any help will be greatly appreciated.&#60;br /&#62;
Thank you.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
