New answers tagged

0

We can use the function copyFile() from Magento\Framework\Filesystem; use Magento\Framework\Filesystem; public function __construct( Filesystem $backendFile ) { $this->mediaDirectory = $filesystem->getDirectoryWrite(DirectoryList::MEDIA); } $result = $this->mediaDirectory->copyFile( $this->getPath('a/m/',...


0

The 'roles' are specific attributes: image (for Base role), small_image (for Small), swatch_image (for Swatch) and thumbnail. You can find the IDs of these attributes by checking the eav_attribute table and according to their backend_type, you will find the values associated per product in the catalog_product_entity_varchar table. The records will look like ...


Top 50 recent answers are included