0
votes

I have in my Model class:

Mage::getDesign()->setArea(Mage_Core_Model_App_Area::AREA_FRONTEND);
$layout = Mage::app()->getLayout();
$block = $layout->createBlock('core/template','blockname');
$block->setTemplate('cronjob/items.phtml');
$blockProducts = $block->toHtml();

If I use these, Magento warns me with the message:

CRIT (2): Not valid template file: frontend\base\default\template\cronjob/items.phtml

File items.phtml is at these path: C:\wamp\www\magento\app\design\frontend\default\customtheme\template\cronjob\items.phtml

1
The error message and your file location specify different packages/themes. Have you tried setting the theme programmatically? See: stackoverflow.com/questions/17649587/…Don
Tnx for answer, but I already have defined theme and package in back office of MagentoMilos

1 Answers

0
votes

copy your items.phtml file from

C:\wamp\www\magento\app\design\frontend\default\customtheme\template\cronjob\items.phtml

to

C:\wamp\www\magento\app\design\frontend\base\default\template\cronjob/items.phtml