Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [widgets]

Administration, usage, and development of CMS Widgets

2
votes
1answer
8 views

Cannot put an element on the top Footer

Dear Magento developers, Currently I am trying to put an element block on the top of Footer, here is my wanted result: Here is my default.xml <referenceContainer name="page.bottom.container"> ...
2
votes
0answers
25 views

Magento sampledata sales banners

I have some questions regarding the sales banners on sample data Magento sites. For example the below banner In the blocks editor, the html code for this block looks like this: <a class="block-...
0
votes
0answers
12 views

How to order page links side by side

I have created some pages in Magento 2.2.1 - About Us, News Page etc - and I want to place them beneath the categories on the default home page. I have created pages, blocks, and widgets. However - I ...
1
vote
0answers
58 views

Custom Widget with 2 conditions

I'm attempting to build a widget that allows the customer to build product tabs. I'm using conditions to allow the user to filter on products (using the core CatalogWidget conditions block) Widget....
1
vote
1answer
38 views

How to add Qty Input to product list WIDGET

How can you add Qty Input to product list Widget in Magento 2. (not the the product list page as described here) I have added a product list widget to a CMS page like by clicking on the insert widget ...
0
votes
3answers
72 views

Display Widget in phtml file magento 2

I have Following widget and its working in cms page but now I want it to display in phtml file {{widget type="Magento\Catalog\Block\Widget\RecentlyViewed" uiComponent="widget_recently_viewed" ...
4
votes
1answer
52 views

Creating custom widget, how to use existing block like “RECENTLY VIEWED PRODUCTS” for a custom block, so that It should support all magento themes

registration.php \Magento\Framework\Component\ComponentRegistrar::register( \Magento\Framework\Component\ComponentRegistrar::MODULE, 'Relabs_LabAPI', __DIR__ ); module.xml <...
2
votes
0answers
47 views

I am creating a custom widget “SPONSORED BEST SELLER PRODUCTS” block to show on home page. Bestseller.phtml file not rendering in the front end

This is my registration.php \Magento\Framework\Component\ComponentRegistrar::register( \Magento\Framework\Component\ComponentRegistrar::MODULE, 'Relabs_LabAPI', __DIR__ ); This ...
0
votes
0answers
46 views

Magento 2: Display Widget Title in phtml file

I want to display the widget title on the given phtml file. Currently I'm able to display the widget parameters accordingly like $this->getData('className'); How can I get the title of the ...
0
votes
1answer
274 views

Magento 2 Get widget parameters as array

Is there a way to get all the widget parameters in an array instead of loading the data of a specific widget parameter like below? $this->getData('widget_parameter_1'); So, something like: $...
0
votes
0answers
32 views

Error while adding conditional widget

I am using Magento 2.2.6 while I try to add a widget with conditions like this. I have only one condition is special price > 1 {{widget type="Magento\CatalogWidget\Block\Product\ProductsList" ...
0
votes
0answers
14 views

Magento 1 widget structure

I want to create a widget which I am gonna use it as an advertising banner. I followed this tutorial widget. The thing is (in this tutorial and all the rest that I was able to find) there was not a ...
0
votes
1answer
59 views

magento2: how to put widget (slider) in header?

could anyone advise me how to put widget (slider) in header just next to logo? (as on screenshot below)? Widget is ready and prepared by TemplateMonster extension, i just want to move it upstairs, ...
0
votes
0answers
44 views

Missing all Widgets in custom Theme

I'm a beginer in Magento (also magento 2) and i have 1 question. In all tutorials I can see how people change Theme in admin panel to Custom Theme and all Widgets save's. But then I'm doing this - all ...
0
votes
1answer
37 views

Wrong template location after overwrite

I have overwritten the _beforeToHtml() method in the class Magento\CatalogWidget\Block\Product\ProductsList. After doing this, I received the following error: Invalid template file: 'product/widget/...
1
vote
1answer
219 views

magento 2 widget layout update : specified pages section not showing all cms pages

I have created widget that i want to show on sidebar of about us and our company page, but in widget layout update >> specified pages section i can not find any option to see any option of My Cms ...
1
vote
1answer
307 views

Magento 2, how to add color swatches to custom widget template

The custom module lists certain configurable products. I need to display the color swatches, I tried below but it returns nothing! in myTempalte.phtml <?php use Magento\Framework\App\...
1
vote
0answers
172 views

Dependable fields in custom widget

I have created a custom widget having Title and dropdown field and image chooser. I wish to add dependable fields.the image uploading field is visible according with drop down menu. widget.xml <?...
2
votes
1answer
387 views

Magento 2, add sku selector to custom widget

How to add below in my custom widget.xml? below code does not have possibility of multiple products selection :( <parameter name="id_path" xsi:type="block" visible="true" required="true" ...
0
votes
2answers
603 views

How to create a custom Widget with custom conditions

I need to create a custom widget using custom conditions to show a product list in the home page. I have to show the option to add multiple inputs in the widget form to set conditions that I need. ...
1
vote
0answers
39 views

Custom CMS page not showing in specied pages list of widget page in Admin - Magento 2.2.4

Hi I want to add a widget in my custom CMS page, but my custom page is not coming in list of specified pages dowpdown under layout updates in widgets page.
2
votes
1answer
346 views

Call Widget from phtml file?

Trying to call a widget (from a custom form extension) in a phtml. Here's what it looks like when embedded in a CMS page: {widget type="PluginCompany\ContactForms\Block\Form\Widget\View" form_id="1" ...
0
votes
0answers
33 views

Magento2 : How to create a custom widget?

How to create a custom widget that having category choosing option and product list choosing option? I want to display that widget at homepage.
0
votes
0answers
153 views

How to add Widget to all product details pages of a certain category in Magento 2

I would like to add a particular static block to all product details pages that are part of a particular given category. In the widget settings, I can see options to add it to the category page, or ...
1
vote
1answer
42 views

Error while adding layout update to the widget

I am using a theme that has been built on Magento 1.9. Whenever I am trying to add layout update to a widget and save it I am getting the error below. An error occurred during saving a widget: ...
0
votes
0answers
27 views

Adding products back into Featured, Bestseller, and Popular widgets.

I am on an instance of Magento 1.9.3.7. I am wanting to add products back into my featured, bestseller, and popular widgets. Is there an easy way to do this? Thank you. :)
0
votes
0answers
115 views

Magento 2 Multiple Widget on same page issue

I created a custom widget that should display the listing of item created in grid. I'm getting a strange issue. When I add more than 1 widget on the same page all the widgets are returning same ...
0
votes
0answers
76 views

How to escape “quotes” in widget param value

I created a custom widget with a block parameter as a textarea , everything works ok except when in that textarea there are html tags with attributes such as class , it works ok on the first save but ...
0
votes
0answers
53 views

Using product list widget to just show price? [duplicate]

How can I use a product list widget to just show the price of the product on an cms page.
0
votes
0answers
35 views

Widget conditions are looking weird in the editor

I just updated Magento from 2.1.9 to 2.2.3. Now I am trying to add a widget via the Insert Widget function in thebackend. When inserting the Catalog Products List I can set conditions like category. ...
0
votes
1answer
34 views

Cart Page Widget Location

On the cart page I'd like to fill the large white space with the widgets highlighted. I currently have them put into the page with a Widget set to the main content area. Is there an easy was to ...
0
votes
2answers
336 views

Product List Widget

I tried to add product list widget to show all the products which have a special price but it gives me the following error. Error filtering template: Notice: unserialize(): Error at offset 298 of ...
1
vote
1answer
804 views

Magento 2:- How to create Vertical or Horizontal tagging with Tabs widget

I tried to create tabbing using Tabs widget but It does not display what i want. I follow this Link:- Tab widget and Building Tabbed Interface with Magento 2 Javascript UI Widget/Modal/view/frontend/...
1
vote
2answers
116 views

Inherit Widgets from Theme Parent

[[ TLDR: I'm looking for info about (or a module) that would allow me to have child themes inherit widgets from their parents. For widgets that were created on the backend. ]] This is for Magento 1....
0
votes
1answer
467 views

Add custom block before main content only on the contact page

i would like to add a static block between the nav menu en the content so i can give it the full width of the page. This block must only be visible for the contact us page. System: magento 2.1 ...
1
vote
2answers
446 views

Magento 2.2.2 - Include external/internal Javascript for specific CMS page

I need to integrate addthis widget on CMS page. In my custom them I created xml file cms_page_view.xml which resides at app/design/frontend/Vendor/Themename/Magento_Theme/layout/ <?xml version="1....
1
vote
1answer
32 views

Create a “Feeling Luky” widget Magento 2

I need to create a "feeling lucky" widget that have 2 fields: price range & color (both drop down lists), when user chooses his preferred price and color, I need to show 3-4 random products that ...
1
vote
1answer
779 views

Magento 2 - Extend catalogAddToCart widget

What i am trying to do is extend the catalogAddToCart widget so i can write some custom code without modifying the widget itself. So I've doen the requirejs file here: Vendor/default/...
0
votes
1answer
64 views

magento 1.9x switching widgets

My magento acts up weird. I have normall magento caching enabled, but also OPcache enabled on php 7.1.10. The problem i have is when i load the website in one browser i see the following: When i ...
0
votes
1answer
140 views

Magento add Image Slider getting unserialize(): Error

I have tried to add Image Slider into my home page using following the steps using the following link https://magenticians.com/customize-homepage-magento-2-add-image-slider/ When I clicked save after ...
3
votes
0answers
115 views

In Magento 2, what is the best practice for loading some CSS for a custom widget, so that the stylesheet only loads when the widget is present?

I have created a Magento 2 widget that displays a list of categories, similar to the one shown in this guide. The widget outputs the correct HTML, so now I need to add some styling to it to make it ...
0
votes
2answers
33 views

Widget has too many database calls? Need a refactor suggestion

I'm using Magento 1.9.3 and I have a theme that is loading very slow. After a debug I found that on the home page for example I'm loading New Products widget, Featured Poducts Widget, Sale Products ...
8
votes
3answers
3k views

Magento 2 - How to apply Slick Slider to Recently Viewed Widget

I have created a code but slider is not showing up in recently viewed products. Here is my code - I have downloaded slick js and css from the following link http://kenwheeler.github.io/slick/ Then ...
0
votes
1answer
190 views

In Magento 2.1.5, is there a way to render a widget within a template by its ID?

I would like to render a widget in my template by its ID, just like I have with blocks: echo $block->getLayout()->createBlock('Magento\Cms\Block\Widget\Block')->setBlockId('widget_id')->...
2
votes
2answers
1k views

Magento 2 - Use of the Media Image Uploader

I created a new Block that renders a button to upload an image via Magento's Mediabrowserutility. This Module is also used for uploading images to a CMS Page. The Block is used to add Image Uploads to ...
0
votes
1answer
497 views

Display best selling products in home page [duplicate]

How to display best selling products on the home page?
5
votes
2answers
2k views

What is data-post, data-action in magento 2? Can anyone explain wishlist functionality?

Can anyone explain below code? How did it work? Is there any alternate way to do? <a href="#" data-post='<?php echo $this->helper('Magento\Wishlist\Helper\Data')->getAddParams($...
0
votes
3answers
674 views

Magento 2: add classes and icons to homepage widget

I am working on a Magento 2.1.7 shop. To achieve this, I have created a child-theme of Magento Blank. On the home page, I have inserted a "New Products" widget via the Magento admin. I am using ...
0
votes
1answer
245 views

Magento 2 accordion in onestepcheckout does not works

I have add accordion widget to Onestep Checkout following this guide http://devdocs.magento.com/guides/v2.0/javascript-dev-guide/widgets/widget_accordion.html but it does not works <div id="...
1
vote
2answers
293 views

How to resize product images in recently viewed widget

How can I resize the images rendered via the recently viewed product widget? I have tried editing multiple values inside app/design/frontend/VENDOR/THEME/etc/view.xml but none updated the ...