Magento – How to apply coupon codes for each product separately which are in the cart

coupon-codesmagento-1.8shopping-cartshopping-cart-price-rules

My problem is like this.

Magento allows to add coupon code for entire cart by default. But what
I want is to add a new entry for each and every product in the cart to
apply coupon codes. So the coupon codes may apply for each product in
the cart separately.

Can we achieve this functionality via shopping cart price rules ? Or any other solution will be appreciated.

The following image will show what I exact try to say. (this was created via firebug)
enter image description here

Thanks in advance.

Best Answer

You can do one thing when any user enter the coupon code for particular product and press apply button you can put ajax link url will be

http://localhost/magento/index.php/checkout/cart/updatePost/

and create one observer checkout_cart_update_items_before write your code for apply coupon.