Vinai / nicer-image-names

Magento extension to build catalog image file names from product attributes so they have neat descriptive names.
77 stars 31 forks source link

Problem with attributes #25

Closed Webmasterei closed 9 years ago

Webmasterei commented 9 years ago

Hi great extension! Saved me a lot of headache! I habe a little problem though. When I have an attribute like %product_type it does not work, as $product is beeing taken as variable and _type as a plain string. How to work around this?

Vinai commented 9 years ago

Two things have to be considered. First, attributes with underscores in their name need to be written in camel case, e.g. %productType. When matching those attributes it still could happen that it matches an attribute as %product, if such an attribute is present. In those cases you can force the full name to be used by enclosing the name in curly braces: %{productType}.

Webmasterei commented 9 years ago

That worked! Thanks.