I have developed a custom module which includes three DB tables. I need to fetch values from one table and then based on that value fetch values from second table.
For ex below is the table description:
**deal_offers** : entity_id | deal_name | deal_discount
**deal_products** : deal_id | product_id
In my observer, I am getting product_id
value. Now for say product_id
, what I want to achieve is
First, fetch
deal_id
value from tabledeal_products
, using the value of product_idNext, fetch
deal_discount
value, usingdeal_id
which is the entity_id in tabledeal_offers
I have defined <entities>
in my config.xml for these two tables, but not getting success
in achieving the desired result using Mage::getModel('module/model')
method in my observer.
Please Help
Thanks Thanks