Developer forum

Forum » Ecommerce - Standard features » ePay and vouchers

ePay and vouchers

René Poulsen
Reply

Hi,

I'm trying to implement the use of vouchers on a shop that uses ePay payment window. When i apply the voucher in step1, the voucher appears in the orderlines loop and the total price is correct (in this case the discount is 10% on the order).

When I go to the ePay payment window, the voucher is no longer active - so the 10% discount is not in the order. This is also the case on the receipt.

Do I need to do something to make the vouchers work when using ePay? Is there some checkbox that has to checked somewhere in DW? Do I have to use a template (instead of autopost) and set some variable?


Replies

 
Nicolai Høeg Pedersen
Reply
This post has been marked as an answer

Hi René

I am pretty sure it has nothing to do with ePay. When you add the voucher you do it by submitting a field with the voucher ID to the cart. It then stores that value on the order/cart. If you in a later step happens to have the same field again, but without the value, it could get removed again. So you might want to check that.

NP

Votes for this answer: 1
 
René Poulsen
Reply

Hi Nicolai,

I've got the field in step 1 - and have a button for updateing the cart. This works fine.

My step 2 is the payment window (I use one step checkout and autopost in the payment setup in MC - so I don't have a step 2 template with the voucher field without a value).

 
Nicolai Høeg Pedersen
Reply

ok

In step 1, when you add the voucher, you render step 1 again. If you then render the voucher field again still with no value, you submit that to the checkout step without a value, and then DW picks that up and removes the voucher.

So if you have added a voucher to the order, make sure you do not render the voucher field at all, or make sure its value is the voucher code added to the order.

NP

 
René Poulsen
Reply

Aaahhh... Yes of course. That's it! Not used to working with one step checkout, but of course I have to store the value when updating the cart and staying in step 1. Don't have the problem when not using one step checkout and going from step 1 > step 2 > payment > receipt.

Thank you.

 

You must be logged in to post in the forum