<?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: Promo code hack</title>
		<link>https://legacy.forums.gravityhelp.com/topic/promo-code-hack</link>
		<description>Gravity Support Forums Topic: Promo code hack</description>
		<language>en-US</language>
		<pubDate>Wed, 22 Apr 2026 01:15:47 +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/promo-code-hack" rel="self" type="application/rss+xml" />

		<item>
			<title>red on "Promo code hack"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/promo-code-hack#post-233910</link>
			<pubDate>Thu, 02 May 2013 15:04:47 +0000</pubDate>
			<dc:creator>red</dc:creator>
			<guid isPermaLink="false">233910@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;The PayPal add-on supports discount fields now, so the update_paypal_query is no longer necessary to add to the theme's functions file when using PayPal. The promo code / coupon code stuff outlined above that still functions as needed.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>shshshea on "Promo code hack"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/promo-code-hack#post-64177</link>
			<pubDate>Sat, 30 Jun 2012 13:49:40 +0000</pubDate>
			<dc:creator>shshshea</dc:creator>
			<guid isPermaLink="false">64177@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Nice work! Thank you so much!! I have been needing this.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>majamaki on "Promo code hack"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/promo-code-hack#post-63122</link>
			<pubDate>Wed, 20 Jun 2012 21:17:49 +0000</pubDate>
			<dc:creator>majamaki</dc:creator>
			<guid isPermaLink="false">63122@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Good work around. Really need native support for this built into GF.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>braindouche on "Promo code hack"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/promo-code-hack#post-61979</link>
			<pubDate>Fri, 08 Jun 2012 19:15:02 +0000</pubDate>
			<dc:creator>braindouche</dc:creator>
			<guid isPermaLink="false">61979@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Slightly kludgey, works great. My kinda solution, there.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>red on "Promo code hack"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/promo-code-hack#post-59546</link>
			<pubDate>Sun, 20 May 2012 16:19:21 +0000</pubDate>
			<dc:creator>red</dc:creator>
			<guid isPermaLink="false">59546@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Actually, completely reworked this. Now, it takes advantage of PayPal's discount_amount_cart field.&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://pastebin.com/WgC9vwD2&#34; rel=&#34;nofollow&#34;&#62;http://pastebin.com/WgC9vwD2&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Doesn't compile into one 'Registration Total' item. Instead:&#60;br /&#62;
- keeps all non-negative items as is&#60;br /&#62;
- adds up discount and coupon items&#60;br /&#62;
- clears out those discount and coupon items and $0 value items from the cart&#60;br /&#62;
- sends to PayPal only non-negative cart items and one grand total discount amount for the cart&#60;/p&#62;
&#60;p&#62;This way you still get itemized checkouts and receipts and can show the discount separate, without passing negative numbers.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>red on "Promo code hack"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/promo-code-hack#post-59540</link>
			<pubDate>Sun, 20 May 2012 14:23:20 +0000</pubDate>
			<dc:creator>red</dc:creator>
			<guid isPermaLink="false">59540@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;When I went to make the above changes live, worked fine with a pay by check option, but found that PayPal Standard (using the gf add-on) doesn't like negative numbers. &#60;/p&#62;
&#60;p&#62;Found this:&#60;br /&#62;
&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_paypal_query&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Gform_paypal_query&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;but since I'm also using early bird discounts and sometimes passing up to 3 negative values, it didn't work for this, it was only taking off the last value.&#60;/p&#62;
&#60;p&#62;So used the idea of the PayPal example hook and function, but redid it to remove all negative values from the query string. It checks if there are negative values, and if so, combines all items it one 'registration total' with a grand total. So looks like an aggregate but is becoming one product. If there aren't any negative values, it just sends on as usual.&#60;/p&#62;
&#60;p&#62;Here's the code: &#60;a href=&#34;http://pastebin.com/FwTSNrT5&#34; rel=&#34;nofollow&#34;&#62;http://pastebin.com/FwTSNrT5&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;If there's a better way to approach this, please post back!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>red on "Promo code hack"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/promo-code-hack#post-59355</link>
			<pubDate>Thu, 17 May 2012 19:54:46 +0000</pubDate>
			<dc:creator>red</dc:creator>
			<guid isPermaLink="false">59355@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Agree that showing coupon codes in the source code is not ideal. Was able to work out a way to add valid codes as a radio button selections in the form editor, set it to admin-only, and retrieve them with ajax for validation against a coupon code input. &#60;/p&#62;
&#60;p&#62;Any feedback on ways to improve on this approach appreciated!&#60;/p&#62;
&#60;p&#62;Was blocked from posting my outline of steps, so did a pastebin of the steps here:&#60;br /&#62;
&#60;a href=&#34;http://pastebin.com/Bi577HTi&#34; rel=&#34;nofollow&#34;&#62;http://pastebin.com/Bi577HTi&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Pastebin links to code in step 3 and 4.&#60;/p&#62;
&#60;p&#62;Unresolved issues:&#60;br /&#62;
If post the form and there are errors, coupon code field won't update when edited
&#60;/p&#62;</description>
		</item>
		<item>
			<title>cthorpe on "Promo code hack"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/promo-code-hack#post-51759</link>
			<pubDate>Thu, 08 Mar 2012 12:31:09 +0000</pubDate>
			<dc:creator>cthorpe</dc:creator>
			<guid isPermaLink="false">51759@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;While this works, the coupon is visible in plain text in the source code.  That is, obviously, not ideal.&#60;/p&#62;
&#60;p&#62;For example, with a coupon of 10off, you can find this in the source:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;[{&#38;quot;fieldId&#38;quot;:&#38;quot;2&#38;quot;,&#38;quot;operator&#38;quot;:&#38;quot;is&#38;quot;,&#38;quot;value&#38;quot;:&#38;quot;10off&#38;quot;}]}&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;C
&#60;/p&#62;</description>
		</item>
		<item>
			<title>rhysandmatt on "Promo code hack"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/promo-code-hack#post-51707</link>
			<pubDate>Thu, 08 Mar 2012 00:26:18 +0000</pubDate>
			<dc:creator>rhysandmatt</dc:creator>
			<guid isPermaLink="false">51707@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Well the basic idea is just an illusion that the promo code is giving you a discount (to the customers eye) when in reality the products are just switching places. So technically you can set the discounted price to anything you were promoting, So for example if you wanted to do 50% of $1488 set the first product  to $1488 and the second product to $744 (50% off) and entering a coupon code will hide $1488 and show $744.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>DJosephDesign on "Promo code hack"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/promo-code-hack#post-51658</link>
			<pubDate>Wed, 07 Mar 2012 16:32:31 +0000</pubDate>
			<dc:creator>DJosephDesign</dc:creator>
			<guid isPermaLink="false">51658@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Great workaround! But how would this work for quantities? Would only $10 be taken off a $300 order? Is there any way to do a percentage?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
