Skip to main content

E-commerce Platforms

E-commerce Platforms

Magento GraphQL ProductInterface Error Caused by Incorrect Product Type Casing

Magento GraphQL ProductInterface Error Caused by Incorrect Product Type Casing
Issue
GraphQL responses returned null for some products along with the error:
Concrete type for ProductInterface not implemented
Root Cause
Magento 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

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

Magento 2: Delete All Products While Keeping 5000 with Mixed Visibilities

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

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)