Is there a way to have coupon codes stay in effect on recurring orders?
If a customer purchases a recurring product using a coupon code we need for the recurring orders to also use the same coupon code.
How can I do this?
Is there a way to have coupon codes stay in effect on recurring orders?
If a customer purchases a recurring product using a coupon code we need for the recurring orders to also use the same coupon code.
How can I do this?
This would require some customization to get to work the way you want.
By design the coupon only applies to an order and by design recurring orders makes sure that the price being charged is current for the product, so the discount will not apply to the additional recurring charges only the initial one.
There are two parts to this actually:
a) Coupon Validity: just set the expiration date on the coupon some way out in the future so it's always valid...when the recurring order fires, it could use it again.
but
b) at this time, we don't automatically re-enter the prior coupon (that's a bit unusual scenario) on the recurring orders, so you would have to do some mods for that part (not hard I think).
AspDotNetStorefront
Shopping Cart
Thanks. That's what I needed to know.
What is the point of having the "Special Offer/Coupon Code" when you create a customer?
Will the coupon be used on all of the customer's orders... including recurring?
Thanks
A
It could potentially attract sales. Coupon is used to give customers' a discount, that's the mere purpose of it. You can set that up depending on these coupon attributes.
I understand, however once the coupon is used once... it get's deleted from the customer's record.
Since I am not looking to change the code and want to continue providing our recurring customers the coupon discount, I use the following stored proc to update the customer records before I charge the day's recurring orders:
My questions:C#/VB.NET Code:
Create Procedure [dbo].[zpUpdateCustomerCouponCodes]
as
update Customer
set Customer.Couponcode = c1.CouponCode
From Customer inner join
(Select cu.CustomerID, cu.CouponCode from CouponUsage cu
inner join (Select CustomerID, Max(CreatedOn) as LastDate
from CouponUsage group by CustomerID) g
on cu.CustomerID= g.CustomerID and
cu.CreatedOn = g.LastDate) c1
on customer.CustomerID = c1.CustomerID
1- How can I prevent the coupons fro being deleted automatically after a charge from the customer record? (I wish you guys used stored procs more, as the presentation layer and business logic should really be separate... just my personal gripe about ADNSF's architecture...)
2- Is there a stored proc that get's activated before or after a charge is done? Maybe I can add my cheesy proc to it on the backend so I can be completely be hands off when this happens.
thanks
We used tons of them, indeed. If you can just go to your sql manager, and navigate to Programmability -> Stored Proc. There are tons of them there we used throughout the codes (xmlpackages, classes, etc).
You could set ClearCouponAfterOrdering to false so the customer coupon code will remain active in their customer record.