Here we are checking the product type and adding the product to the cart programmatically based on the bundle item as the checkbox item.
Tag: Magento
Add custom column filter in customer grid collection in Magento 2
STEP 1Create a di.xml file inside the app/code/Vendor/Module/etc/ directory. And add the below-mentioned code in this file. STEP 2 Create Collection.php file inside the app/code/Vendor/Module/Model/ResourceModel/CustomerGrid/ directory.
All You Need To Know About Magento 2 Multi Source Inventory
Multi Source Inventory (MSI) was introduced in Magento 2.3.0. This is actually a huge leap for the Magento community as it dramatically improves Inventory Management by allowing the merchants to control inventory for single or multiple sources and sales channels. SourcesThis is the primary element of the new inventory. A source is a place where… Continue reading All You Need To Know About Magento 2 Multi Source Inventory
Getting Visual Swatchs on Phtml file for products
Viewing the visual swatches for the simple products in PLP and PDP pages . This is custom functionility to make the simple product to config by addin the related products with same property but with different color,size and attributes. Here it is done with a object but always convert the object manager to a block… Continue reading Getting Visual Swatchs on Phtml file for products
Magento 2.4 Custom form validation mage error duplication
Mage error component is duplicating error warnings on form inputs. Steps to reproduce-Submit blank login form;-Fill the input and submit again;-Remove the input field and submit blank form again.-Click one more time on submit button. Solution:- When we write a js for the submission of the please confirm that the form is valid or not.… Continue reading Magento 2.4 Custom form validation mage error duplication
Logger Working in Magento From V 2.4.1
There is a problem with the logger from the version of Magento 2.4.1 usually, we were using the logger as follows: This belongs to the old library From the new version of Magento we could use the loggers as follows: or
How to configure qty to use decimal quantities in magento 2
In some Cases we may need to use qty to use decimal in our store so inorder to enable this we have two provisions to select that to each product based or we can totally declare to allow decimal for qty values. Display settings for each individual productGo to the following link : Admin panel… Continue reading How to configure qty to use decimal quantities in magento 2
How to Create User Role in Magento 2?
Creating Magento 2 user roles is the security action you should take before adding any users to your store. It helps you define the level of permissions some users will be granted with in order to restrict their access to some of the Magento 2 admin panel sections. In order to create a user role in Magento 2 take the… Continue reading How to Create User Role in Magento 2?
Adding Remember Me To Magento Sign In and Sign Up Pages
Magento has default feature to keep the user logged in to a particular browser and for custom design it may not be visible . Add the following to custom module layout to Magento Customer>layout>customer_account_login.xml and customer_account_create.xml Turn on the persistence option in back end.
Method to add custom JS validation rule in Magento 2
Add requirejs-config.js file to the following location: app/code/[Vendor]/[Module]/view/frontend/requirejs-config.js Copy file vendor/magento/module-ui/view/base/web/js/lib/validation/rules.js to app/code/[Vendor]/[Module]/view/frontend/web/js/lib/validation/rules.js Where you can add the custom validation code as following: That’s it. Overriding the inbuilt JS also done in the same,if you are using a custom , create a folder with the same naming pattern in the vendor folder structure and paste… Continue reading Method to add custom JS validation rule in Magento 2