S
S
sugarufc2016-06-03 20:26:13
opencart
sugarufc, 2016-06-03 20:26:13

How to change the name of the uploaded image in OpenCart?

For example, there are 2 different product images, but with the same name. I first upload one image to OpenCart, then I upload another image with the same name to another product, so the last image overwrites the first one. So, how to make sure that the image names do not repeat, for example, when loading each image, the time function or a unique id was added at the end so that the name was different. Who knows how this can be done? please tell me it's very necessary.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Valentyn Riaboshtan, 2016-06-03
@VaLeXaR

Watching what Openkart.
For example, in 1.5, the admin/controller/common/filemanager.php file is responsible for uploading files.
On line 487, a file is created, where the $filename variable is responsible for the file name.
And on line 424, this variable is formed from the file name. Here would still transliteration add.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question