override your checkout controller there in addAction
addAction
after add to cart code use your code.OR create an event observer checkout_cart_product_add_after
checkout_cart_product_add_after
there you can get the particular product.
For the above process If, if you not familiar do google you'll get those information.