Jump to content


  • Content count

  • Joined

  • Last visited

1 Follower

Profile Information

  1. Ok. The last hour and a half seem in vain, sadly. Nothing happens. No error, no new prompts. Nothing. I enabled and disabled the USPS shipping module, nothing happened. So I was wondering if anyone else had this problem. Any luck in getting a way to decide which options show up for the customer.
  2. CREATE TABLE photo_gallery ( id int(11) NOT NULL auto_increment, title varchar(30) NOT NULL default '', photo varchar(30) NOT NULL default '', PRIMARY KEY (id) ) TYPE=MyISAM try that. sorry man, i don't know sort of crack i was smoking when i messed up on that simple sql. cherio...
  3. Trusten

    Image Time Stamp

    yeah, i know. but i figured it'd be easy for me to keep track of it later. :( but i forgot to say thanks :) to mattice for first giving me the blue print to go by. rock on dutch man *hands Mattice chocolate*
  4. Trusten

    Image Time Stamp

    http://www.oscommerce.com/community/contributions,963 Often times, if you have an old image on the shop, and you upload a new one that has the same name, osc will overwrite the image. We can't always remember the names of all of our images. this little feature will simply put a time stamp on it. All images will have a different date on it, it won't repeat. it saves up to the very second. instead of pic1.jpg it reads M-D-T-pic1.jpg M-D-T (month day time) Many thanks to Galen who took the hour out to help me figure out why it wouldn't work. I owe him coffee.... Trusten.... here is the code In: catalog/admin/categories.php Find: // copy image only if modified $products_image = tep_get_uploaded_file('products_image'); $image_directory = tep_get_local_path(DIR_FS_CATALOG_IMAGES); if (is_uploaded_file($products_image['tmp_name'])) { tep_copy_uploaded_file($products_image, $image_directory); $products_image_name = $products_image['name']; Replace with: // copy image only if modified $products_image = tep_get_uploaded_file('products_image'); // we have an incoming file (temp.zip) in $file // create stamp $now = date("m-d-Y_H.i.s"); // merge $stamped_file = $now . '-' . $products_image['name']; $products_image['name'] = $stamped_file; $image_directory = tep_get_local_path(DIR_FS_CATALOG_IMAGES); if (is_uploaded_file($products_image['tmp_name'])) { tep_copy_uploaded_file($products_image, $image_directory); $products_image_name = $products_image['name']; Thanks to galen for figuring out what was wrong with the code. Have fun.
  5. oh good. i'll take what i can get. i have this form, it's suppose to allow members to upload their files. right? problem is, you know how in the adin area, if you have a pic named pic1.jpg, and you upload A DIFFERENT pic named pic1.jpg, it overwrites it? i want it so that it adds a date stamp onto the file that's being uploaded, so it reads M-D-Y (month day year) M-D-Y-pic1.jpg it won't be flawless, but it'll help. anyhow, i want it so that it adds words onto the file name when it saves it, and when it enters it into the database. think you can help?
  6. well, there is a different page, that's why. it's probably not needed but i'd have to look it over to see if it is. each time i've tried to do any major editing on the code, bad things happen. LOL sorta.
  7. find this (should be the second set of code // Now get all downloadable products in that order $downloads_query_raw = "SELECT DATE_FORMAT(date_purchased, '%Y-%m-%d') as date_purchased_day, o.orders_id, opd.download_maxdays, op.products_name, opd.orders_products_download_id, opd.orders_products_filename, opd.download_count, opd.download_maxdays Replace with // Now get all downloadable products in that order $downloads_query_raw = "SELECT DATE_FORMAT(date_purchased, '%Y-%m-%d') as date_purchased_day, o.orders_id, opd.download_maxdays, op.products_name, op.products_id, opd.orders_products_download_id, opd.orders_products_filename, opd.download_count, opd.download_maxdays the op.products_id was missing from that code.
  8. yeah, i got a fix for that. give me a sec. archive is if the person already downloaded the stuff, and has a few tries left but don't need it. they archive it. meaning take it off. but if it was an accident, they can just go to account, order info and do it the old fashion way. it's still there.
  9. any chance you could help me with renaming files as they are saved onto the site from admin?
  10. otherwise, it works great if you don't delete orders.
  11. color me really goofy but i think this is a box that i helped make. there is a bug in the box and there's not much to do to fix it. if this is in fact the box that i helped make, 1. did you email the maker? 2. did you email me? 3. if at ANY time, you deleted orders, or deleted members, especially deleted orders for one member in particular, THE BOX WILL NOT FADE FOR THAT PERSON. open a test account and do it yourself. archive the product, or use up all the downloads. however, if you delete any orders for that account you open, THE BOX, WILL NOT, GO AWAY. i don't know why it does this. but personally, i just never delete orders. i set them to cancel. *salutes* good luck.
  12. I wanted to make a contribution that allowed members to upload their files. Also, it would be good for anyone who wanted to make sure they didn't overwrite their old images when they were adding new products. I did get it to work, which really wasn't as hard as I thought it would be. Problem is, I still can't get the rename to work. I was given this code by Mattice // we have an incoming file (temp.zip) in $file // create stamp $now = date("m-d-Y_H.i.s"); // merge $stamped_file = $now . '-' . $file; // rename rename("/tmp/$file", "/home/yoursite/downloads/$stamped_file"); It looks pretty sound but I can't get it to work. I figured the part where it'd matter would be here. // copy image only if modified $products_file = tep_get_uploaded_file('products_file'); $mem_file_directory = tep_get_local_path(DIR_FS_CATALOG_MEM_FILE); if (is_uploaded_file($products_file['tmp_name'])) { tep_copy_uploaded_file($products_file, $mem_file_directory); $products_file_name = $products_file['name']; } else { $products_file_name = $HTTP_POST_VARS['products_previous_file']; } now, to do the fundimental of uploading, it does, two problems. 1. i can't get it to put the time stamp on so that it won't overwrite a file. 2. it won't upload large files. if a file is potentially 1mb, it will not write to the folder, and it will not show up in the previews part. it will show 'array'. is there anything i can do to guarantee that it will upload? or is there just an add-on i can find that will save me the headache. I'd rather use osc though. Thanks in advance.
  13. I'm trying to make a form with little or no success. well no success so far. What it should do is use osc to allow people to upload their files. It would enter the product into the database so others could very well just well do a search for it. Right now, that's not happening. I tried configuring the categories.php file but that's also a bust since all the code is spreakd all over the place. all i want is that when a pic or a file is uploaded, that it saves itself with an extension. either product ID or the date. like test.zip would save as 02022003_test.zip or something like that. I don't care how, just so that no one can upload the same file twice. also, i just want to change the images upload part into a file upload, i know that is not hard, i forgot how i did it before. right now i've installed the default image so the file upload won't work. can anyone help?