Skip to content

delete

Auto Added by WPeMatico

Delete Custom module

I am new to magento development, made a custom module Vendor: Scandiweb Module: Scandiweb_Test The naming convention is not correct so I decided to delete it, I can’t run module:uninstall because its not installed from composer, I deleted the directory… Read More »Delete Custom module

Deleted the Product image, but still the image exists in the product grid in magento 2

I have deleted the product image using following code $imageProcessor = $_objectManager->create(‘MagentoCatalogModelProductGalleryProcessor’); $images = $product->getMediaGalleryImages(); $productGallery = $_objectManager->create(‘MagentoCatalogModelResourceModelProductGallery’); foreach($images as $child) { $objectManager = MagentoFrameworkAppObjectManager::getInstance(); $productGallery = $objectManager->create(‘MagentoCatalogModelResourceModelProductGallery’); $productGallery->deleteGallery($child[‘value_id’]); $product->setMediaGalleryEntries([]); $imageProcessor->removeImage($product, $child[‘file’]); $product->save(); } Image successfully deleted. But due to… Read More »Deleted the Product image, but still the image exists in the product grid in magento 2