I have two SKUs for a particular nid. One SKU AAA has a lifetime limit of 1, while the second SKU BBB only has a cart limit. However, I cannot add BBB to the cart if AAA is in my order history.

Reviewing the code in uc_restrict_qty_count() function of uc_restrict_qty.module, I see that nowhere is the SKU (saved as 'model' in the db) checked or referenced -- it just goes off of the nid.

CommentFileSizeAuthor
#1 restrict-by-sku-1392042.patch1.46 KBakalata

Comments

akalata’s picture

Status: Active » Needs review
StatusFileSize
new1.46 KB

The attached patch uses the product's attributes array to look up the sku/model name in uc_product_adjustments, and runs that through the lifetime restrict checker.

raulmuroc’s picture

Issue summary: View changes
Status: Needs review » Closed (fixed)

Closing 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).