6 votes
Accepted

How can I dynamically add fields to a widget's options?

I've not got much experience with widgets, but if this works like any other admin panel form you could make use of Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract and store your filters ...
  • 4,412
5 votes

When updating a widget instance programmatically, layout updates are removed

The cause of this issue is that the format of the page_groups field needs a different format for saving than is used available after loading. The format needed for saving can be generated from the ...
3 votes
Accepted

Magento 2 : Creating widget using install script

This worked for me please try it. $megaMenuWidget = [ 'instance_type' => 'Magento\Cms\Block\Widget\Block', 'theme_id' => 2, 'title' => 'Test Megamenu Horizontal', 'store_ids' ...
  • 1,355
2 votes

How can I dynamically add fields to a widget's options?

I needed exactly this function and came up with my own widget extension. You can find it on GitHub. But for the impatient here's how to use it: In your widget.xml you can use this extension as a ...
2 votes
Accepted

Magento Widget not showing up on frontend

The issue has been resolved. It was a small misconfiguration. System > Configuration > Design > Themes > Default was set to theme name. Theme designer asked me to remove it and now can add widgets.
  • 37
2 votes
Accepted

How to change widgets from one theme to another theme?

Best idea is change theme programatically getting all widget using $collection = Mage::getModel('widget/widget_instance')->getCollection(); than change theme whatever you want
  • 2,523
1 vote

Magento 2 Add widget using WYSIWYG field in a custom widget

app/code/VendoreName/ModuleName registration.php <?php \Magento\Framework\Component\ComponentRegistrar::register( \Magento\Framework\Component\ComponentRegistrar::MODULE, '...
  • 6,195
1 vote
Accepted

How to create custom widget via Install?

Custom widget can not be created alone with a Install or Upgrade script. You need to create a module for it. Below are the simple steps to create a widget via a module: Create app/code/Stack/...
1 vote
Accepted

Magento 2: add classes and icons to homepage widget

You can simply override the template file and changes the html in this file Copy the file from below path vendor/magento/module-catalog/view/frontend/templates/product/widget/new/content/new_grid....
1 vote

When updating a widget instance programmatically, layout updates are removed

I think the name of the property is 'page_template' and not 'template' at line: 'template' => $pageGroup['template'] should be 'template' => $pageGroup['page_template']
  • 111
1 vote

need to add custom template file inside form container magento admin

Add __toHtml() method in form container block. protected function _toHtml() { $tabsContainer = $this->getLayout()->createBlock('core/text', 'example-block')->setText('<div id="...
  • 3,622
1 vote

Get Widget Instance Title

<?php $widgetId =1; $widget = Mage::getModel('widget/widget_instance')->load($widgetId); echo $widget->getTitle(); ?> Try this it's working...
1 vote
Accepted

Align static blocks in footer

just remove the clear:both for widget class. .widget { clear: both; }
  • 32.2k

Only top scored, non community-wiki answers of a minimum length are eligible