discount coupon not working

Locked

Views: 7,937

Results 21 to 27 of 27
This thread is locked. New replies are disabled.
6 Oct 2007, 7:09 PM
#21
marcps avatar

marcps

Zen Follower

Join Date:
Feb 2005
Posts:
92
Plugin Contributions:
0

discount coupon not working

They have a coupon - it is given to them on a flyer or via a sponsors url....

for example
"http://www.monkeydesignhouse.com/shop/index.php?sponsor=abc123"

Some of these coupons will mean they get their products free.

The way it is currently means that when they enter their coupon they have to enter CC details or else the coupon will not be applied on step 3.

I hope I am explaining myself properly.

Thanks for your help.

Marc

Regards
Marc P Summers
https://www.monkeydesignhouse.com

6 Oct 2007, 8:38 PM
#22
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: discount coupon not working

I see what you mean by the redeem button not being there. I set up a test account with you. First of all you need to go to admin Modules, Order Total Modules and see if it is activated, if not it will not show up on the check out page.

Is your site Upgraded to the current version 1.5.4 Yet?
zencart-upgrades-website-installation

6 Oct 2007, 10:40 PM
#23
marcps avatar

marcps

Zen Follower

Join Date:
Feb 2005
Posts:
92
Plugin Contributions:
0

Re: discount coupon not working

Thanks for looking at this for me...

I have coupons switched on....

Discount Coupon

This module is installed
true

Sort Order
280

Include Shipping
false

Include Tax
true

Re-calculate Tax
Credit Note

Tax Class
--none--

But still no redeem button - any other advice???

Regards
Marc P Summers
https://www.monkeydesignhouse.com

7 Oct 2007, 12:03 PM
#24
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: discount coupon not working

There's a small javascript error causing you grief.
/includes/modules/order_total/ot_coupon.php
line 89:
Change this:```
'field' => zen_draw_input_field('dc_redeem_code', '', 'id="disc-'.$this->code.'" on[B]change[/B]="submitFunction(0,0)"'),


to this:```
   'field' => zen_draw_input_field('dc_redeem_code', '', 'id="disc-'.$this->code.'" on[B]keyup[/B]="submitFunction(0,0)"'),
```Changing this will allow them to just type in the code and press Enter if they've done anything in the coupon-redemption field.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

7 Oct 2007, 12:12 PM
#25
marcps avatar

marcps

Zen Follower

Join Date:
Feb 2005
Posts:
92
Plugin Contributions:
0

Re: discount coupon not working

Ok - great - your right DrByte - that does work (if they change something in the coupon box)

However my coupon code is entered automatically.

for example
"http://www.monkeydesignhouse.com/shop/index.php?sponsor=abc123"

this sets session sponsor and is pulled into the sign-up form and the coupon form.

So ideally i need to add a 'PRESS HERE TO REDEEM YOUR COUPON CODE' button that doesn't argue with the payment selection further down.

Any help will be appreciated - even its a private message with a quote to fix this.

Marc

Regards
Marc P Summers
https://www.monkeydesignhouse.com

7 Oct 2007, 12:51 PM
#26
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: discount coupon not working

Okay, change the line to this instead:```
'field' => zen_draw_input_field('dc_redeem_code', '', 'id="disc-' . $this->code . '" onkeyup="submitFunction(0,0)"')[B] . zen_image_submit(BUTTON_IMAGE_SUBMIT, BUTTON_SUBMIT_ALT, ' onclick="checkCouponCode(this, 'dc_redeem_code');"')[/B],


and add to /includes/modules/pages/checkout_payment/jscript_main.php, as shown:

function methodSelect(theMethod) {
if (document.getElementById(theMethod)) {
document.getElementById(theMethod).checked = 'checked';
}
}

[B]function checkCouponCode(theForm, theField) {
if (document.theForm.theField) {
if (document.theForm.theField.length || document.theForm.theField.value) {
submitter = null;
return true;
}
}
return false;
}
[/B]

//--></script>


No need to prepare a quote ... just please share your thanks with a donation here: <http://www.zen-cart.com/index.php?main_page=infopages&pages_id=14>

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

7 Oct 2007, 5:55 PM
#27
marcps avatar

marcps

Zen Follower

Join Date:
Feb 2005
Posts:
92
Plugin Contributions:
0

Re: discount coupon not working

DrByte you are my most favourite person of the week. THANK YOU SO MUCH.

I really appreciate your time and efforts - My whole system is all working.

THANKS SOOOOOOO MUCH.

Marc

Regards
Marc P Summers
https://www.monkeydesignhouse.com