Good afternoon all,
I am new to Magento and have been tasked with creating a custom module that uses the catalog price rules to implement the custom functionality.
I have my controller written for the custom module and in that controller I need to grab the catalog price rule that has a start and end date that is equal to today’s date.
I was going to start down the path of using a straight up DB call using a query similar to the one below:
$resource = Mage::getSingleton(’core/resource’);
$select = $read->select()
$test = $read->fetchRow($select);
but then thought that it would be not all that object oriented to do so because I would be parsing the return set in the custom controller.
Is there a way that I can query the database for an object (of some type like CatalogPriceRule) and then use that object to get information from or am I stuck with the above approach?