Questions tagged [widgets]

Administration, usage, and development of CMS Widgets

Filter by
Sorted by
Tagged with
0
votes
4answers
45 views

Magento 2 Custom query to display selected product in Custom block

I have some product ids . Currently I can display products in category using {{block . But now I am developing a custom block in app/design/frontend/Alothemes/bencher6/Magento_Theme/templates/myphp/...
0
votes
0answers
25 views

Magento 2 - Using UI Component as input for widget

So far, in all the documentation and tutorials for UI Components that I've come across (Like the documentation here: https://devdocs.magento.com/guides/v2.3/ui_comp_guide/bk-ui_comps.html, or in ...
0
votes
0answers
23 views

Extending Recently Viewed & Recently Compared Grids

I am struggling to extend the following two files in Magento 2.3.1 \vendor\magento\module-reports\view\frontend\templates\widget\viewed\content\viewed_grid.phtml and \vendor\magento\module-...
2
votes
1answer
12 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
27 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 ...
2
votes
0answers
111 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
139 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
264 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
67 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
64 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
83 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
629 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
38 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
15 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
98 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
62 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
38 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
301 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
467 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
235 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 <?...
3
votes
1answer
728 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" ...
1
vote
2answers
848 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
57 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
446 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" ...
1
vote
1answer
48 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
81 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
1answer
37 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
420 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
983 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
142 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
2answers
717 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
518 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
1k 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
72 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
183 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
126 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
34 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 ...
9
votes
4answers
4k 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
263 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
2k 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
576 views

Display best selling products in home page [duplicate]

How to display best selling products on the home page?
5
votes
2answers
3k 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
824 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
336 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
371 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 ...
0
votes
0answers
499 views

Magento 2. How to remove widget on just one Product

I have a widget that is shown on all Category page and on all Product page. I want to hide that widget from one specific product pages. Can I do It with Layout Update XML, if So how ? The widget is ...
1
vote
0answers
81 views

What is the difference between the navigation and menu widgets

I've just noticed Magento 2 has two widgets that sound very similar, the menu widget and the navigation widget. They are both customised versions of the Query UI Menu widget and they both use the ...
0
votes
1answer
156 views

How to hide the out of stock products from a widget on home page

I am trying to hide the out of stock products from my homepage. I want them to display everywhere else but not in this widget. Hiding from admin configuration is not the solution. How can i achieve ...