Discount Requirement "Customer had previously purchased X" only works after order marked as delivered

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
Hi, quick question.  I have a discount set up with a requirement that a customer has to have purchased a specific other product before qualifying for the discount.  It works, but only after I go into the CMS tool and mark the order as delivered.  Is there a way to make it so that the discount takes effect immediately after checkout so that a customer can get the instant savings that we advertise?  I understand why it would be set up the way it is, so that the transaction can be completely finalized before offering the discount, but would still like to know if I have the ability to modify this behavior.  I so, where would I look to modify it -- the CMS tool, the source code, or the DB?

Thanks!
12 years ago
What discount requirement are you talking about?
1. Customer had spent x.xx amount?
2. Customer had previously purchased all of these product variants?
3. Customer had previously purchased one of these product variants?

For example, for "Customer had previously purchased all of these product variants" requirement follow the next steps:
1. Open \Plugins\Nop.Plugin.DiscountRules.PurchasedAllProducts\PurchasedAllProductsDiscountRequirementRule.cs file
2. Find
var purchasedProductVariants = _orderService.GetAllOrderProductVariants(0, request.Customer.Id, null, null, OrderStatus.Complete, null, null);

and replace it with
var purchasedProductVariants = _orderService.GetAllOrderProductVariants(0, request.Customer.Id, null, null, null, null, null);
12 years ago
Perfect!  Thankyou!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.