Hi all,
I am having some trouble with the "all variants in cart" discount, and need to know if I am simply missing something.
I am porting an existing shop with many "kit-discounts" of the type buy product A and product B and get $10 off. Simple to achieve with the HasAllProducts discount in nopCommerce. But when the customer buys product A + product B more than once in the same cart, he would clearly expect the discount to happen for each pair bought. I cannot get this to happen in nopCommerce - the discount happens once on the completed order, regardless of the number bought of the items.
I am aware that I could from the admin discounts screen add discounts for each relevant count using the syntax {ProductVariantId}:{count}, but we are talking hundreds of individual kits, which could each probably be bought 1-10 or even more times in the same cart. So it would be litterally thousands of discounts to be configured. Even if I create the initial discounts automatically in the DB during migration from the old shop system (which I will), it will be hell for the shop owner to maintain it.
The HasAllProducts plugin source code checks that the requirements are true (the expected count of each product variant is in the cart) and it would be quite simple to allow for counting multiple occurences here. But since the interface simply returns a boolean, it seams that it will not be possible to write a modified discount plugin able to say for example how many times the discount occurs in the current cart.
So big question -
Is it possible to achieve what I want with the existing discount options - am I just missing something when configurating this?
If it is not possible with the current discount plugins, is it correct when I assume that with the current plugin interface, it might not be possible to achieve this through a plugin, but would require other source code changes as well?
Thanks,
Jesper