2 votes

The use of helpers in templates is discouraged. Use ViewModel instead warning in magento 2

We all know Helpers from the days of Magento 1. Helpers are classes that provide functionalities for various features throughout the Magento website. Available for use anywhere on the website, Magento ...
user avatar
2 votes

NotNull not working with AddFieldToFilter in Magento 2

The followings work for me correctly: //IS NULL ->addFieldToFilter( 'ep_image', array('null' => true) //IS NOT NULL ->addFieldToFilter( 'ep_image', array('notnull' => true)
user avatar
  • 348
2 votes
Accepted

How can i resolve Empty string supplied as input in DOMDocument::loadXML() in magento 2?

Check the given extension_attribute.xml and remove the starting space into that one like : <?xml version="1.0"?>
user avatar
2 votes

How can I Set Up & Configure Robots.txt in Magento 2?

The robots.txt is basically a file that tells all search engine crawlers which URLs they can access on your website or eCommerce store. You can also keep single or multiple web pages out of Google by ...
user avatar
2 votes
Accepted

What is the meaning of below code (DI injection of proxy)

If you check Magento\Wishlist\Helper\Data::__constructor() method, you will find there the following argument: public function __construct( ... \Magento\Customer\Model\Session $customerSession,...
user avatar
2 votes

Add header and footer in checkout page Magento2

Simple and easy solution for Magento 2 to display header and footer on checkout page To display same header and footer on checkout page like other pages, you just override checkout page_layout into ...
user avatar
2 votes

Magento 2: New added products not showing

Something similar happened to me in Magento 2.4.3, products are visible in the Magento admin, but not in frontend. We did everything we normally do, reindex, index: reset, cache, but nothing worked. ...
user avatar
1 vote

Magento 2.1 Product Sorting Alter name and price with asc and desc option

Slightly more custom approach if you only need very specific options. Modify the sorter.phtml file (app/design/frontend//Magento_Catalog/templates/product/list/toolbar/sorter.phtml) <div class=&...
user avatar
  • 195
1 vote

Magento2: Conditionally replace block template and class the right way

I'd probably go for option B in this case, the performance impact is probably not that significant in the grand scheme of things, especially if you're simply adding layout handles before the layout ...
user avatar
1 vote

How to change the custom controller url to fancy url in magento 2

First you neeed to define a router in your etc/frontend/di.xml <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:...
user avatar
  • 772
1 vote
Accepted

How to make select ui component as a required entry in Magento 2

Use this elements in your form Vendor_name/Module_name/view/adminhtml/ui_component <field name="select_example" sortOrder="50" formElement="select"> <...
user avatar
1 vote

Add slick slider on home page Magento 2 via pagebuilder

As mention in comment, You can't add slick slider in widget using page builder. To implement slick slider in your widget. To add slick slider in your widget. You need to add this below code in your ...
user avatar
  • 16.6k
1 vote
Accepted

Add slick slider on home page Magento 2 via pagebuilder

You could create a module, see here. Then add the module to a block and integrate the block with the pagebuilder to the page.
user avatar
1 vote
Accepted

Magento 2 decrease coupon usage

I finally found the appropriate db tables. If you have a case where you need to cancel a coupon - you have to use the following database tables: salesrule salesrule_coupon salesrule_coupon_usage ...
user avatar
  • 570
1 vote

Which Magento Version is Suitable Based on Size of Business and Performance

I work at a startup that's been using Magento 1 since 2014. If you are an individual person with limited funds and can't afford high-end servers, Magento 1 is your best choice. Not only is it highly ...
user avatar
  • 11
1 vote
Accepted

How to Customize Email Templates in Magento 2?

You will want to have this snippet at the top of your custom email template: <!--@subject My Custom Email Template Subject @--> app/code/[Vendor]/[ModuleName]/view/[{frontend|adminhtml}]/email/...
user avatar
  • 1,009
1 vote

Magento 2 Issue with "Not Registered Handle" on all the sales sections?

For My case, I did all. But forgot to run bin/magento setup:di:compile after run its working.
user avatar
1 vote

How to change div fotorama__stage height on product view page

Place this script in gallery.phtml file just after your code in <script> require(['jquery', 'mage/gallery/gallery'], function($, gallery){ $(document).on('click', function() { if (!$(...
user avatar
1 vote

Why there are commands missing in bin/magento?

I was unable to execute the command bin/magento deploy:mode:set developer. so after research i had found that install date is missing in env.php file. I added below element in env.php, 'install' =>...
user avatar
  • 1,169
1 vote

Magento 2: How to get all order status

If you want to get just order statuses. Use the following class. <?php namespace MyCompany\MyModule\Model; class MyClass { protected $orderStatus; public function __construct( \...
user avatar
1 vote

Add header and footer in checkout page Magento2

Magento 2.4 Edit checkout index page: app/design/frontend/<vendor>/<theme>/Magento_Checkout/layout/checkout_index_index.xml to be like this: <page xmlns:xsi="http://www.w3.org/...
user avatar
1 vote

What is the scope of source model extend and implement?

\Magento\Framework\Data\OptionSourceInterface is used when creating source model for system.xml configurations. And can be used with any other custom requirement. AbstractSource is specifically for ...
user avatar
  • 745
1 vote

How to use addFieldToFilter on ui grid

in your listing.xml file above the line <item name="update_url" xsi:type="url" path="mui/index/render"/> add the id you are passing in the url like in my case <...
user avatar
1 vote

Magento2 Error: "Something went wrong with processing the default view and we have restored the filter to its original state" showing on the loop

It might be solved by cleaning the bookmarks database table using the command below. TRUNCATE ui_bookmark; In case it didn't solve the issue you can try to solve it by increasing the admin user ...
user avatar
1 vote

Magento2 Error: "Something went wrong with processing the default view and we have restored the filter to its original state" showing on the loop

Add rights for: Invoices Shipments Credit Memos This will fix the error message.
user avatar
  • 131
1 vote

How can i change default shipping address

The accepted answer is not good practice because we should never reference the objectManager class directly (except on few exceptions stated here) The "correct" solution is to use ...
user avatar
1 vote

Magento 2 display out of stock products at the end of the catalog

You can use this free extension to show out of stock items at the end of the catalog. https://github.com/bikashkaushik/magento2-OutOfStockLast
user avatar
1 vote

Magento 2.1 update special price dates programmatically

The following code should do the trick -: $dateValue = '2022-04-08' $value = date('Y-m-d', strtotime($dateValue)); /* Magento\Catalog\Model\ProductRepository */ $product = $this->...
user avatar
1 vote

Performance issue - slow query in Magento 2

For thos who are still looking for the solution below is the solution. https://support.magento.com/hc/en-us/articles/360059449112-MDVA-21095-INSERT-INTO-search-tmp-never-ends-after-mass-attribute-...
user avatar
1 vote

Dynamically hide component upon selecting a country in checkout

Vendor_Module/view/frontend/requirejs-config.js var config = { 'config': { 'mixins': { 'Magento_Checkout/js/action/set-shipping-information': { 'Vendor_Module/...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible