Forums / General Questions / Remove Discount Coupon field from view - but retain function

Remove Discount Coupon field from view - but retain function

Started by jafma on 19 Apr 2008, 10:49 AM · Views: 5,558

Results 1 to 5 of 5
19 Apr 2008, 10:49 AM
#1
jafma avatar

jafma

New Zenner

Join Date:
Mar 2008
Posts:
26
Plugin Contributions:
0

Remove Discount Coupon field from view - but retain function

Hi......
I'm attempting to use the Discount Coupon function to track orders placed by Sales Reps on my site. I have had a change made to the ot_coupon.php file to pre-populate the coupon field at checkout with an identifier for the Sales Rep.
I want the full Coupon functionality to remain in the code, but I want to completely remove the Discount coupon field from view on the Payment Information Page.
I suspect it can be done with CSS - but I'm not sure where to start.
Any suggestions?
Also, if I set the Coupon value to $0.01, a record is kept of those coupon transactions in admin. If I set the value to $0.00, the coupon functionality is retained, but no record is kept. Is there a simple change in code that will allow me to track zero value coupon transactions?
Thanks

23 Apr 2008, 2:56 PM
#2
decostyle avatar

decostyle

Zen Follower

Join Date:
Mar 2008
Posts:
336
Plugin Contributions:
0

Re: Remove Discount Coupon field from view - but retain function

Try this:

In your admin, go to configuration, define page status, then input 3 (Link OFF/Text OFF) under Define Discount Coupon.

This removes the Discount Coupon from the main page sidebox.

24 Apr 2008, 10:48 PM
#3
jafma avatar

jafma

New Zenner

Join Date:
Mar 2008
Posts:
26
Plugin Contributions:
0

Re: Remove Discount Coupon field from view - but retain function

Thanks Decostyle.... but I'm not using the Discount Coupon in the Sidebox.
I have the Discount Coupon field pre-populated with an identifier for Sales Reps placing an order. I would like to retain the functionality of the Discount Coupon, but I want the process to take place in the 'background' - I just want to hide reference to the Discount Coupon in the center column during the checkout process.
So, on the 'Step 2 of 3 - Payment Information' page I want to hide the whole 'Discount Coupon' Box from visibility. In the best of all worlds, I would also like to have the 'Discount Coupon' line in the 'Your Total' Box also be invisible.
.......and is there a change I can make in the code to retain data for a report if I set the value of the Discount Coupon at $0.00?

12 Mar 2010, 5:48 PM
#4
raspberry avatar

raspberry

New Zenner

Join Date:
Mar 2010
Posts:
3
Plugin Contributions:
0

Re: Remove Discount Coupon field from view - but retain function

I was having the very same dilemma and found a solution :)

To only show the coupon code field for specific customers:

1. Give them a specific link that contains a promotion variable

ex. http://yoursite.com/index.php?promo=1234

2. Set a session variable in the header template

<?php if ($_GET["promo"]=="1234") { $_SESSION['promo']=1; } ?>

**
3.On the checkout page where your coupon code would typically show, hide the coupon code form if the promo session variable is not set - do something like this:**

<?php if(isset($_SESSION['promo'])) { echo "<fieldset class='checkout'id='checkoutCoupons' onChange='updateForm()'>"; }else{ echo "<fieldset class='checkout' id='checkoutCoupons' style='display:none;' onChange='updateForm()'>"; } ?>
12 Apr 2011, 5:32 PM
#5
harun avatar

harun

New Zenner

Join Date:
Dec 2010
Posts:
10
Plugin Contributions:
0

Re: Remove Discount Coupon field from view - but retain function

Hi, this bit of code seem just what I need, but I can't figure out which file to put it and where in the file. Could you help?