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, […]

SQL query results to CSV

Multiple times we get requests in projects to generate reports from database. Below command will be helpful in exporting the MySQL query results directly into CSV (comma separated values) file mysql -h {hostname} -u {username} -p {database_name} -B -e “SELECT code AS ‘Coupon Codes’ FROM salesrule_coupon WHERE rule_id=112” | sed “s/\t/,/g” > /tmp/coupon_code_$(date +%F).csv Above […]

MySQL table schema details

I am mentioning here a quick way to get the table schema format. Steps 1) Login to your database using mysql -u {username} -p -h {host_name> -D {database_name} 2) Execute query SELECT TABLE_NAME AS `Table`, ROW_FORMAT AS `Format` FROM information_schema.TABLES WHERE TABLE_SCHEMA = “{database_name}” 3) Primarily there are two types of format Dynamic and Compact […]

Scroll to top