Remove Option for Coupon Code

4 views
Skip to first unread message

Mango

unread,
Sep 24, 2009, 7:58:24 PM9/24/09
to Potion Store Discussions
Is there any easy way to move the option for a coupon code from
new.rhtml? I know I can delete the following to remove it from what
is displayed to the user:

<tr id="coupon_row">
<td>Coupon Code:</td>
<td colspan="2"><%= text_field_tag 'coupon', session
[:coupon_text], :autocomplete => 'off' %></td>
</tr>

But when I do this, I get an error (I'm guessing that is because the
coupon field becomes null). I'm not confident enough in my ruby to
take the next step. Anyone have a suggestion? Thanks.

Andy Kim

unread,
Sep 26, 2009, 6:32:58 PM9/26/09
to potion...@googlegroups.com
If you're not comfortable changing the ruby code, I recommend that you
replace it with an empty hidden form input.

- Andy Kim

Darcy Otto

unread,
Oct 3, 2009, 4:14:20 PM10/3/09
to Potion Store Discussions
Thanks for the suggestion; that's exactly what I did. Here are the
steps in case others are interested:

In app/views/store/order/new.rhtml, replace:

<tr id="coupon_row">
<td>Coupon Code:</td>
<td colspan="2"><%= text_field_tag 'coupon', session
[:coupon_text], :autocomplete => 'off' %></td>
</tr>
<tr><td colspan="2"><div class="d" style="margin-top:15px"></div></
td></tr>

With:

<input autocomplete="off" id="coupon" name="coupon" type="hidden"
value="" />

Works like a charm. What prompted me to remove it, by the way, given
that I don't use coupons (at least not yet), are these considerations:

`I don’t use coupons very often. A coupon field says to a customer
without a coupon “Someone else getting this cheaper than you –
sucker!”. There is a good chance that they will hit the back button
and start searching for a coupon (I have done it myself). Maybe they
will never come back.' (from: http://successfulsoftware.net/2009/09/24/a-new-front-end-for-e-junkie/)
Reply all
Reply to author
Forward
0 new messages