Gasse1014life Posted September 22, 2011 Share Posted September 22, 2011 hi allllll after one month of work i have finnally finnish the PDF and all file upload via admin for product_info page. for version 2.3.x i have reduce script at his more simple expression to ability of anyone to modify code and show it if not null anywhere it the catalog. at this time i have only put a link in product info.php page to see the file who have been upload in admin , but it can be modify to be put in any code like flashvar or swf etc... with this tag" $product_info['products_fileupload'] or $pInfo->products_pdfupload " this add on have been test with 11 others addon install at the same time without any error, (SQL or Php) if you have any question it will be a pleasure to help you to resolve your problem.. :) the add on will be ready in 24 hours i know a lot of people will be happy :P enjoy Quote Link to comment Share on other sites More sharing options...
Gasse1014life Posted September 23, 2011 Author Share Posted September 23, 2011 http://addons.oscommerce.com/info/8161 Quote Link to comment Share on other sites More sharing options...
Gasse1014life Posted September 24, 2011 Author Share Posted September 24, 2011 I have forgot to do a fix to allow all ext to be upload, but u can set only the wanted ext. to be upload. catalog/admin/includes/classes/upload.php function upload($file = '', $destination = '', $permissions = '777', $extensions = array('jpg','png')) { only add ext you want to... and dont forget for some security reason , change 777 to 755 ******************************* in same file ,search for : if (!is_writeable($this->destination)) { replace by: if (!tep_is_writable($this->destination)) { ******************************* i have reverse the max file size upload to a min file size upload to allow any file size.. in the same file search for : if ( tep_not_null($file['tmp_name']) && ($file['tmp_name'] != 'none') && is_uploaded_file($file['tmp_name']) && ($file['size'])<150000) { replace by : if ( tep_not_null($file['tmp_name']) && ($file['tmp_name'] != 'none') && is_uploaded_file($file['tmp_name']) && ($file['size'])>100) { ******************************* NOW its PERFECTLY workin on ALL v2.3 version of oscommerce. sorry to the pertubation let me another 24 n i will do a new package. for now the file is attach to this post, use at your own risk. cheer Quote Link to comment Share on other sites More sharing options...
drhigham Posted September 28, 2011 Share Posted September 28, 2011 Hi, Thanks for this contribution, but I can't seem to get it to work. The file isn't uploading to the server when I press "Save" in the edit product page.In your instructions you didn't mention anything about creating a folder for the files to be uploaded to, do I need to create a folder named "Manuals" in the Catalog folder? and edit configure.php's to include "define('DIR_WS_MANUALS', 'manuals/'); define('DIR_WS_CATALOG_MANUALS', DIR_WS_CATALOG . 'manuals/');" and "define('DIR_FS_CATALOG_MANUALS', DIR_FS_CATALOG . 'manuals/');" Do I need to anything else not included in the instructions regarding uploading pdf's? Many thanks, Dave Quote Link to comment Share on other sites More sharing options...
Guest Posted February 21, 2012 Share Posted February 21, 2012 Hello What does this addon do? Quote Link to comment Share on other sites More sharing options...
Gasse1014life Posted June 20, 2012 Author Share Posted June 20, 2012 Hi, Thanks for this contribution, but I can't seem to get it to work. The file isn't uploading to the server when I press "Save" in the edit product page.In your instructions you didn't mention anything about creating a folder for the files to be uploaded to, do I need to create a folder named "Manuals" in the Catalog folder? and edit configure.php's to include "define('DIR_WS_MANUALS', 'manuals/'); define('DIR_WS_CATALOG_MANUALS', DIR_WS_CATALOG . 'manuals/');" and "define('DIR_FS_CATALOG_MANUALS', DIR_FS_CATALOG . 'manuals/');" Do I need to anything else not included in the instructions regarding uploading pdf's? Many thanks, Dave yes was my error, you need to edit admin and catalog configure.php to put these lines,, "define('DIR_WS_MANUALS', 'manuals/'); "define('DIR_WS_CATALOG_MANUALS', DIR_WS_CATALOG . 'manuals/');" "define('DIR_FS_CATALOG_MANUALS', DIR_FS_CATALOG . 'manuals/'); and create the Manuals folder into the catalog. with permissions 755. thank for the info and ill make an upgrade packages. have a nice day Quote Link to comment Share on other sites More sharing options...
Gasse1014life Posted June 20, 2012 Author Share Posted June 20, 2012 Hello What does this addon do? this add-on is an extra file upload field and allow you to upload any file for each product in catalog, and linked to catalog in product_info.php. same as images download but for others extension. Quote Link to comment Share on other sites More sharing options...
1qay1qay Posted June 30, 2012 Share Posted June 30, 2012 Thanks for excellent contribution ! small errata for implementation docs in admin categories.php : At step 7 replace <td class="main"><?php echo File_Upload; ?></td> with <td class="main"><?php echo TEXT_PRODUCTS_PDFUPLOAD; ?></td> Quote Baterije & Akumulatorji OsCommerce store Link to comment Share on other sites More sharing options...
Psytanium Posted March 7, 2014 Share Posted March 7, 2014 Hello, how can we delete an already uploaded pdf file? thx Quote Link to comment Share on other sites More sharing options...
Psytanium Posted March 7, 2014 Share Posted March 7, 2014 Hello, how can we delete an already uploaded pdf file? thx anyway to delete an already uploaded file ??? I have done this by changing if (isset($HTTP_POST_VARS['products_pdfupload']) && tep_not_null($HTTP_POST_VARS['products_pdfupload']) && ($HTTP_POST_VARS['products_pdfupload'] != 'none')) { $sql_data_array['products_pdfupload'] = tep_db_prepare_input($HTTP_POST_VARS['products_pdfupload']); } to $sql_data_array['products_pdfupload'] = tep_db_prepare_input($HTTP_POST_VARS['products_pdfupload']); and change tep_draw_input_field('products_previous_pdfupload' to tep_draw_input_field('products_pdfupload' now to remove an uploaded file, just empty the upload text field. opus_uno2001 1 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.