Getting a products view count programmatically (Magento 1)

Use the below code to figure out, how often a product was called in between 2 dates:

Getting selected custom options of a cart item (Magento 1)

Use the below code to figure out what custom option was selected by the customer for a cart item:

Configuring and running cron jobs (Magento 1)

To add and run a Magento cron job in your module, add the following XML to your modules config.xml:

Thats the first step. Once that was done, you have to manually or automatically run cron.php. Its in your stores…

Changing mail template content by id programmatically (Magento 1)

To change the content of a Magento mail template by its id, use the following code: