When the lifetime restrictions check for the users existing orders with that product it only looks at completed orders.
This can be a problem, for example:
If I have a site that offers COD as a payment option and have a product with a lifetime limit of 3.
A user can purchase as many of that product as they like until I have received payment for the first 3 and marked them as completed.
After that they cannot purchase that product anymore but how many more have they ordered already that have been shipped out already?
It would be good if it looked at other order statuses as well.
Or otherwise give the option when you create the qty restriction feature to select the appropriate statuses.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | payment_received.patch | 986 bytes | stackpr |
Comments
Comment #1
savmac commentedI have the same issue. In fact, it seems like the default status should be "payment received" for the lifetime restriction to be in effect. I would think that most merchants who need a lifetime restriction would not want their customers to be able to purchase unlimited quantities before the orders ship and the restriction is initiated.
Comment #2
stackpr commentedI have attached a patch for this so the qty test will look at both completed and payment_received orders. It also resolves #728122: PostgreSQL doesn't like double-quotes since that relates to the same line.
Comment #3
agileware commented@witti:
Why patch (to be ported)? What version is your patch for? Should it be needs review?
Comment #4
stackpr commentedGood call - wrong status. The patch is against 6.x-2.x.
Comment #5
luketsimmonsHi witti/Agileware,
The patch works for me, previously it wasn't checking due to all my order statuses being payment received.
Does it need more than 3 of us to suggest it's been "reviewed & tested by the community" ? :-)
Thanks,
luke
Comment #6
jvieille commentedFor me, this is not enough.
The quantity must be checked all the way long to the completion of the order.
Currently, the customer still can purchase as many products as he want while the order is pending.
Added ('in_checkout', 'processing', 'pending', in order_status check
Comment #7
raulmuroc commentedClosing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).