I am going to explain here a way to add a breadcrumb in the default Magento Contact Us Page as an example 1) Create a layout file I have a theme module Decryptweb_Project, so creating a layout file inside it app/design/frontend/Decryptweb/Project/Magento_Contact/layout/contact_index_index.xml 2) Reference the existing breadcrumbs block
Category: Magento
Everything related to Magento eCommerce
Hide admin login in Magento 2
If you are using a SSO to login into Magento admin, you may need to hide the default Admin login functionality. I am mentioning here an important code snippet to hide the admin login form. 1) Create an admin layout For example, I have a module DecryptWeb_Admin, I am going to create a layout file […]
How to not remove items from Wishlist in Magento 2
Updates [April 20,2023] : I have developed an extension for this, please check details from link DW Wishlist Extension. Magento 2 has a functionality that removes the item from wishlist if its added to cart from wishlist. I had a task requirement, it was B2B project so mostly the vendors will buy the same set […]
Encryption and Decryption in Configuration in Magento 2
If you are working with APIs or any secret keys, than you will need to encrypt those keys and store it in Configuration (core_config_data) instead of in a visible form. Below are the steps to do that, 1) Encryption: In your Namespace/Module/etc/adminhtml/system.xml, you need to add a class inside backend_model tag that does the encryption, […]
Adobe Commerce Cloud Services Details
Ways to check Adobe Commerce Cloud Services Details like PHP, ElasticSearch, Redis, MySQL
CSV import in Magento 2
Magento 2 has a CSV processor, that is being used to import and export product and customer related data. In my earlier post I explained a way to generate a CSV. I am explaining here a way to import a CSV to update inventory of the existing products. Here as seen simply you can call […]
CSV export in Magento 2
Magento 2 has a CSV processor, that is being used to import and export product and customer related data. For one of my project I had to generate a CSV of the information I received for a product(s) from an API and use the same CSV as an input file for updating the quantity of […]
Amazon SNS with Magento 2
Updates [April 15,2023] : I have developed an extension for this, please purchase from link Promotion SMS Extension. In one of my project I had to use AWS SNS service to send an SMS from Magento I am explaining here a basic way to implement the same 1) Refer aws-sdk-php to install AWS SDK Guide […]
Custom CLI commands Magento 2
Magento 2 enables your component to add commands to the default CLI Magento has one command-line interface that performs both installation and configuration tasks: /bin/magento. I am explaining here a way to add custom commands for your module. 1) Create a Command class, I have created a custom class at app/code/DW/Interface/Console/OrderCron.php. 2) Declare your Command […]
Custom Log File in Magento 2
Magento provides multiple types of logs by default (info, notice, warning, critical etc) Recently I had to use custom log files for a custom module that I implemented. I will try to explain here the multiple approaches to do that, a) Set a custom file in your module’s di.xml file In the di.xml file of […]