Advertisement
Guest User

Untitled

a guest
Jan 19th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. use MagentoStoreModelStoreManager $storeManager
  2.  
  3. $this->storeManager = $storeManager;
  4. $config_path =
  5. catalog/placeholder/thumbnail_placeholder OR
  6. catalog/placeholder/swatch_image_placeholder OR
  7. catalog/placeholder/small_image_placeholder OR
  8. catalog/placeholder/image_placeholder OR
  9.  
  10. public function getConfig($config_path)
  11. {
  12. return $this->storeManager->getStore()->getConfig($config_path);
  13. }
  14. $mediaUrl = $this ->storeManager->getStore()->getBaseUrl(MagentoFrameworkUrlInterface::URL_TYPE_MEDIA );
  15.  
  16.  
  17. <img src = $mediaUrl.'catalog/product/placeholder'.$this->getConfig($path) />
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement