Questions tagged [widget]

Denotes questions regarding Magento Widget

Filter by
Sorted by
Tagged with
0 votes
1 answer
18 views

Magento 2 how add product select to the widget xml?

I want to add a sku product selection to the widget, but I can't find how to do it Please tell me how can this be done
user avatar
0 votes
0 answers
14 views

How magento decide to print a widget

I have 3 widgets on my category page My issue is that the faq one is always getting in last position, ignoring the sort order defined in backoffice (Probably because it's a custom class). In order to ...
user avatar
  • 772
0 votes
0 answers
29 views

How to use conditions_encoded in a phtml file

I have a field type xsi:type="conditions" in widget.xml, and I would like to be able to pick it up in phtml. I managed to do this in using $block->getData('conditions_encoded') but what ...
user avatar
  • 27
1 vote
0 answers
34 views

How do I retrieve data from Conditions

I have a problem. I created a widget where inside <parameters> I have a field with conditions. <parameter name="products" xsi:type="conditions" visible="true" ...
user avatar
  • 27
0 votes
1 answer
29 views

Best way to call JS widget only on specific page

I have created a Javascript widget which does some function based on product add/remove cart action. I would like to include the JS only on product pages viz: Category and Product detail page.I know a ...
user avatar
  • 3,554
0 votes
0 answers
74 views

How to get widget instance id in its block

I can get widget parameters in the widget class like $this->getWidgetTitle() but here widget_title has been declared in widget parameters in widget.xml file, I want to get the widget instance-id ...
user avatar
  • 860
0 votes
1 answer
173 views

How to get product collection by Widget's Encoded Conditions in Magento 2.3.5

I have a widget with conditions_encoded (including Multiple Category Ids, Multiple SKUs) in one section of the admin panel. The requirement is to show the product list with custom pagination, custom ...
user avatar
0 votes
0 answers
6 views

Removal of updated layout

Magento 2.4.3. I had updated layout of product and category pages by inserting widget (recently visited items) to pages' bottom above footer. Later on, I decided to remove that widget. What's strange ...
user avatar
0 votes
2 answers
325 views

Add dynamic rows (No UI Component) block, into the custom widget

I need to add dynamic rows into the custom-made-widget, without uiComponent. I have a system.xml with the block: <section id="general" type="text"> <group id="...
user avatar
0 votes
0 answers
118 views

Add Captcha to widget with Custom Form

I have added a widget to a custom extension that includes a form. The form needs to have a Captcha on it. I cannot figure out what I am missing to get it to display on the form. The form opens in a ...
user avatar
0 votes
0 answers
10 views

Magento widget not pulling through

I have a Magefan blog widget that is pulling through the widget code on the frontend on the dev site but it works on my local! The module is up to date on both sites but I'm not sure why it's working ...
user avatar
0 votes
0 answers
34 views

Magento 2 Add CAPTCHA to login form in createblock

I am building a widget to allow the Login form to display on a CMS page. I am able to get the form to display, but when I try to login, I am redirected to the customer/account page and get the error &...
user avatar
0 votes
0 answers
47 views

Magento 2 widget in product page

On the product page, i need to lay out the static block through the widget. This is possible - the problem is that it is displayed before the attribute selector. How to make that from the beginning ...
user avatar
0 votes
2 answers
87 views

Load Products by SKU Using Dependency Injection

I am building a custom widget that I want to display specific products based on the product SKU. I have tried a few different code examples to get products using the dependency injection method, but ...
user avatar
0 votes
0 answers
15 views

Auto configure custom widget programmatically after enabling it in Magento 2

I'm struggling with some concept of auto-configuration custom widget provided by the module. By default, the widget should be configured by the merchant, which is obvious, but my question is - is ...
user avatar
0 votes
0 answers
22 views

How to change sort at catalogwidget custom grid phtml?

Without modifying the magento core code.I want to sort according to position in catalogWidget Custom Grid PHTML,What should I do?
user avatar
  • 5
1 vote
0 answers
223 views

Magento 2 - Custom Widget Wysiwyg Editor allow html tags

I try to add a wysiwyg editor to my custom widget. I added the field to my widget.xml <parameter name="content" xsi:type="block" required="false" visible=&...
user avatar
  • 11
0 votes
0 answers
42 views

Magento 2 - get “product media” container from product detail page in custom widget

I try to create a custom Widget in Magento 2. The Widget should display the "product media gallery" Container from the product detail page for a selected product in my widget. Is there any ...
user avatar
  • 11
0 votes
0 answers
56 views

Datepicker in custom widget Magento 2.3.4

Is there any chance to create a field in custom widget with datepicker? I have a field that means end of sale and now I can type there text in spcific format only. I want to have there a datepicker (...
user avatar
  • 27
0 votes
0 answers
33 views

How can I get all widget_instances of a widget type from the database?

I created a new widget type named "lorem_widget" and also a few widgets instances of them, which are persisted in widget_instances. Now I want to get all of these widgets out of the database ...
user avatar
0 votes
1 answer
332 views

How to override Magento_CatalogWidget::product/widget/content/grid.phtml widget template in custom Module?

I want to override grid.phtml in custome module without using preference.I have tried this link but it does not work for me. widget.xml <?xml version="1.0" encoding="UTF-8"?&...
user avatar
  • 306
0 votes
1 answer
180 views

Auto close modal widget after 5 seconds

I created a modal widget that appears after adding product to cart, it works perfectly .Now I need to close the modal after 5 seconds.please help!
user avatar
1 vote
1 answer
72 views

How do I load custom CSS for a widget only when the widget is used?

I have a custom widget for the product page (catalog product view). How can I load the custom CSS file into the head only when the Widget is actually placed on the page? I am looking for a best ...
user avatar
  • 1,279
0 votes
2 answers
36 views

Show Widget in the Html

I have an html file for checkout where I want to show the widget which is coming from the database . Instead of displaying the widget it shows widget code. I have attached screenshot of the same. ...
user avatar
  • 1
0 votes
1 answer
49 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 ...
user avatar
  • 383
1 vote
0 answers
56 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 ...
user avatar
1 vote
0 answers
188 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\...
user avatar
0 votes
0 answers
162 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, ...
user avatar
0 votes
0 answers
25 views

magento 2 append widget

<reference name="content"> <block type="cms/widget_page_link" name="48fc761f38fa9838fcc3a3b498c47f72" template="cms/widget/link/link_block.phtml"&...
user avatar
  • 198
0 votes
1 answer
96 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....
user avatar
0 votes
2 answers
233 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; ...
user avatar
0 votes
2 answers
387 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 ...
user avatar
1 vote
1 answer
172 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 ...
user avatar
0 votes
1 answer
304 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 ...
user avatar
0 votes
1 answer
336 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 ...
user avatar
1 vote
0 answers
36 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 ...
user avatar
  • 47
0 votes
1 answer
32 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" ...
user avatar
0 votes
2 answers
35 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 ...
user avatar
0 votes
1 answer
209 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\...
user avatar
1 vote
0 answers
74 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 ...
user avatar
0 votes
1 answer
260 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=&...
user avatar
1 vote
0 answers
41 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="...
user avatar
  • 11
1 vote
1 answer
260 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 ...
user avatar
  • 161
2 votes
3 answers
652 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 $...
user avatar
  • 289
1 vote
2 answers
656 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 ...
user avatar
0 votes
1 answer
88 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.
user avatar
  • 1,178
0 votes
1 answer
211 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 ...
user avatar
  • 47
0 votes
0 answers
105 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="...
user avatar
  • 71
0 votes
2 answers
1k views

Magento 2 add ViewModel to product widget

I use ViewModel for custom data in category product listing and everything working ok but i need add ViewModel to widget with new products. Is it possible to add ViewModel to widget? Check my ...
user avatar
  • 1,227
0 votes
0 answers
77 views

Magento 1.9.4.0 CMS Block Widget Issue

I'm trying to add widget to cms block or page but when i add it only display short code on page and not render, i tried different magento default widgets results is same also tried using code on ...
user avatar

1
2 3 4 5 6