xvoyance Posted April 21, 2012 Share Posted April 21, 2012 I upload my products images separately with FTP and put under catalog/images. How could I tell OSC 2.3.1 when I create new products that their images are there? Thanks. Link to comment Share on other sites More sharing options...
GemRock Posted April 21, 2012 Share Posted April 21, 2012 if you dont want to edit the product and let it upload the image which does two things: upload image and write image name to the db, then only way is enter the image name in the product table in the db. Ken commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience. Link to comment Share on other sites More sharing options...
xvoyance Posted April 21, 2012 Author Share Posted April 21, 2012 if you dont want to edit the product and let it upload the image which does two things: upload image and write image name to the db, then only way is enter the image name in the product table in the db. Ken I also want to edit the products, since there are other fields need to fill out. So, how should I tell osc that the image is there? Link to comment Share on other sites More sharing options...
GemRock Posted April 21, 2012 Share Posted April 21, 2012 well, it sounds like you drove from a to b but then you decided you should take a coach/bus to go from a to b so you drove back to a and take a coach/bus. you try to tell the coach driver not to charge you because you already been to b early on but i guess you wont be successful. outcome: your first trip to b is a complete waste, or for your question, you ftp'ed the image to server is a complete waste, and there is no easy way such as a tick box to tell edit/add new not to upload iamge. Ken commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience. Link to comment Share on other sites More sharing options...
GoTTi Posted April 21, 2012 Share Posted April 21, 2012 are your images in consecutive order like 1.jpg, 2.jpg, 3.jpg, etc? if they are, use the easy populate addon and you would be on the right path to getting it done quickly. Link to comment Share on other sites More sharing options...
GemRock Posted April 21, 2012 Share Posted April 21, 2012 further to my comment, you can try to comment out the upload product image code in categories.php. i dont have the file at hand so cant tell you where they are. Ken commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience. Link to comment Share on other sites More sharing options...
xvoyance Posted April 21, 2012 Author Share Posted April 21, 2012 further to my comment, you can try to comment out the upload product image code in categories.php. i dont have the file at hand so cant tell you where they are. Ken COMMENT OUT? sure, that is easy, i know how to do it. (You can actually leave it there.) But how to tell the system the file is there? That is my question. Link to comment Share on other sites More sharing options...
spooks Posted April 22, 2012 Share Posted April 22, 2012 As gotti said use easy populate, or phpMyAdmin but perhaps this thread will help you see better http://www.oscommerce.com/forums/topic/307356-oscommerce-road-map-for-the-newbies Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
GemRock Posted April 22, 2012 Share Posted April 22, 2012 ...But how to tell the system the file is there? That is my question... the answer is easy: as you say you are going to edit the product (or add new product for that matter), during the process, you browse to the image file on your local pc, then the system will save the image file name in the db w/o uploading it again to the server, that way, it will tell the system the file is there by matching the file you FTP'ed to server and the name of same file in the db. but if you want to detect whether files have been uploaded to server, if yes then no upload; if no then do the upload, then the whole thing wont be as easy as just comment out a file lines of code. it becomes complicated albeit still do'able (NOT worthy it at all imo). Ken commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience. Link to comment Share on other sites More sharing options...
xvoyance Posted April 23, 2012 Author Share Posted April 23, 2012 As gotti said use easy populate, or phpMyAdmin but perhaps this thread will help you see better http://www.oscommerce.com/forums/topic/307356-oscommerce-road-map-for-the-newbies Could Easy Polulate support in-line input data i.e. put my input data in the http command line like http://www.mysite.com/catalog/easypopulate.php?product_model=1111&product_name="aasdsa".... instead of file upload? Link to comment Share on other sites More sharing options...
spooks Posted April 23, 2012 Share Posted April 23, 2012 Such things can be done if only the get method is used and you ensure sessions remain (cookie use) but I suspect that uses post, read the add-ons documentation Caution: pure use of the query string to pass data to the dBase is an invite to hackers Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
xvoyance Posted April 24, 2012 Author Share Posted April 24, 2012 if you dont want to edit the product and let it upload the image which does two things: upload image and write image name to the db, then only way is enter the image name in the product table in the db. Ken Could you please tell me how to insert directly into the db? Thanks. Link to comment Share on other sites More sharing options...
GemRock Posted April 25, 2012 Share Posted April 25, 2012 you use phpMyAdmin (accessed from cpenal) to edit tables directly. after logging in to phpmyadmin, choose the db if there are more than one dbs, then select the products table, find the product you want to enter the product image, click Edit against the product in question, enter the file name of the product image into the field of products_image. if the image on the server is not directly under the images folder, ie, under sub-folder(s), then include the sub-folder(s) name(s) before the product image file name. click Save/Go button to save the entry. if the image files are named in such a way that it uses the product name or model or product id, all of which are unique, then you can write a few lines of php code to insert product image name programmatically. the code can be saved as a php file and re-used every time after you FTP'ing images to server. it can be run is this way: http://www.yoursite.com/write_images_to_db.php. thats how i do it. Ken commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience. Link to comment Share on other sites More sharing options...
xvoyance Posted April 25, 2012 Author Share Posted April 25, 2012 you use phpMyAdmin (accessed from cpenal) to edit tables directly. after logging in to phpmyadmin, choose the db if there are more than one dbs, then select the products table, find the product you want to enter the product image, click Edit against the product in question, enter the file name of the product image into the field of products_image. if the image on the server is not directly under the images folder, ie, under sub-folder(s), then include the sub-folder(s) name(s) before the product image file name. click Save/Go button to save the entry. if the image files are named in such a way that it uses the product name or model or product id, all of which are unique, then you can write a few lines of php code to insert product image name programmatically. the code can be saved as a php file and re-used every time after you FTP'ing images to server. it can be run is this way: http://www.yoursite.com/write_images_to_db.php. thats how i do it. Ken Sure, I know all what you said. I am trying the second way, i.e. writing a PHP to insert it directly into the DB. But my question is how to write that code? Can you write that line directly? Link to comment Share on other sites More sharing options...
jhande Posted April 26, 2012 Share Posted April 26, 2012 Forgive me for being so naive... But why all these scripts to populate the database with product info & image details? Either use osC's admin panel or the Easy Populate contribution. Just sounds to me like you're trying to reinvent the wheel. :huh: - :: Jim :: - - My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 - Link to comment Share on other sites More sharing options...
xvoyance Posted April 26, 2012 Author Share Posted April 26, 2012 Forgive me for being so naive... But why all these scripts to populate the database with product info & image details? Either use osC's admin panel or the Easy Populate contribution. Just sounds to me like you're trying to reinvent the wheel. :huh: Have you seen in a supermarket or a bookstore, which I am going to built, they use barcode scanner to scan the products and the products goes immediately into their computers, which is called "realtime". EP is a batch processing.....People today have forgot what is "batch processing" :( OSC admin panel could not retrieve the products information from libraries, such as google books or ISBNDB or OPENLIBRARY, not either their images. Furthermore, I do not want to fill out the form for 100000 books with possibility to make mistakes. 100000 books is only a mini (a scale less than nano, presumably you all know what is nano but not batch) book store! Link to comment Share on other sites More sharing options...
jhande Posted April 26, 2012 Share Posted April 26, 2012 Thank you for the explaination. - :: Jim :: - - My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 - Link to comment Share on other sites More sharing options...
xvoyance Posted April 26, 2012 Author Share Posted April 26, 2012 Thank you for the explaination. I have actually finished everything, i.e. fill out the form automatically, except the last step for image, which need to insert into DB directly. I f you can help you I can achieve that quicker. Link to comment Share on other sites More sharing options...
GemRock Posted April 26, 2012 Share Posted April 26, 2012 the code can be downloaded from my website (see profile) on shop demo & test bed home page. Ken commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience. Link to comment Share on other sites More sharing options...
xvoyance Posted April 26, 2012 Author Share Posted April 26, 2012 got it. investigating........ Link to comment Share on other sites More sharing options...
xvoyance Posted April 26, 2012 Author Share Posted April 26, 2012 Your contribution told me: to update DB it is tep_db_query to be used instead tep_db_input Many thanks. Link to comment Share on other sites More sharing options...
GemRock Posted April 27, 2012 Share Posted April 27, 2012 it looks like the wheel sometimes does need reinventing if it doesnt fit for a specific purpose. :) Ken commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience. Link to comment Share on other sites More sharing options...
xvoyance Posted April 27, 2012 Author Share Posted April 27, 2012 it looks like the wheel sometimes does need reinventing if it doesnt fit for a specific purpose. :) Ken Why ? Did the same problem happened before? Link to comment Share on other sites More sharing options...
GemRock Posted April 27, 2012 Share Posted April 27, 2012 nope. ken commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience. Link to comment Share on other sites More sharing options...
Stuart Posted January 18, 2013 Share Posted January 18, 2013 I did this ages ago with a bookstore site - I got a program called reader ware and a scanner - scanned all the books in and the program dragged all the images off the internet, then exported the full details of each book in a batch (in this case it was around 10,000-20,000 unique products) to excel and wrote a quick excel vba file to sort the exported file to easy populate format. I exported all the images to a folder, uploaded them all to the images directory ... I have already installed and modified an autothumb creator which worked on the fly. Then I ran easy populate and bingo the whole thing worked fine. When the client wanted to add books, all he did was scan into reader ware adding the book to that database and run a script I had written to upload everything - he did this twice a day - mostly only making changes to the database for items sold, changed etc. My advice - use easy populate and a proprietary library database - you can get them for you iPhone now and export them in delimited text - the images you already have so this is a really simple use of easy populate - all you do is copy and paste columns to the right place in a demo file which you download from your own server showing you which fields do what - its all column and line based so it would be easy to do manually for the first upload - you could do 100s of thousands of records like this in a few hours Have fun Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.