E-commerce Platforms
Magento GraphQL ProductInterface Error Caused by Incorrect Product Type Casing
GraphQL responses returned
null for some products along with the error:Concrete type for ProductInterface not implementedMagento stores product types in the
type_id column (e.g., simple, configurable). These values must be lowercase. Some products were saved with incorrect casing such as Simple instead of simple.Magento 2: SQL Queries to Delete Customer Data
This article gives you organized SQL queries for deleting customer-related data in Magento 2.
Important: customer data in Magento can mean two different scopes:
1. Customer accounts only — customers, addresses, grids, wishlist, compare, login/session style data.
2. Full customer footprint — everything above plus quotes, orders, invoices, shipments, credit memos, reviews, newsletter, and reward/store-credit style extension data if present.
Magento 2: Keep 5000 Products with Mixed Visibilities and Delete the Rest
This guide provides the exact SQL and CLI commands to retain 5000 products with a balanced distribution of visibility values, and remove all others safely.
Step 1: Create a Permanent Table for Products to Keep
CREATE TABLE products_to_keep (entity_id INT);
Step 2: Insert the 5000 Products to Keep
How to Automatically Restore PM2 Apps After Server Reboot (Managed Hosting)<
How to Automatically Restore PM2 Apps After Server Reboot (Managed Hosting)
Overview
On managed servers without root access, PM2 processes do not automatically restart after a server reboot. This can cause all Node.js / Next.js applications to go offline.
To solve this, we use:
Print Magento Email Body before you send it
You can use this code to display the html conent
Quick Way to Find Products Missing Images in Magento 2
Keeping your product images up to date is important for any online store. Sometimes, during imports or catalog updates, a product might end up without an image. Magento 2 doesn’t show a built-in list of these products, but you can easily find them using a small SQL query.
Sending an email with PDF attachment in Magento
in this script we will mention two ways to add an attachment to an email in Magento2, one is for Magento 2.4.6 and less and the another one for Magento < 2.4.6 or 2.4.8 in specifc
first of all override the templatebuilder clas
in the di.xml add his
<preference for="Magento\Framework\Mail\Template\TransportBuilder" type="Vendor\Module\Rewrite\Magento\Framework\Mail\Template\TransportBuilder"/>
now add this class (Magento 2.4.8)
How to Expose system configuration value to be used in CMS Pages/Blocks or email template
Expose system configuration value to be used in CMS Pages/Blocks or email template
Copy Category Names Between Magento Store Views (French → French) Safely and SEO-Smart
Copy Category Names Between Magento Store Views (French → French) Safely and SEO-Smart
A precise, production-ready method to duplicate only category names from one French store view to another in the same Magento instance, while protecting SEO signals.