Questions tagged [widget]

Denotes questions regarding Magento Widget

Filter by
Sorted by
Tagged with
2
votes
0answers
583 views

Magento 2 - Best approach to display and customize Recently Viewed Products with slider

Using our custom theme, we need to display Recently Viewed Products block on product detail page. We followed below approach Under Admin Panel we have Content -> Widgets Add Widget -> choose ...
3
votes
1answer
6k views

Magento 2: insert a “Bestsellers” widget via the Magento admin

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 want to insert a "Bestsellers" widget via the Magento admin, like the one ...
1
vote
2answers
5k views

Magent2 Modal Widget - change width and height

I am interesting in all the options that are available for the Magento Ui modal popup widget. Like: var options = { type: 'popup', responsive: false, innerScroll: false, ...... } Mainly for the ...
2
votes
2answers
628 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 ...
1
vote
2answers
277 views

How to change widgets from one theme to another theme?

I am having magento site with more then 80 widgets, now i am looking to change theme , with new package name and theme(here i have two themes for mobile and desktop). what is the best way to copy ...
3
votes
3answers
4k views

How to Disable Cache in Custom Widget

I am developing one widget in which I want current customer details. But I am not able to get these details on the homepage, catalog page, product page and other CMS pages. I have found for this ...
4
votes
0answers
650 views

Magneto2 remove widget via xml in custom page

In all cms pages i use widget. How can i remove widget by id on specific CMS pages? For remove block i use: <referenceBlock name="block_name" remove="true"/>
0
votes
1answer
201 views

Magento 2 Tabs widget - unbind arrow keys [closed]

I am wondering if there is any clean way to unbind keyboard (left and right arrows) from mage/tabs widget? This is how I init tabs in my custom-script.js: `var tabs = $('#element').tabs({ "...
1
vote
3answers
6k views

How to remove ‘Add New’ button from Admin Grid in Magento 1.9?

I am trying to remove the Add New button from an Adminhtml grid in Magento 1.9. I have found this post and [this other one] (Magento 2 - How to remove "Add new MODEL" button on \Magento\...
2
votes
2answers
4k views

Add javascript in custom widget

I've created a custom widget with a popup on homepage loading, now i need a function to close the popup but i'm not able to include a javascript file in the widget. I've tried the solution that i read ...
0
votes
2answers
2k views

Error cart message on Ajax

My goal is to have a cart that live updates when you change the quantity's. Normally you need to press the 'update cart' button. So I update my cart live by doing this: require(['jquery', '...
2
votes
0answers
508 views

Magento2 : Page_layout Container And Widget Configuration

I'm new on Magento 2, I have created a custom theme and a custom page_layout in /app/design/frontend/[Vendor]/[ThemeDir]/Magento_Theme/page_layout/homepage.xml <referenceContainer name="page....
0
votes
1answer
1k views

How to set layout (phtml) in my widget?

I created my first widget but it's very simple and i want to create my widget with layout(using phtml page). my widget : Code inapp/code/local/AP/AD/Block/AD.php: <?php class AP_AD_Block_AD ...
1
vote
0answers
55 views

Magento 2: Use widget with standard product list template

Is there way to use the same template like the "new products" widget magento already has but with my own product collection? I know how to make a widget but i don't how to attach the standard ...
1
vote
1answer
552 views

Display Polls with a custom template shows only empty results

Meta Magento 1.9.2.1 Custom Template Poll works fine when in sidebar Poll works fine when loaded by layout xml History Based on this information: http://inchoo.net/magento/magento-frontend/...
0
votes
2answers
400 views

Recently viewed items widget view should be like product listing / category page?

I have created recently viewed widget, and added this in product view page, but the product view I want is to be like as it is displaying on prodcut listing page/category product listing page. how ...
2
votes
4answers
2k views

Magento 2 - Add additional constructor argument widget block class

I'm trying to create a custom widget by extending the existing "Banner Rotator" widget. Something similar to this. I placed the widget.xml in my module and created a class extending \Magento\Banner\...
1
vote
0answers
38 views

Custom widget not displaying on stage server [closed]

I have created a custom widget, which is shown on local but when I pushed to staging, its not showing. Why?
4
votes
1answer
2k views

Magento 2 : </depends> is Not Working in Widget.xml

</depends> is not working in my below widget configuration inside widget.xml. Can any one help me on this. I want to display values based on pre selected value. <parameters> &...
0
votes
1answer
484 views

Magento 2 : Overriding CatalogWidget's ProductsList block

I'm trying to override Magento_CatalogWidget's ProductsList block the following way, but unsuccessfully. I have created a new module (app/code/MY_NAMESPACE/CatalogWidget), its tree structure is: ├── ...
1
vote
1answer
1k views

$.widget is not a function jquery error in magento 2

I know this question has been around a lot with solution but none worked in my case. I have installed Sm Revo theme with Magento v 2.1.0 and I'm getting this error. So far I have tried following ...
0
votes
1answer
504 views

How to call widget with products of specific category in “.phtml” file?

How can I call a widget that displays product from a specific category in a phtml file? Currently I can only display "all_products" in my phtml file like that: echo $this->getLayout()->createBlock("...
1
vote
0answers
63 views

Widget to show a specific product with a custom template

I want to display a configurable product, with images and attributes + configurable fields, but without the tabs, reviews or anything else. Just the basic information of the product with an add to ...
1
vote
2answers
889 views

Error with Dependency Injection in widget

I'm a new Magento 2 developer that's trying to create a widget with a picture in it and I've been following some tutorials to get started. I'm having some trouble though with dependency injection in ...
0
votes
1answer
511 views

Magento 2 - How to remove “Add new MODEL” button on \Magento\Backend\Block\Widget\Grid\Container

I am extending the \Magento\Backend\Block\Widget\Grid\Container with my block, and I want to remove the button for adding new instances of this model ("MODEL"). How can I do that?
5
votes
3answers
10k views

How to call widget with products of specific category in “.phtml” file?

How can I call a widget that displays product from a specific category in a phtml file? Currently I can only display "all_products" in my phtml file like that: echo $this->getLayout()->...
3
votes
1answer
1k views

Magento 2: Change on widget template not applied to frontend

I'm currently working with Magento2 (I'm an absolut beginner with this) and I need to adjust the template of a widget to my requirements. So I found the appropiate .phtml file used by that widget and ...
1
vote
1answer
31 views

Link between block and category

I have tried to figure out from the Luma how the widgets are tied to categories. Could you let me know where I can find the "link" between the block and category. The Add CMS Block in category doesn'...
3
votes
2answers
2k views

Magento 2: How to call Widget programatically?

I have created widget Type: CMS Static Block Theme: My Theme Display on: All Pages Container: CMS Footer Links Template: CMS Static Block Default Template Widget Options: Block (My selected block) ...
1
vote
1answer
807 views

Magento2 confirm widget: Continue with url

I have an extension with a backend view where I have a button which routes to another url. When the user clicks the button I want to show a pop up which asks him a second time if he/she really wants ...
0
votes
1answer
121 views

Magento 2: How to use Admin Elements / Widget?

How can I use Admin/Elements/Widgets that I create? They don't appear in the wysiwyg editor / add widget. I thought I could use them in Static Blocks..?
1
vote
2answers
524 views

Magento 1.9 Widget Display Recent Sold items

I need to display a js carousel in frontend with last sold products in Magento 1.9 I build a widget, I found the above code, but this code displays only name and date, I need to found all parameters (...
6
votes
1answer
411 views

Magento 2: What is the proper format for a javascript widget's _bind() method?

Using 2.1.3, I've been trying to bind page elements to internal javascript widget methods, and have been unsuccessful - the docs (http://devdocs.magento.com/guides/v2.0/coding-standards/code-standard-...
2
votes
0answers
723 views

Widget is not working in Magento 2

I am trying to insert a Catalog Category Link widget in my Home Page. But it is not working. I am sharing the code below. {{widget type="Magento\Catalog\Block\Category\Widget\Link" template="...
7
votes
0answers
1k views

Magento 2 - sorting order of products in a widget block

I created a block and a widget in admin panel to show products that fit some criteria(in a specified category) on home page. When I finished the setting, I found that the sorting order of the ...
1
vote
1answer
3k views

Magento2 - Impossible to get widget configuration

I'm developing a module with a widget. I make my own widget.xml following some differents guide in the net. But, I've configured the widget from the back-office and I can't retrieve the widget data. ...
4
votes
1answer
3k views

Magento 2: How to put default value in yes/no field of widget.xml in magento 2?

I am creating custom widget in Magento 2. I have created widget.xml file to create this. All things are fine and widget option is showing as well in admin. Only I want selected value "Yes" instead of ...
1
vote
0answers
181 views

Extend the Magento2 link_block widget

I want to extend the Luma Theme Catalog Category Link widget to include the category image. I have create my own version of the link_block.phtml file and it is working, but I am not sure how to get ...
3
votes
2answers
2k views

Magento Widget doesn't appear on frontend

I have created a simple widget which displays dummy data. The problem is my front end code doesn't show up in my page ? I 'm working on Magento 2.2.0. Here is my widget code what i want to display : ...
3
votes
1answer
641 views

Is it possible to disable widget without widget.xml changes?

I have extension with widget.xml file where there are 5 defined widgets. 1 of the widgets is available only to premium customers. I don't want this widget to show up inside Widget type selection in ...
3
votes
2answers
2k views

Magento 2 widget doesn't show - how to debug?

I have a module that is installed in other sites. In one site it doesn't show up when inserted into CMS Pages. {{widget type="Company\Modulename\Block\Widget\Test" template="widget/newsletter/test....
0
votes
2answers
149 views

Why Magento can't load my Helper?

My Code is generated by magerun, normally it works. I'm confused. I have build an open GIT Repo for checking up my code: https://github.com/webzellentOpenSource/ti-theme Downside you will find the ...
2
votes
1answer
1k views

Magento 2 showing the same Widget twice

I need to create 2 widgets on the homepage (CMS Home Page -> Main Content Area). In order to do that, I created 2 modules (one for each widget) and extended from Catalog Product List to use my own ...
5
votes
1answer
787 views

Magento2 - Widget with WYSIWYG editor

I'm creating my own extension that adds a widget with a WYSIWYG-editor. I found a tutorial about this subject: http://www.magebuzz.com/blog/magento-2-add-wysiwyg-editor-text-area-in-custom-widget/. ...
1
vote
1answer
809 views

Where to find Widget code in Magento

I want to adjust a widget and I think this is the code for it in widget.xml (below) Is this where i can adjust/remove the title text that is placed everytime i place the widget in a block? <...
2
votes
2answers
1k views

Why does Luma sample use widget and block for home page?

In the sample data with the Luma theme the home page is implemented with a Widget ("Home Page" Widget of type "CMS Static Block") plus block ("Home Page Block" containing the page content area html). ...
5
votes
1answer
5k views

How does Luma theme home page work?

I understand that the home page content is defined in block home-page-block, and I can edit that and see changes appear in the browser. However, what I don't understand is: What bit of theme/...
0
votes
1answer
2k views

Magento 2 Add block to custom layout via admin panel widget

I've made a custom theme and custom homepage layout that renders a custom container and inside it a block with a custom template: custom_homepage.xml inside Magento_Theme/page_layout folder <?...
11
votes
1answer
2k views

Component vs Widget

In Magento 2 what is the difference between a component and a widget? For example there is a modal component and a modal widget, they both appear to do the same thing. Component The Modal UI component ...
1
vote
1answer
890 views

How to change products in hot sellers list Luma theme (RESOLVED)

I found code hot sellers widget in cms block, {{widget type="Magento\CatalogWidget\Block\Product\ProductsList" products_per_page="5" products_count="5" template="product/widget/content/grid.phtml" ...