Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

First try to find a product naming conversion

E.g

{product name}-{color}.jpg {product sku}-{color}.jpg 

Assuming that every product attribute has an image

<img src="/<?php echo $product->getName() . '-' . $this->htmlEscape($_item->getAttributeText('etickettype'))?>.jpg"> 

No need to do a if or case statement, if the image may not exist see Check if file exists before displaying in Magento PHP?Check if file exists before displaying in Magento PHP?

First try to find a product naming conversion

E.g

{product name}-{color}.jpg {product sku}-{color}.jpg 

Assuming that every product attribute has an image

<img src="/<?php echo $product->getName() . '-' . $this->htmlEscape($_item->getAttributeText('etickettype'))?>.jpg"> 

No need to do a if or case statement, if the image may not exist see Check if file exists before displaying in Magento PHP?

First try to find a product naming conversion

E.g

{product name}-{color}.jpg {product sku}-{color}.jpg 

Assuming that every product attribute has an image

<img src="/<?php echo $product->getName() . '-' . $this->htmlEscape($_item->getAttributeText('etickettype'))?>.jpg"> 

No need to do a if or case statement, if the image may not exist see Check if file exists before displaying in Magento PHP?

Source Link

First try to find a product naming conversion

E.g

{product name}-{color}.jpg {product sku}-{color}.jpg 

Assuming that every product attribute has an image

<img src="/<?php echo $product->getName() . '-' . $this->htmlEscape($_item->getAttributeText('etickettype'))?>.jpg"> 

No need to do a if or case statement, if the image may not exist see Check if file exists before displaying in Magento PHP?