Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

upload file mod


garychung

Recommended Posts

Posted

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

 

http://www.oscommerce.com/community/contri...e+upload/page,2

 

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 .

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...