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 similar attributes names #21

Closed veresc closed 10 years ago

veresc commented 10 years ago

Hi Vinai,

I've just installed the extension and have the following problem.

We have a set of attributes with similar names in our application. For example - model, modelName, modelType

When I setup such map %model-%modelName-%sku then for the product with model = "Green", modelName = "Pink", sku = "1234" I receive nice image name which looks like "Green-GreenName-1234".

I think it's because function str_replace finds this repetition "%model" and replaces it with "Green".

Could you please look at this problem?

Vinai commented 10 years ago

Thanks for your issue report. I just pushed an update to the repository. Please update your installation and change your image name placeholder map as follows:

%model-%{modelName}-%sku

With the new patch curly parenthesis can be used around attribute codes to qualify them. Then the %model placeholder will no longer match the %{modelName} placeholder.
Please let me know if that works for you. Thanks.

veresc commented 10 years ago

Thank you so much for the update. It works perfectly.