Questions tagged [widget]
Denotes questions regarding Magento Widget
275
questions
0
votes
0answers
4 views
Magento2.3.3 Custom js widget gets loaded but then stops working
Hello i know this ma be hard to anwser but it tought i can all way's try.
I have a custom js widget that gets loaded on the frontend, This Javascript starts running but and i does what it needs to do ...
0
votes
0answers
9 views
Add Grid in widget form magento2
Can i add grid template to custome widget magento2 ? I have an Blog menu in admin panel magento2 and i want to create an custom widget for this menu manage post here, purpose of this widget is i add ...
0
votes
0answers
22 views
Bug to configure a widget : impossible to select a block
I am currently working on an e-commerce website, running with Magento 2.4.0. I have to create a new widget, but at the end of the configuration, I have to select a block, which is impossible due to ...
0
votes
0answers
9 views
Magento 2.3.4 Can you call a widget inside a widget
Can you call a custom widget inside a custom widget?
0
votes
1answer
33 views
Add additional information to product list item in widget
I was able to add some additional information to the products in the category and the search-result page with a plugin.
Unfortunately it doesn't work for the widgets (product list widgets, related ...
0
votes
0answers
17 views
Sort product list widget by position?
I added a prodct list widget that should show products from one category, sort by position.
Sort products in widgets seems not to work, so I tried a suggested module from this question. It adds a ...
1
vote
0answers
17 views
How to access widget configuration options in Block class?
Although there's a similar question asked, it doesn't have an answer as the comment there refers to a question which has a comment that shows how to access the admin panel configuration parameters in ...
0
votes
0answers
16 views
How to set widget on home page full width instead of full bleed?
My page widget showing full width, if my screen size 25%, how to to make it center, so that makes my widget full width not feull bleed.
0
votes
0answers
18 views
Magento2 product widget on login page
I need to add all products widget as a table on my login page
I use magento 2.4
How can I do it?
Used default widgetes, didn't help me.
0
votes
0answers
44 views
Magento 2 How to create checkbox field in widget
I have a custom widget in which I need to create the checkbox field in one of my widget. I am using parameter type as block
Below is my code
1 . widget.xml file
<widget class="Sandesh\...
0
votes
0answers
9 views
How to add a script to all product descriptions
How to create a js widget that will add the current date on the product page to the description on the <p id="lol"></p> element?
Or which will insert a p tag with a date at the ...
0
votes
0answers
71 views
Wysiwyg widget escaping character
I've created a widget with a wysiwyg inside it (with the class from this module Dmatthew\WidgetParameters\Block\Adminhtml\Widget\Type\Wysiwyg)
BUT
When I'm adding my content, with the strong, ...
0
votes
0answers
8 views
Load latest widget per type
I've created programmaticaly a Widget. Then I've created the widget in the backend (widget 2 => Marketing).
Based on my user attribute, the widget should switch between 2 and 3 (which I have not ...
0
votes
0answers
15 views
magento 2 append widget
<reference name="content">
<block type="cms/widget_page_link" name="48fc761f38fa9838fcc3a3b498c47f72" template="cms/widget/link/link_block.phtml"&...
0
votes
1answer
10 views
Magento 2: Not able to delete second layout in widget
Magento 2.4
Admin > Content > widget
After creating a new widget I have added two layouts.
When I had tried to delete the second layout then the delete button is not worked.
https://drive....
0
votes
2answers
55 views
How to override module-catalog/Block/Widget/Link.php in magento 2
I need to change functionality of getHref() method. So I Created several below files in my code folder.
1.<vendor>\Catalog\Block\Widget\Link\Link.php
<?php
namespace Tea\Catalog\Block\Widget;
...
0
votes
0answers
26 views
Magento 2 - Custom widget chooser field select custom content type
I am wondering if this is possible.
I'm trying to build a custom Widget with a Chooser field on the Admin that would select a custom Content type named "Event" item.
By default, Chooser is ...
0
votes
1answer
34 views
How do I place a widget in a custom page layout?
I've created multiple custom pages like a contact page and FAQ page but both the pages and the containers I've labeled don't show up in the widget panel.
What's the right way to add widgets to your ...
0
votes
1answer
49 views
Issue With Displaying Gallery Widget
I am trying to add images product gallery to my custom widget using Fotorama.
What it should look like:
So I tried to initialize the gallery widget using the js script. Based on the info I got from ...
0
votes
0answers
16 views
Widget Parameters - How can I show a second select options based on first select?
I want to provide 2 select parameters on the widget but I want the options of the second to be based on the option selected on first.If I choose the shop, then I have to go to database to get the ...
0
votes
1answer
81 views
How to use fotorama in my custom widget?
I want to display my product image gallery in my custom widget.
$images = $_item->getMediaGalleryImages(); is how I got my images for product.
I want to display the image using fotorama? is this ...
0
votes
1answer
98 views
How to add View Model to a Custom Widget?
I am extending ProductList widget and I want to call a View Model from another module testing\ProductFeatures\ViewModel in my own custom template.
I have tried researching on how to use the View Model ...
0
votes
0answers
15 views
Date and Time Range Picker in custom widget
I have been looking for a way to implement the Date and Time Range Picker into a widget.xml file. Anyone who can help?
The Date and Time Range Picker
1
vote
0answers
17 views
Magento 2 Sort order on catalogue widget
I have a working widget that shows the products but how can I get the products to be sorted by the name. I have researched and a-lot of options show how to add a button that will sort the products but ...
0
votes
0answers
28 views
Container not showing up in widget layout options
I am using the Aheadworks Blog layout and added my own container to it but somehow it doesn't show up in the widget layout options. I have tried adding it in the Magento_Theme layout/default.xml and ...
0
votes
1answer
21 views
How to filter products as per custom attribute value in Magento 2
I am trying to sort products as per the custom attribute value "new_sort_by" but unfortunately I could not filter. please check my code
Create a product attribute "new_sort_by"
...
0
votes
2answers
27 views
WishlistCollection keeps returning 0 products
I'm trying to make a widget using the wishlist to show whether you've added the current product to the wishlist already or not. I've seen some other threads with answers and I can safely say I tried ...
0
votes
0answers
41 views
Category product list widget not filtering by conditions
I have added a category product list widget to home page with like this:
{{widget type="Magento\CatalogWidget\Block\Product\ProductsList" show_pager="0" products_count="5"...
0
votes
1answer
58 views
How use preference for core widget block class?
How override core block class for core Catalog Category Link widget?
I try:
<preference for="Magento\Catalog\Block\Widget\Link"
type="Vendor\ModuleName\Rewrites\Block\...
0
votes
0answers
19 views
Can i use UI-select component in a widget?
I'm attempting to use the UI-select component for the Category in a widget. I haven't had any luck finding a resource that shows it is possible. My question is if i can use UI-select component as ...
0
votes
0answers
30 views
Unable to create a new widget
I'm currently facing a problem with a specific widget, whenever I try to create a new one this shows up.
1 exception(s):
Exception #0 (Exception): Notice: Undefined index: template in /var/www/html/...
0
votes
0answers
39 views
Magento 2: Refresh a widget at regular interval
I have developed an extension to provide a widget to list featured random products on CMS pages. The requirement is to refresh this list at regular interval without caching. Is there any option to ...
0
votes
1answer
94 views
Magento 2 How to extend Recently Viewed Products widget
I want to extend Recently Viewed Products widget so I can add review attribute.
After creating this file: Vendor/MyModule/view/frontend/ui_component/widget_recently_viewed.xml:
<listing xmlns:xsi=&...
1
vote
0answers
25 views
How can you have multiple dependences for a single parameter in a widget.xml file?
Like many things with Magento widgets, this should be simple but clearly isn't.
How can I use the same depends logic but for multiple parameter values?
so
<depends>
<parameter name="...
0
votes
1answer
53 views
How to have loader widget block only some content
The loader widget allows a developer to block page content while an AJAX request is ongoing. The devdocs describes it as:
The Loader widget blocks page content (all content or a part of it).
I'm ...
0
votes
0answers
30 views
Catalog product list widget reload the page when i click on the paging button
When I use a Catalog Products List widget in the Home page the button in this products list reloads the current page to show other product (I display only 5 items by pages)
User experience suffers ...
2
votes
3answers
226 views
Using magento 2 accordion widget with href links
I am trying to build a category accordion in my side bar and I am using magento 2 accordion widget
https://devdocs.magento.com/guides/v2.4/javascript-dev-guide/widgets/widget_accordion.html
<?php
$...
1
vote
2answers
121 views
Magento 2: Uncaught Error: Call to a member function setProduct() on boolean
I'm trying to update the product widget to show some custom product data like that
<?= $block->getChildBlock('name-of-block')->setProduct($_item)->toHtml() ?>
while this code works ...
0
votes
0answers
9 views
Missing atributte in conditions in widget
I use in my custom widget in /etc/widget.xml
<parameter name="condition" xsi:type="conditions" visible="true" required="true" sort_order="10&...
0
votes
0answers
17 views
How to rewrite Js widget which doesn't have return $.mage.widgetName
I'm trying to rewrite JS widget using mixin but getting error Uncaught TypeError: base is not a constructor.
If at the end of this widget add return $.mage.widgetName, everything works fine.
Can I fix ...
0
votes
1answer
26 views
How to create table in widget.xml
I wanna add a html table in widget.xml.
I mean this:
instead of this:
Is this possible? Thanks.
0
votes
0answers
53 views
Widget: Product Link with custom image
I am currently creating my first widget. The goal is to create an extended version of the existing Product Link Widget, which allows you to add your own image that links to the product detail view.
...
0
votes
0answers
27 views
How to get widget parameter data in code block
I want to get parameter's data from widget configuration in Block class.
https://devdocs.magento.com/guides/v2.3/ext-best-practices/tutorials/custom-widget.html
as we know from article, we can get ...
0
votes
0answers
38 views
How to remake js code on jquery ui widget
I have a simple code that animates the appearance of a mini-cart modal window.
<script type="text/javascript">
require(['jquery'], function($){
$(document).ready(function(){
...
0
votes
0answers
9 views
Magento 2.3.4: I want to add image and name of the product in my review widget
Using Below code I am able to make a widget that I had a display on a page, reviews from all products are showing, but I am unable to show the name and picture of the product please help.
<?php
$...
0
votes
0answers
188 views
How to dynamically add MediabrowserUtility fields to widget in Magento 2?
I am trying to make a widget that allows creating a banner with multiple images and the number of images dynamic.
This ideally would be with the Media browser utility.
What I have so far is a single ...
0
votes
0answers
32 views
Magento 2.3 Catalog Product List widget not pulling user defined field for Number of Products to Display
I have set the number of products to display to 5, however the Catalog Product List widget is displaying all products in the selected category. The "Number of Products to Display" is the only user ...
0
votes
1answer
63 views
Magento 2.3 folder structure of the Catalog Product List widget
I am using Magento 2.3.3 and I am looking for the folder structure of the Catalog Product List widget in order to look at the code. I have tried searching the /var/www/html/vendor/magento folders but ...
0
votes
0answers
43 views
Magento 2- Added widget in static block is not visible in front end
I have created a static block and within the block, I have added an embedded code for new_products widget.
All content is visible in the front end except the widget.
Embedded Code:
{{widget type="...
0
votes
0answers
30 views
Error when configurable option dropdowns load before product gallery
I have configurable products with two different configurable attributes in my store. I have a customization in vendor/magento/module-configurable-product/view/frontend/web/js/configurable.js which ...