I am trying to create a custom modification and will really need some help.
So, I want specific products from my store to come with specific gift. What I am trying to do:
1. Set if the product have a gift or not.
2. Create custom product (the gift) which will not be visible in the store and will have price 0.
3. When the user adds the product with gift, the gift will automatically be added alongside the product to cart.
As for the first point - I've added the functionality to my admin panel. I've added checkbox which is writing in custom field called free_gift in my oc_product table, so I have 2 options - free_gift = 1 if the product have a gift and free_gift = 0 if it doesn't.
I have created the specific gift and hid it from the store.
But I can not figure it out how to add it automatically to cart. So far I am trying to edit system/library/cart.php, but with no luck.
Any help will be much appreciated, because... well, I am not a programmer and everything is like a puzzle for me

OC 2.0.3.1
Have a nice Christmas!