Skip to main content

Questions tagged [widget]

Denotes questions regarding Magento Widget

Filter by
Sorted by
Tagged with
0 votes
0 answers
15 views

Magento 2 : Use widget function from an other jquery widget

How can I use a custom widget function in a magento 2 jquery widget? requirejs-config.js var config = { "map": { "*": { "customwidget": "...
Waffeleater's user avatar
0 votes
0 answers
28 views

Display Stock on product widget

I am using magento 2.4.6 with martfury theme. I want to display stock level on product that's displayed via widget. Also, I have MSI enabled for the store. I am using the below code to display the ...
Yukti Dogra's user avatar
0 votes
0 answers
24 views

The images in the recently viewed widget are not displayed in Magento 2

I tried the widget in localhost is shown, not in live site I checked the difference the Enable WYSIWYG Editor was disabled, I enabled it it worked The next day, I checked it; it wasn't working again, ...
sarah's user avatar
  • 1
0 votes
0 answers
22 views

Display Widget content in PWA Venia Theme

We are using Venia PWA 2.4.5 setup where frontend is displaying from ReactJs I have added New Widgets in backend. How to display those content in Frontend of the website ?
Baby in Magento's user avatar
0 votes
0 answers
27 views

Magento 2 recently view product widget image related issue

I am using the latest version of Magento and recently added a 'Recently Viewed' widget to the homepage. A few days ago, we didn't have actual product images on our server, so we were using third-party ...
Krishna's user avatar
  • 11
1 vote
2 answers
190 views

Load widgets in specific position on category list page - Magento2.4

We would like to create widgets with layout updates and load these widgets in a specific place on the category list page. So we would like to create a widget from admin, load a CMS static block and ...
JGeer's user avatar
  • 1,420
1 vote
0 answers
61 views

Render link attribute in custom page builder content type

Lets assume a custom page builder content type with a text attribute representing a link In master.html I'm already retrieving the following attributes <!--master.html--> <<div attr="...
Claims's user avatar
  • 1,191
0 votes
0 answers
24 views

remove same product from two widget

In our magento 2 store. We have 3 sections Featured Products Trending Products Top Picks in this section the products are showing, but problem is product can have all these 3 attributes selected. i ...
Amiyo Ghosh's user avatar
0 votes
1 answer
43 views

custom widget to retrive price

I am new to this Magento platform. I want to create a custom widget to retrieve the price so that I can use it just by calling the widget on the front page. May anyone help me?
Biju's user avatar
  • 11
0 votes
0 answers
35 views

Widget using "display on anchor categroy" not working on magento 2

This is driving me nuts, i'm trying to show a static block on the right sidebar of each product based on the category they are in. But it won't show anything on the frontend ! When i use the "...
Marcwales's user avatar
1 vote
1 answer
33 views

Use widget to add dynamic text inside the short description tab based on text attribut of product?

I'm looking to have dynamic text that changes based on the store view and the product for seo reason. Below i've used a simple exemple of a dynamic country name : 1 - On the attribut configuration ...
Marcwales's user avatar
0 votes
1 answer
59 views

Get parent category url in Catalog Widget template

I have a cms page that I am using to display products via CatalogWidget template. I would like to modify the template to have the title of the category link to the category page, but I have been ...
Rich D's user avatar
  • 153
0 votes
1 answer
191 views

Magento 2.4 - Prevent widget from loading on mobile

We have an instagram widget on our site. Perfect for desktops - but very negative for the pagespeed score on mobile. So I would like to prevent it from loading on mobile. Not hide it with {display:...
Ronny's user avatar
  • 433
0 votes
3 answers
280 views

Can't Insert Product List Widget

I have a Magento ver. 2.4.3-p1. When I try to insert the "catalog product list" widget on a CMS page with the below code: <p>{{widget type="Magento\CatalogWidget\Block\Product\...
enrico's user avatar
  • 3
1 vote
1 answer
25 views

Can a widget extend a class besdides Template?

All widgets I have ever created programmatically extends Template implements BlockInterface and I was curious if you can extend different classes for a widget module's block?
A. Andersen's user avatar
1 vote
1 answer
667 views

Recently Viewed Widget - override - Magento 2.4.5

i want recently viewed widget to display bestsellers if there is no recently view products. I tried to create my own recently viewed widget, but all answers and examples use deprecated class: Magento\...
Konrad's user avatar
  • 55
0 votes
1 answer
114 views

Translate "Add to Cart" button on Recently Viewed widget

I think "Add to Cart" button recently viewed is hard coded. Can anyone confirm this? I did find a guide about changing the words in app/design/frontend/VendorName/ThemeName/...
Jan-petter Havna's user avatar
1 vote
1 answer
49 views

home page widget - product weird padding on hover

I have the widget in my home page {{widget type="Magento\CatalogWidget\Block\Product\ProductsList" title="" show_pager="0" products_count="6" template="...
Isabel Chua's user avatar
1 vote
1 answer
578 views

Magento 2 mixins stopped working

I want to create a mixin on a third party module (MageWorx OptionFeatures) This is what i have now. app/code/MyCompany/MyModule/view/base/requirejs-config.js var config = { config: { ...
puntable's user avatar
  • 528
1 vote
0 answers
110 views

How to override New Products template from magento directory?

In Magento2 I need to show the "New Products" section in the homepage. Already did that, from admin I've created a widget and assign to it New Products Grid Template, as you can see down ...
D.D.'s user avatar
  • 15
1 vote
2 answers
860 views

<depends> doesn't work as expected in widget.xml in Magento 2

So I'm trying to create dependent field, that would appear if the respective drop-down value will be chosen. My widget.xml looks like this: <widgets xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
Danylo Herasymov's user avatar
0 votes
1 answer
637 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
David Young's user avatar
2 votes
0 answers
111 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" ...
mrcl's user avatar
  • 37
0 votes
1 answer
227 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 ...
Dexter's user avatar
  • 3,613
0 votes
1 answer
984 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 ...
Ankan Bhadra's user avatar
1 vote
2 answers
2k 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="...
AcidBurn's user avatar
0 votes
1 answer
397 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 &...
cjochum's user avatar
  • 131
0 votes
2 answers
304 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 ...
cjochum's user avatar
  • 131
1 vote
0 answers
572 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=&...
Vx0's user avatar
  • 11
0 votes
0 answers
211 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 (...
LeTeeL's user avatar
  • 42
0 votes
1 answer
344 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 ...
user14141548's user avatar
0 votes
1 answer
1k 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"?&...
Mehran's user avatar
  • 492
0 votes
1 answer
427 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!
Toranto mina's user avatar
1 vote
1 answer
271 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 ...
Akif's user avatar
  • 1,541
0 votes
2 answers
749 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. ...
Max's user avatar
  • 1
0 votes
1 answer
560 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 ...
Mario's user avatar
  • 478
1 vote
0 answers
391 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 ...
askepott's user avatar
  • 113
2 votes
0 answers
374 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\...
sandesh s's user avatar
0 votes
0 answers
288 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, ...
Morgan Tartreau's user avatar
0 votes
0 answers
31 views

magento 2 append widget

<reference name="content"> <block type="cms/widget_page_link" name="48fc761f38fa9838fcc3a3b498c47f72" template="cms/widget/link/link_block.phtml"&...
aich.khalid's user avatar
0 votes
2 answers
232 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....
Bhavesh Prajapati's user avatar
0 votes
2 answers
612 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; ...
Surath Gunawardena's user avatar
1 vote
2 answers
2k 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 ...
Alphaegen's user avatar
1 vote
1 answer
284 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 ...
Magento_learner's user avatar
0 votes
1 answer
651 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 ...
Magento_learner's user avatar
0 votes
1 answer
758 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 ...
Magento_learner's user avatar
1 vote
0 answers
175 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 ...
Carter's user avatar
  • 47
0 votes
1 answer
41 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" ...
Sarvesh Tiwari's user avatar
0 votes
2 answers
134 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 ...
Alphaegen's user avatar
0 votes
1 answer
358 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\...
David Young's user avatar

1
2 3 4 5 6