Hello,
I'm using NC 1.90 and having some problems with the management of discounts.
I wanted to see how latest versions would run them and hoped to see something new.
And I'm pretty disappointed, I still see methods that I find personally "strange".
Example: GetDiscountByCouponCode which executes GetAllDiscounts(null, ...) and searches in the results.
Is it really optimized concerning database calls?
Tell me if I'm wrong, but I feel like I do a SELECT with no WHERE clause (or almost) and get - I don't know - 10, 100, 10 000 (why not?) discounts and then search for "MYCOUPONCODE" in it. A syntax which implies a direct SQL query with something like "WHERE CouponCode = 'MYCOUPONCODE'" would be better. What do you think?
Best regards.