Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

get static Block content within a PHP function. 
 
Netmorix
Sr. Member
 
Total Posts:  151
Joined:  2008-01-07
Augsburg
 

I’ve created a function within the order php which should give back the content of a static block, depending on the status the order has.

e.g. the order has a status id “paypal_open”, the content of a static text block with the name “paypal_open” should be returned.

public function getStatusText()
    
{
        
        
return $this->getLayout()->createBlock('cms/block')->setBlockId($this->getStatus())->toHtml();
    
}

But this retunrs an error. I’m not sure if there’s a Mage::helper call to get the content…

any help appreciated.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Netmorix
Sr. Member
 
Total Posts:  151
Joined:  2008-01-07
Augsburg
 

No idea… ? not possible ?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top