I am trying to create a plugin that will allow is to set a specific discount to a product in specific products are in the cart
I can get it to allow the discount if the total allowed products or more then the allowed products are in the cart but of the allowed number of products is less then the product we want to add the discount to then it still applying the discount to the total number of products that we want to add the discont to.
Product a qty=1
and
product b qty=2
The insted of product b getting a single discount it getting multiple discounts. What I need to know is which section of code in the shopping cart controls the cart actions to allow discount.
I know a little C# but trying to dig my way through the cart code is getting hard as some of it I can't work out what it doing.
So if the plug I have created returns false then I need to check the cart and frig the cart to only apply say a single value.
Help.
Ta
Darren