Jump to content

Discounts based on past orders?


BadMath

Recommended Posts

I'm looking to set up a store with the ability to provide customers with discounts based on prior orders.  I understand that cart rules can only apply discounts based on products combined in a single cart.  Instead, I'm looking to be able to offer a discount on a new purchase to customers that have previously purchased some other item - in other words, a cart rule based on order history, not on a current cart.

 

(e.g., customers who have purchased "Product A" in a previous order will get a 10% discount on "Product B".)

 

Is this possible?  I've found no indication of anything like that in the Addons marketplace.  Can anyone tell me what would be involved in adding a feature like that?

 

Thanks!

Link to comment
Share on other sites

Thanks very much for the reply.

 

As I understand it, the "coupons after order" module issues a coupon at the time an order is completed, for use on a future purchase.  Is that correct?  If so, it's not quite what I'm looking for.  I'm actually looking to provide a discount on a current order based on a purchase made at some point in the past.

 

For example, a customer bought "product A" 3 years ago; it is in their order history.  No coupon code was issued at the time.  But because of their past purchase of "Product A", they will qualify for a discount on a future purchase of the new "Product B", which was just added to the catalog. 

 

Essentially, I'm looking for a cart rule that checks to see if a product is in a customer's order history in order to validate the discount.

 

Is this doable?

Link to comment
Share on other sites

If you want an out of the box solution I think sending a coupon to users who ordered the set product as vekia suggested is the only way. I think to do it without coupon codes would be require developing a custom module as I'm not aware of any existing modules or quick ways out there to do it in an automated way.

Link to comment
Share on other sites

Yes, I'd figured as much, at this point. 

 

(Thanks very much for your reply, by the way!)

 

Short of reading through all the code, is there any documentation on the cart system and how/when cart rules are applied and/or validated?  I'm looking into doing some custom dev work for this feature, but am concerned about making modifications to an important part of the cart system without knowing for certain how broad the implications of any edits would be, or how many avenues have to be covered.

 

It would be great, for example, to know where in the code there are calls to both apply a cart rule and to validate one against its configured conditions, as well as what functions/methods would be affected.  I'm mostly worried that if this is all done by reverse-engineering the existing code, there's a likelihood that something important will be missed.  I'd very much appreciate any advice anyone has to offer on pulling this off.

 

Thanks!

 

 

Link to comment
Share on other sites

Interesting feature.
I think you should develop a custom module to achieve that.
Start with reading customer order history from the database and then decide what is the next step that you want from that.
There are so many possibilities to define the discount rules based on previous customer order, pick one or create some options with that.
At the end you might have a table data which show you something like this :
"John Doe is eligible to get a discount" | Create & Send Disc.Voucher

Link to comment
Share on other sites

  • 4 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...