What I know.
What I have seen on my searches till now is that we can add custom discount to the quote and split the discount among the quote Items based on ratio calculated.
What I want.
But I want to give specific discount on some line Items(quote items) , say a Gift Item included with a product. As it's a gift Item, I want to give the line item 100% discount, such that my row total will be zero and subtotal have the grand total will have the subtotal - discount amount.
The same line item added individually will be a regular product with no discount.
I'm not able to give discount amount to the quote item with out making issue existing calculation.
How can I achieve such a scenario in Magento 1.x programatically? Any Ideas? I have tried using the sales_quote_collect_totals_after and sales_quote_address_discount_item observers with no luck.