Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. $objectManager = MagentoFrameworkAppObjectManager::getInstance();
  2. $product = $objectManager->create('MagentoCatalogModelProduct')->load($_item->getProduct()->getId());
  3. $imagewidth=30;
  4. $imageheight=30;
  5. //$_product = $objectManager->get('MagentoCatalogModelProduct')->load($_item->getProductId());
  6. $imageHelper = $objectManager->get('MagentoCatalogHelperImage');
  7. $image_url = $imageHelper->init($product, 'product_page_image_small')->setImageFile($product->getFile())->resize($imagewidth, $imageheight)->getUrl();
  8.  
  9. <div class="product-name"><a href="<?= $_item->getProduct()->getProductUrl(); ?>"> <?= $block->escapeHtml($_item->getName()) ?></a></div>
  10. <div class="sku"><?= /* @escapeNotVerified */ __('SKU'); ?>: <?= $block->escapeHtml($block->getSku($_item)) ?></div>
  11. <div class="sku"><a href="<?= $_item->getProduct()->getProductUrl(); ?>"> <img src="<?= $image_url?>"></a></div>
  12.  
  13. Thank you{{config path="trans_email/ident_custom1/name"}} for your order.
  14.  
  15. {{block class="MagentoFrameworkViewElementTemplate" order=$order name="order_sms" template="module_sales::items.phtml" area="frontend"}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement