Я использую конфигурацию system.xml для загрузки файла через бэкэнд. Он работает отлично.Как изменить имя загруженного файла в Magento?
Но мне нужно изменить имя загруженного изображения на текущий store id
. Как я могу? Теперь он загружается с его оригинальным именем.
Мои system.xml
является
<?xml version="1.0"?>
<config>
<tabs>
<restaurant translate="label" module="restaurant">
<label>Upload Logo</label>
<sort_order>999999</sort_order>
</restaurant>
</tabs>
<sections>
<restaurant_options translate="label">
<label>Upload Logo</label>
<tab>general</tab>
<frontend_type>text</frontend_type>
<sort_order>1000</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<groups>
<SAMPLE translate="label">
<label>Upload Your Store's Logo</label>
<frontend_type>text</frontend_type>
<sort_order>100</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<fields>
<ENABLED translate="label comment">
<label>Logo</label>
<comment>file types: jpeg, gif, png.</comment>
<frontend_type>image</frontend_type>
<backend_model>adminhtml/system_config_backend_image</backend_model>
<upload_dir config="system/filesystem/media" scope_info="1">theme</upload_dir>
<base_url type="media" scope_info="1">theme</base_url>
<sort_order>1</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</ENABLED>
</fields>
</SAMPLE>
</groups>
</restaurant_options>
</sections>
</config>
Пожалуйста, если любой знает решение.