0
我使用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>
如有任何知道解决办法。