Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

change upload file name


Recommended Posts

I'm new user for osc, and found the upload file mod from osc contribution as below :




and some codes are as below :


To allow uploaded files to retain their names and extensions (i.e.) picture.jpg (instead of being renamed in the form of '1' or '3", Manually edit the file: includes/application_top.php as follows:


a. Search this file for: $products_options_file->set_filename("$insert_id");


b. Replace with: $products_options_file->set_filename("$insert_id" . $products_options_file->filename);



it works very well, however, I want to change the upload file name, which including product name , e.g. 1 t-shirt abc.jpg ( 1 = insert id , t-shirt = product name & abc.jpg = original name of upload file. ) much appreciate if someone can help .

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...