6

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 as a serialised array? Have a look at Mage_CatalogInventory_Block_Adminhtml_Form_Field_Minsaleqty for an implementation of it. It should allow you to add ...


5

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 format after loading by placing the following code somewhere between the load and save calls: if ($widgetInstance->getData('page_groups')) { $...


3

This worked for me please try it. $megaMenuWidget = [ 'instance_type' => 'Magento\Cms\Block\Widget\Block', 'theme_id' => 2, 'title' => 'Test Megamenu Horizontal', 'store_ids' => '0', 'widget_parameters' => 'a:1:{s:8:"block_id";s:1:"11";}', 'sort_order' => 1, 'page_groups' => [[ '...


2

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 helper block: <!-- Widget XML definition --> <items> <visible>1</visible> <label>Items</label> ...


2

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.


2

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


1

app/code/VendoreName/ModuleName registration.php <?php \Magento\Framework\Component\ComponentRegistrar::register( \Magento\Framework\Component\ComponentRegistrar::MODULE, 'VendoreName_ModuleName', __DIR__ ); app/code/VendoreName/ModuleName/etc module.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-...


1

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/CustomWidget/registration.php and paste below code in it: <?php \Magento\Framework\Component\ComponentRegistrar::register(     \Magento\Framework\Component\...


1

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.phtml In your theme paste the file to: app/design/frontend/<Vendor_Theme>/<name_theme>/Magento_Catalog/templates/product/widget/new/content/...


1

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


1

Add __toHtml() method in form container block. protected function _toHtml() { $tabsContainer = $this->getLayout()->createBlock('core/text', 'example-block')->setText('<div id="messages"><ul class="messages"><li class="error-msg"><ul><li><span>CreateBlock.</span></li></ul></li>&...


1

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


1

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


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