1

I'm using Magento 1.9 with the latest version of Ultimo Theme.

We used to use FancyBox to show some static .html files, from template .phtml files. But that does not work anymore, after upgrading to latest version of Ultimo Theme.

Is there any other way to show a simple static .html file, in a 600x400 popup window in Magento 1.9, using the Ultimo Theme?

Thanks,

4
  • Yes It is possible to show static .html file in popup window. Can you specify where is your .html file in magento? – Dhiren Vasoya Oct 4 '16 at 7:44
  • The file exists in /public/help/sizes.html – Alldo Oct 4 '16 at 7:48
  • So in browser you can access this file like this : domain.com/help/sizes.html right? – Dhiren Vasoya Oct 4 '16 at 7:54
  • Yes that's right! :-) – Alldo Oct 4 '16 at 9:29
1

There are multiple way to show content in popup.

  • You can used Jquery Ajax or Prototype script to fetch the content of that static file and display content in popup.
  • Put that static content in either CMS Block or CMS page and called that block direct in popup.

For static block use this code :

echo $this->getLayout()->createBlock('cms/block')->setBlockId('block_identifier')->toHtml();

For CMS page use this code :

$page = Mage::getModel('cms/page');
$page->setStoreId(Mage::app()->getStore()->getId());
$page->load('CMS-IDENTIFIER-HERE','identifier'); //EDIT IN THIS LINE
$helper = Mage::helper('cms');
$processor = $helper->getPageTemplateProcessor();
echo $html = $processor->filter($page->getContent());
  • Put that static content in new .phtml file and call that new file using this code.

echo $this->getLayout()->createBlock('core/template')->setTemplate('folder/myphtml.phtml')->toHtml();

Choose method according to your requirement.

2
  • Thanks Dhiren! Sound great! But how do I set the popup window size to 600x400px and remove the address bar and stuff, from the popup window? – Alldo Oct 4 '16 at 11:57
  • You can set the popup size by style sheet or check in admin, Is there functionlity to setup size from there. And if above answer will help you then mark as solution :) – Dhiren Vasoya Oct 4 '16 at 13:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.