bashaclick Posted November 23, 2008 Share Posted November 23, 2008 (edited) hi all i have problem in admin contorl listen :D im crate a new product and inster images the name images 1.jpg ok the path images images/1.jpg now it's ok i crate a nother product and upload images same name 1.jpg this same path images/1.jpg now i go no old product it display a new images plz help me how can rename image direct in date or time .... regard :blush: Edited November 23, 2008 by bashaclick Quote Link to comment Share on other sites More sharing options...
empire_liquidaotrs Posted November 24, 2008 Share Posted November 24, 2008 hi all i have problem in admin contorl listen :D im crate a new product and inster images the name images 1.jpg ok the path images images/1.jpg now it's ok i crate a nother product and upload images same name 1.jpg this same path images/1.jpg now i go no old product it display a new images plz help me how can rename image direct in date or time .... regard This worked for me: in /catalog/admin/classes/upload.php function set_filename($filename) { $this->filename = $filename; } with: function set_filename($filename) { $file_parts=explode('.',$filename); $new_filename=time()."_".rand(1000,9999).".".end($file_parts); $this->filename = $new_filename; } regards Quote Link to comment Share on other sites More sharing options...
bashaclick Posted November 25, 2008 Author Share Posted November 25, 2008 :wub: thank you it work fine Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.