How To Remove Block Depending on Config Setting in Magento 2

How To Remove Block Depending on Config Setting in Magento 2

I’ve earlier posted a solution to remove a block from the layout in Magento 2 But what if you want to remove block depending on config setting in Magento 2 store? It may happen that based on certain conditions, you want to display a block or eliminate it. For example, you want to disable the account registration based on a specific condition and hence remove the login block. Implement the below method for similar scenarios and handle conditional behaviors like

Continue Reading

Solved – PayPal Issue in Magento 2.3.3 Checkout

Solved - PayPal Issue in Magento 2.3.3 Checkout

Recently upgraded to the latest Magento 2.3.3 version? But are you facing the Paypal issue in Magento 2.3.3 checkout or order placement? The upgraded store works fine with adding products to the cart, checkout, and placing the order but fails to send the order confirmation Email! You get an exception like: Try the below solution to get rid of this Paypal problem while checkout and order placement: Solution for PayPal Issue in Magento 2.3.3 Checkout: Find the below code in

Continue Reading

How To Set Date Format In Magento 2

How To Set Date Format In Magento 2

There’s no surprise that Magento 2 is a global platform serving online businesses of all types. Magento 2 stores host visitors from all around the globe. Every country does not follow the same date and time format. So, as per your Magento 2 store target audience, you need to configure the date and time options for the sake of customer convenience. If you keep on using the default setting and the customers are using some different formats, it may confuse

Continue Reading

How To Check If Product With SKU Exists in Magento 2

How To Check If Product With SKU Exists in Magento 2

How embarrassing it would be for a Magento 2 developer to develop a complete functionality based on the product ID and try to implement it only to realize in the end that it won’t work as the product only does not exist in the first place!! Happens! The easy escape to such a situation is to check if product with SKU exists in Magento 2! Prior to using the SKU anywhere, you need to check if that product exists in

Continue Reading

How To Override Catalog Widget Block in Magento 2

How To Override Catalog Widget Block in Magento 2

In Magento 2, blocks are PHP classes used to connect or create a link between layout and templates. We, developers, sometimes require to place the related template file into the override block with the same directory path as the original when we override the widget block class. Hence, to override catalog widget block in Magento 2, you need to follow the below steps: Method To Override Catalog Widget Block in Magento 2: Create di.xml file at app/code/Vendor/Module/etc into your custom module [crayon-5df5e6ea10f67242126575/] Create a

Continue Reading

How To Load Products by SKU in Magento 2

How To Load Products by SKU in Magento 2

Earlier, I posted a solution to get product collection by category ID in Magento 2. The idea was to get the product information in Magento 2. With a similar idea, but a different approach, I’ve come up with a solution to get product information by SKU in Magento 2 store. You can load products by SKU in Magento 2 and then use the details for either developing an SKU based feature or fulfill crazy client requirements! Method To Load Products

Continue Reading

How To Create Simple Products in Magento 2

How To Create Simple Products in Magento 2

According to Magento docs, A simple product is a physical item with a single SKU. There are six product types in Magento 2: Simple Product Configurable Product Grouped Product Virtual Product Bundle Product Downloadable Product Among these, the simple product type is integral and as the name says, the most basic product type of Magento 2 stores. It has defined attributes that customers can’t change. The admin can use this product type independently or with other product types such as grouped,

Continue Reading

How To Remove Version Number In File Paths in Magento 2

How To Remove Version Number In File Paths in Magento 2 6

Magento 2 offers a feature of static content signing to invalidate the browser cache for static resources. To do so, it adds a deployment version to the URL of the static files. However, these files’ URLs contain the deployed version due to which 404 error occurs. The solution is to remove version number in file paths in Magento 2 and there are two methods given below for the same. Methods to Remove Version Number In File Paths in Magento 2:

Continue Reading

How To Use Dependency Multiple Field In Magento 2 Admin Form

How To Use Dependency Multiple Field In Magento 2 Admin Form

Magento 2 platform gets better every day to improve the user experience. If the CMS falls short, the developers have the flexibility to customize the default features. Using dependency multiple fields is one such thing you can implement to improve the user experience, collect relevant and accurate data from the users, and hide the unnecessary fields in the form. For example, You can also use dependency multiple field in Magento 2 admin form for custom requirements or custom forms. Use

Continue Reading

How To Add Magento Shopping Cart Price Rules

How To Add Magento Shopping Cart Price Rules 11

There’s no denying to the fact that no one can escape from the attractive offers and discounts! People love discounts! Discounts and coupons make it easy to encourage hesitant shoppers to finally pull the trigger. And they incentivize the past customers to convert again! Magento and Magento 2 store owners must not let go of this chance and especially on holiday seasons! You can refer here to know the importance of the holiday season for sales and the implementation for

Continue Reading