

Now you can define sender's email and change its name per each email template. The editor provides the default features as customizing texts, changing styles, inserting pictures, links, etc. The integrated WYSIWYG editor helps to edit templates your own way. The built-in editor helps to customize texts literally in several minutes. Need to configure email templates for different store views? Running German, English and Spanish store views and looking for translation? The extension allows to modify system emails for different store views by switching to a necessary store and choosing a template. The whole management takes place in backend separated from the Magento 2 default email templates section. Just pick up a necessary email and edit it via the WYSIWYG editor available below the list. Customize system emails directlyĭon't want to spend tons of time creating transactional emails every time when minor changes are required in the email? The tool provides the list with the default email templates available for editing. Now you can edit texts via the convenient WYSIWYG editor, load templates with default values, define senders' data, add CC and BCC and attach various files to emails. You no longer need to create transactional emails to change templates within the text area only. You can select other images types besides product_thumbnail_image: see magento/theme-frontend-luma/etc/view.xml for a list of available product images, or create your own in a view.xml file.The Email Templates Manager extension for Magento 2 introduces a simple way to manage and edit system emails directly for certain store views. $this->appEmulation->stopEnvironmentEmulation() >init($product, 'product_thumbnail_image')->getUrl() $imageUrl = $this->imageHelperFactory->create() now the image helper will get the correct URL with the frontend environment emulated $product = $this->productRepositoryFactory->create()->get($sku) $this->appEmulation->startEnvironmentEmulation($storeId, \Magento\Framework\App\Area::AREA_FRONTEND, true) $storeId = $this->storeManager->getStore()->getId() get the store ID from somewhere (maybe a specific store?) Then, wherever you need to get the image frontend URL: $sku = "my-sku" $this->imageHelperFactory = $imageHelperFactory $this->productRepositoryFactory = $productRepositoryFactory \Magento\Catalog\Helper\ImageFactory $imageHelperFactory \Magento\Catalog\Api\ProductRepositoryInterfaceFactory $productRepositoryFactory, \Magento\Store\Model\App\Emulation $appEmulation, \Magento\Store\Model\StoreManagerInterface $storeManager, * \Magento\Catalog\Helper\ImageFactory $helperFactory * \Magento\Catalog\Api\ProductRepositoryInterfaceFactory $productRepositoryFactory

* \Magento\Store\Model\App\Emulation $appEmulation * \Magento\Store\Model\StoreManagerInterface $storeManager * \Magento\Catalog\Api\ProductRepositoryInterfaceFactory * \Magento\Store\Model\StoreManagerInterface If you want the published/cache frontend URL of an image for a specific store view (like I did) this is working for me: /**

>setImageFile($product->getSmallImage()) // image,small_image,thumbnail $imageUrl = $helperImport->init($product, 'product_page_image_small') $helperImport = $objectManager->get('\Magento\Catalog\Helper\Image') $objectManager =\Magento\Framework\App\ObjectManager::getInstance() If you need to return a product URL it should look like this: //todo get product object $product We can get the image: $product = $this->_productRepositoryFactory->create() $this->_productRepositoryFactory = $productRepositoryFactory \Magento\Catalog\Api\ProductRepositoryInterfaceFactory $productRepositoryFactory Inject \Magento\Catalog\Api\ProductRepositoryInterfaceFactory in the constructor. This way may not the best way to get a product image.
