Guest Posted April 1, 2007 Posted April 1, 2007 This is my previous post... Keep in mind that I have over 30,000+ images and I don't have the time to put in each pic one by one... My config: osCommerce 2.2 MS2 Easy Populate 2.79d Simple Template System v4.4 Clean install, deleted all categories and products... All 90,000+ products are ready to upload in a temp directory. Images for the site are uploaded at the standard folder of /images. I got all the 30,000+ images in the /images/mimo/ subdirectory. So... I would like the support images for the site to stay the same in /images/, but would like to link the images from the products to the subdirectory /images/mimo/. Yes I have gone around and searched and they have given me some hope but most are talking about individual inputs... when I am talking about such a large amount of images, I would like to have an easier way, hopefully through programming to take care of this. Again as always, TIA Webmaster Spool Motorsports www.spoolmotorsports.com
ErollorD Posted April 1, 2007 Posted April 1, 2007 I don't get it, so you must add 90k+ products with images located in mimo/ folder??
Bushmaster Posted April 1, 2007 Posted April 1, 2007 Define the the new directory in your configure.php and then find every page that calls for product images and change it to call that directory. configure.php define('DIR_WS_IMAGES', 'images/'); add define('DIR_WS_PRODUCT_IMAGES', 'images/mimo/'); product_info.php you have your java script and product pic <script language="javascript"><!-- document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '</a>'; ?>'); //--></script> <noscript> <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '</a>'; ?> </noscript> change to: <script language="javascript"><!-- document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_PRODUCT_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '</a>'; ?>'); //--></script> <noscript> <?php echo '<a href="' . tep_href_link(DIR_WS_PRODUCT_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '</a>'; ?> </noscript> That is just one of the files you need to change. There is also product_reviews.php Products_new.php That is not all of them you will just have to search the for the call of ['products_image'] and change the directory. I can't tell you if you need a new data base table or not that will need someone more into MySql. And I do not promise this will work at all.
Jack_mcs Posted April 1, 2007 Posted April 1, 2007 This is my previous post... Keep in mind that I have over 30,000+ images and I don't have the time to put in each pic one by one... My config: osCommerce 2.2 MS2 Easy Populate 2.79d Simple Template System v4.4 Clean install, deleted all categories and products... All 90,000+ products are ready to upload in a temp directory. Images for the site are uploaded at the standard folder of /images. I got all the 30,000+ images in the /images/mimo/ subdirectory. So... I would like the support images for the site to stay the same in /images/, but would like to link the images from the products to the subdirectory /images/mimo/. Yes I have gone around and searched and they have given me some hope but most are talking about individual inputs... when I am talking about such a large amount of images, I would like to have an easier way, hopefully through programming to take care of this. Again as always, TIA Webmaster Spool Motorsports www.spoolmotorsports.com Set the path in Easy Populate to the new path and upload. With that many products it will take some time to update them all but that is to be expected. Or you could use an sql command to change all of the image locations in the products table. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
Guest Posted April 1, 2007 Posted April 1, 2007 Set the path in Easy Populate to the new path and upload. With that many products it will take some time to update them all but that is to be expected. Or you could use an sql command to change all of the image locations in the products table. Jack Thanks Jack, I hate to bother you, but could you be more specific... as I understand it Easy Populate only works on the data provided through the .cvs or .txt files. How can I change the path of the Images through Easy Populate? I am no sql magician, so I would need more input on the matter, anything you can help me with would be greatly appreciated :huh:
spax Posted April 2, 2007 Posted April 2, 2007 You don't have any products or categories on your site at present. What exactly do you want to know? Are you asking how to input 90,000 products and 30,000 images easily?
Guest Posted April 2, 2007 Posted April 2, 2007 You don't have any products or categories on your site at present. What exactly do you want to know? Are you asking how to input 90,000 products and 30,000 images easily? Spax, No I have allready tested Easy Populate for the 90,000 items, they are on standby in a temp directory on the server, that's not an issue... I have allready uploaded the images to www.spoolmotorsports.com/images/mimo/... I have not uploaded any items in case I have to use easy populate to make the items look at the subdirectory /mimo/ or if I have to change the code in the database (MySQL).... I want to upload the 90,000 items with them looking for the images in subdirectory /mimo/... It seems simpler than what it looks like in writing... Hope you can help me buddy!
spax Posted April 2, 2007 Posted April 2, 2007 So once you have uploaded the 90,000 products, you will have them all pointing to the images directory but you want them to point to images/mimo. Is that right?
Guest Posted April 2, 2007 Posted April 2, 2007 So once you have uploaded the 90,000 products, you will have them all pointing to the images directory but you want them to point to images/mimo. Is that right? Spax, You are correct my friend! But I have not uploaded them yet in case I have to change the programming of Easy Populate or my database... It would just save time instead of uploading everything and then I end up having to download them and blah blah blah... I waiting anxiously to see if we (more like you, I am too hardheaded for some of this stuff) can figure a workaround and I can upload them... Thanks for all your help: :thumbsup:
Jack_mcs Posted April 2, 2007 Posted April 2, 2007 Thanks Jack,I hate to bother you, but could you be more specific... as I understand it Easy Populate only works on the data provided through the .cvs or .txt files. How can I change the path of the Images through Easy Populate? I am no sql magician, so I would need more input on the matter, anything you can help me with would be greatly appreciated :huh: In the easy populate file there is a column for images. If the image is to be loaded in the images directory, then just put the name of the image in that column. If you want the images to be loaded from a sub-directory, say images/your_images/, then put your_images/name_of_image.gif in that file. Is that any clearer? Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
Guest Posted April 2, 2007 Posted April 2, 2007 In the easy populate file there is a column for images. If the image is to be loaded in the images directory, then just put the name of the image in that column. If you want the images to be loaded from a sub-directory, say images/your_images/, then put your_images/name_of_image.gif in that file. Is that any clearer? Jack Jack, I am following you... Right now I am using Easy Populate 2.79d that has more than the two regular files... you probably don't use EP but would it be i the easy_populate.php file? You Rule!
Jack_mcs Posted April 2, 2007 Posted April 2, 2007 I'm sorry, that was poorly worded. I meant to say in the spreadsheet file that easy populate uses. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
spax Posted April 2, 2007 Posted April 2, 2007 Spax, You are correct my friend! But I have not uploaded them yet in case I have to change the programming of Easy Populate or my database... It would just save time instead of uploading everything and then I end up having to download them and blah blah blah... I waiting anxiously to see if we (more like you, I am too hardheaded for some of this stuff) can figure a workaround and I can upload them... Thanks for all your help: :thumbsup: Sorry I didn't get back to you. I waited for a while but it was well late and I needed my bed. Anyhoo, if you are sorted now all is good but, if you are struggling with EP, I think I have engineered another way to do it. Let me know!
Guest Posted April 2, 2007 Posted April 2, 2007 Sorry I didn't get back to you. I waited for a while but it was well late and I needed my bed. Anyhoo, if you are sorted now all is good but, if you are struggling with EP, I think I have engineered another way to do it. Let me know! Bring it on Brother, I need talented individuals like yourself to help! :thumbsup: I am to learn from the Masters
spax Posted April 2, 2007 Posted April 2, 2007 Well that was quicker than last night. :blink: Ok, do you have phpmyadmin and a good text editor with a search and replace function?
Guest Posted April 2, 2007 Posted April 2, 2007 Well that was quicker than last night. :blink: Ok, do you have phpmyadmin and a good text editor with a search and replace function? Yes I have phpMyAdmin and I have Dreamweaver 8 that has search and replace
spax Posted April 2, 2007 Posted April 2, 2007 Ok, stay with me. This is going to take a little while to type! :'(
Guest Posted April 2, 2007 Posted April 2, 2007 Ok, stay with me. This is going to take a little while to type! :'( I work at home borther man, I will be anxiously awaiting your response! :lol: U should really see if this can be a Contribution because of all the searching I did alot of people had the same problem, and where looking for this answer. Just saying... :-"
spax Posted April 2, 2007 Posted April 2, 2007 If this works, I reckon on it taking about 15 minutes. Just to be certain, once you have uploaded your products, you will have a fully populated osC database, albeit with the images not addressed as you want. Is that correct? If so, go ahead and upload. The problem with re-naming the paths en block, is that in the db, all you will see is the image name. If the db info was images/your_image.jpg then a search and replace would be very easy or even a query to change them. If there is a query to change them how they are now, I can't work it out so this is a work around. Once you have uploaded, go into your osC admin AND MAKE A DATABASE BACKUP Have you backed up? Good, now go into phpmyadmin and select your db. In the left column, select "products". Look at the fields that show in the main page and see which one is directly above "products_image" Unless you have modified it, it should be "products_model" That being so, click on the SQL tab, top of the screen and in the text area that you see, paste this: ALTER TABLE `products` ADD `erik` DATE NOT NULL AFTER `products_model`; If the field before "products_image" is something other than "products_model", substitute that in the above query. What we have done there is added an almost empty field to act as an anchor for later. Now go back to the "products" table and click the "Export" tab, top of the screen. On the following page, you will see various save options. In the left column, select the SQL radio button. In the right column "Structure" options, check the "Add DROP TABLE" checkbox. At the bottom left, check the "Save as file" checkbox and hit the "Go" button. Save it to where you want. Now you have a backup of the "products" table. Open it up in Dreamweaver and you will see an INSERT query plus a looooooooong list of your products. The first couple of lines looks something like: INSERT INTO `products` (`products_id`, `products_quantity`, `products_model`, `erik`, `products_image`, `products_price`, `products_date_added`, `products_last_modified`, `products_date_available`, `products_weight`, `products_status`, `products_tax_class_id`, `manufacturers_id`, `products_ordered`) VALUES (1, 32, 'MG200MMS', '0000-00-00', 'mg200mms.gif', 299.9900, '2007-03-30 20:12:53', NULL, NULL, 23.00, 1, 1, 1, 0), If you notice in the INSERT query, you will see your new field "erik" and before the image name, you will see a zero date value '0000-00-00' Now if you are still with me, use the search and replace function to find: '0000-00-00', ' and replace with: '0000-00-00', 'mimo/ That is the reason for the anchor as all your image names will be unique but with the anchor, you can use it to search with the comma and the opening apostrophe to the image name. But it is important you replace all of it plus the name of your directory "mimo/" If the Dreamweaver facility has a "Replace All" function to its search and replace and it should have, it will be done in seconds. Once you have done that, save the file and either "Import" it back into your database via the SQL tab or Copy and Paste it back into the SQL text area that you ran the ALTER query from before, again via the SQL tab. If it worked, all your images will now have mimo/ appended to them..........hopefully! :-" All that's left to do now is, go back to your "products" table and "Drop" the "erik" field. Remember, this is all based on your db being populated with products/images but the image paths not being as you require. If that is not the case, this wont work. Not as I have explained at least. Only do this if you are comfortable with what I have said. If you are scratching your head right now, don't try it! If you are going to do this, have a look around phpmyadmin first so you are familiar with it.
Guest Posted April 2, 2007 Posted April 2, 2007 If this works, I reckon on it taking about 15 minutes. Just to be certain, once you have uploaded your products, you will have a fully populated osC database, albeit with the images not addressed as you want. Is that correct? If so, go ahead and upload. The problem with re-naming the paths en block, is that in the db, all you will see is the image name. If the db info was images/your_image.jpg then a search and replace would be very easy or even a query to change them. If there is a query to change them how they are now, I can't work it out so this is a work around. Once you have uploaded, go into your osC admin AND MAKE A DATABASE BACKUP Have you backed up? Good, now go into phpmyadmin and select your db. In the left column, select "products". Look at the fields that show in the main page and see which one is directly above "products_image" Unless you have modified it, it should be "products_model" That being so, click on the SQL tab, top of the screen and in the text area that you see, paste this: ALTER TABLE `products` ADD `erik` DATE NOT NULL AFTER `products_model`; If the field before "products_image" is something other than "products_model", substitute that in the above query. What we have done there is added an almost empty field to act as an anchor for later. Now go back to the "products" table and click the "Export" tab, top of the screen. On the following page, you will see various save options. In the left column, select the SQL radio button. In the right column "Structure" options, check the "Add DROP TABLE" checkbox. At the bottom left, check the "Save as file" checkbox and hit the "Go" button. Save it to where you want. Now you have a backup of the "products" table. Open it up in Dreamweaver and you will see an INSERT query plus a looooooooong list of your products. The first couple of lines looks something like: INSERT INTO `products` (`products_id`, `products_quantity`, `products_model`, `erik`, `products_image`, `products_price`, `products_date_added`, `products_last_modified`, `products_date_available`, `products_weight`, `products_status`, `products_tax_class_id`, `manufacturers_id`, `products_ordered`) VALUES (1, 32, 'MG200MMS', '0000-00-00', 'mg200mms.gif', 299.9900, '2007-03-30 20:12:53', NULL, NULL, 23.00, 1, 1, 1, 0), If you notice in the INSERT query, you will see your new field "erik" and before the image name, you will see a zero date value '0000-00-00' Now if you are still with me, use the search and replace function to find: '0000-00-00', ' and replace with: '0000-00-00', 'mimo/ That is the reason for the anchor as all your image names will be unique but with the anchor, you can use it to search with the comma and the opening apostrophe to the image name. But it is important you replace all of it plus the name of your directory "mimo/" If the Dreamweaver facility has a "Replace All" function to its search and replace and it should have, it will be done in seconds. Once you have done that, save the file and either "Import" it back into your database via the SQL tab or Copy and Paste it back into the SQL text area that you ran the ALTER query from before, again via the SQL tab. If it worked, all your images will now have mimo/ appended to them..........hopefully! :-" All that's left to do now is, go back to your "products" table and "Drop" the "erik" field. Remember, this is all based on your db being populated with products/images but the image paths not being as you require. If that is not the case, this wont work. Not as I have explained at least. Only do this if you are comfortable with what I have said. If you are scratching your head right now, don't try it! If you are going to do this, have a look around phpmyadmin first so you are familiar with it. Ok give me a bit and I will let you know how it goes, I am still uploading files to the db and then I have to orient myself with phpMyAdmin... I will either post success or defeat! B)
Guest Posted April 2, 2007 Posted April 2, 2007 Ok give me a bit and I will let you know how it goes, I am still uploading files to the db and then I have to orient myself with phpMyAdmin... I will either post success or defeat! B) Again good stuff... Question: my wholeseller is missing some images from the website, if I add some more images, update the db and run this query, will it add another subdirectory to the allready established ones? That is to say that if I have run that query allready and it has the /mimo/whatever.jpg, will it add another (ie, /mimo/mimo/whatever.jpg). Thanks for all your hard work, brother man...
spax Posted April 3, 2007 Posted April 3, 2007 Yeah it will do but you only need to isolate the ones that don't already have mimo/ and put them in a seperate file i.e. When you download the products table backup again you will have: DROP TABLE IF EXISTS `products`; CREATE TABLE `products` ( `products_id` int(11) NOT NULL auto_increment, `products_quantity` int(4) NOT NULL, `products_model` varchar(12) default NULL, `erik` date NOT NULL, `products_image` varchar(64) default NULL, `products_price` decimal(15,4) NOT NULL, `products_date_added` datetime NOT NULL, `products_last_modified` datetime default NULL, `products_date_available` datetime default NULL, `products_featured_until` date default NULL, `products_weight` decimal(5,2) NOT NULL, `products_status` tinyint(1) NOT NULL, `products_featured` tinyint(1) default '0', `products_tax_class_id` int(11) NOT NULL, `manufacturers_id` int(11) default NULL, `products_ordered` int(11) NOT NULL default '0', PRIMARY KEY (`products_id`), KEY `idx_products_date_added` (`products_date_added`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=28; INSERT INTO `products` (`products_id`, `products_quantity`, `products_model`, `erik`, `products_image`, `products_price`, `products_date_added`, `products_last_modified`, `products_date_available`, `products_weight`, `products_status`, `products_tax_class_id`, `manufacturers_id`, `products_ordered`) VALUES (1, 32, 'MG200MMS', '0000-00-00', 'mimo/mg200mms.gif', 299.9900, '2007-03-30 20:12:53', NULL, NULL, 23.00, 1, 1, 1, 0), (2, 32, 'AB200AAS', '0000-00-00', 'mimo/ab200aas.gif', 299.9900, '2007-03-30 20:12:53', NULL, NULL, 23.00, 1, 1, 1, 0), (3, 32, 'CD200CCS', '0000-00-00', 'mimo/cd200ccs.gif', 299.9900, '2007-03-30 20:12:53', NULL, NULL, 23.00, 1, 1, 1, 0), (4, 32, 'EF200EES', '0000-00-00', 'mimo/ef200ees.gif', 299.9900, '2007-03-30 20:12:53', NULL, NULL, 23.00, 1, 1, 1, 0), * * * (1000, 32, 'UV200UUS', '0000-00-00', 'uv200uus.gif', 299.9900, '2007-03-30 20:12:53', NULL, NULL, 23.00, 1, 1, 1, 0), (1001, 32, 'WX200WWS', '0000-00-00', 'wx200wws.gif', 299.9900, '2007-03-30 20:12:53', NULL, NULL, 23.00, 1, 1, 1, 0), (1002, 32, 'YZ200YYS', '0000-00-00', 'yz200yys.gif', 299.9900, '2007-03-30 20:12:53', NULL, NULL, 23.00, 1, 1, 1, 0), Just copy the ones that need changing into a blank file, do the search and replace, then copy them back again into the backup. So from the above example, you would copy these from the products backup: (1000, 32, 'UV200UUS', '0000-00-00', 'uv200uus.gif', 299.9900, '2007-03-30 20:12:53', NULL, NULL, 23.00, 1, 1, 1, 0), (1001, 32, 'WX200WWS', '0000-00-00', 'wx200wws.gif', 299.9900, '2007-03-30 20:12:53', NULL, NULL, 23.00, 1, 1, 1, 0), (1002, 32, 'YZ200YYS', '0000-00-00', 'yz200yys.gif', 299.9900, '2007-03-30 20:12:53', NULL, NULL, 23.00, 1, 1, 1, 0), Make the changes, then copy them back into the backup. Then your backup would look like this: DROP TABLE IF EXISTS `products`; CREATE TABLE `products` ( `products_id` int(11) NOT NULL auto_increment, `products_quantity` int(4) NOT NULL, `products_model` varchar(12) default NULL, `erik` date NOT NULL, `products_image` varchar(64) default NULL, `products_price` decimal(15,4) NOT NULL, `products_date_added` datetime NOT NULL, `products_last_modified` datetime default NULL, `products_date_available` datetime default NULL, `products_featured_until` date default NULL, `products_weight` decimal(5,2) NOT NULL, `products_status` tinyint(1) NOT NULL, `products_featured` tinyint(1) default '0', `products_tax_class_id` int(11) NOT NULL, `manufacturers_id` int(11) default NULL, `products_ordered` int(11) NOT NULL default '0', PRIMARY KEY (`products_id`), KEY `idx_products_date_added` (`products_date_added`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=28; INSERT INTO `products` (`products_id`, `products_quantity`, `products_model`, `erik`, `products_image`, `products_price`, `products_date_added`, `products_last_modified`, `products_date_available`, `products_weight`, `products_status`, `products_tax_class_id`, `manufacturers_id`, `products_ordered`) VALUES (1, 32, 'MG200MMS', '0000-00-00', 'mimo/mg200mms.gif', 299.9900, '2007-03-30 20:12:53', NULL, NULL, 23.00, 1, 1, 1, 0), (2, 32, 'AB200AAS', '0000-00-00', 'mimo/ab200aas.gif', 299.9900, '2007-03-30 20:12:53', NULL, NULL, 23.00, 1, 1, 1, 0), (3, 32, 'CD200CCS', '0000-00-00', 'mimo/cd200ccs.gif', 299.9900, '2007-03-30 20:12:53', NULL, NULL, 23.00, 1, 1, 1, 0), (4, 32, 'EF200EES', '0000-00-00', 'mimo/ef200ees.gif', 299.9900, '2007-03-30 20:12:53', NULL, NULL, 23.00, 1, 1, 1, 0), * * * (1000, 32, 'UV200UUS', '0000-00-00', 'mimo/uv200uus.gif', 299.9900, '2007-03-30 20:12:53', NULL, NULL, 23.00, 1, 1, 1, 0), (1001, 32, 'WX200WWS', '0000-00-00', 'mimo/wx200wws.gif', 299.9900, '2007-03-30 20:12:53', NULL, NULL, 23.00, 1, 1, 1, 0), (1002, 32, 'YZ200YYS', '0000-00-00', 'mimo/yz200yys.gif', 299.9900, '2007-03-30 20:12:53', NULL, NULL, 23.00, 1, 1, 1, 0), Then do as before. You need all of the products because that query DROPs the products table before it CREATEs it again. If you only have half of the products, only half will go in. Or, you could do as before from the start so you will have a lot of images as mimo/mimo/image.jpg then search and replace mimo/mimo/ with mimo/ :huh: This beast is getting out of control. :blink:
Guest Posted April 3, 2007 Posted April 3, 2007 Yeah it will do but you only need to isolate the ones that don't already have mimo/ and put them in a seperate file i.e. When you download the products table backup again you will have: DROP TABLE IF EXISTS `products`; CREATE TABLE `products` ( `products_id` int(11) NOT NULL auto_increment, `products_quantity` int(4) NOT NULL, `products_model` varchar(12) default NULL, `erik` date NOT NULL, `products_image` varchar(64) default NULL, `products_price` decimal(15,4) NOT NULL, `products_date_added` datetime NOT NULL, `products_last_modified` datetime default NULL, `products_date_available` datetime default NULL, `products_featured_until` date default NULL, `products_weight` decimal(5,2) NOT NULL, `products_status` tinyint(1) NOT NULL, `products_featured` tinyint(1) default '0', `products_tax_class_id` int(11) NOT NULL, `manufacturers_id` int(11) default NULL, `products_ordered` int(11) NOT NULL default '0', PRIMARY KEY (`products_id`), KEY `idx_products_date_added` (`products_date_added`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=28; INSERT INTO `products` (`products_id`, `products_quantity`, `products_model`, `erik`, `products_image`, `products_price`, `products_date_added`, `products_last_modified`, `products_date_available`, `products_weight`, `products_status`, `products_tax_class_id`, `manufacturers_id`, `products_ordered`) VALUES (1, 32, 'MG200MMS', '0000-00-00', 'mimo/mg200mms.gif', 299.9900, '2007-03-30 20:12:53', NULL, NULL, 23.00, 1, 1, 1, 0), (2, 32, 'AB200AAS', '0000-00-00', 'mimo/ab200aas.gif', 299.9900, '2007-03-30 20:12:53', NULL, NULL, 23.00, 1, 1, 1, 0), (3, 32, 'CD200CCS', '0000-00-00', 'mimo/cd200ccs.gif', 299.9900, '2007-03-30 20:12:53', NULL, NULL, 23.00, 1, 1, 1, 0), (4, 32, 'EF200EES', '0000-00-00', 'mimo/ef200ees.gif', 299.9900, '2007-03-30 20:12:53', NULL, NULL, 23.00, 1, 1, 1, 0), * * * (1000, 32, 'UV200UUS', '0000-00-00', 'uv200uus.gif', 299.9900, '2007-03-30 20:12:53', NULL, NULL, 23.00, 1, 1, 1, 0), (1001, 32, 'WX200WWS', '0000-00-00', 'wx200wws.gif', 299.9900, '2007-03-30 20:12:53', NULL, NULL, 23.00, 1, 1, 1, 0), (1002, 32, 'YZ200YYS', '0000-00-00', 'yz200yys.gif', 299.9900, '2007-03-30 20:12:53', NULL, NULL, 23.00, 1, 1, 1, 0), Just copy the ones that need changing into a blank file, do the search and replace, then copy them back again into the backup. So from the above example, you would copy these from the products backup: (1000, 32, 'UV200UUS', '0000-00-00', 'uv200uus.gif', 299.9900, '2007-03-30 20:12:53', NULL, NULL, 23.00, 1, 1, 1, 0), (1001, 32, 'WX200WWS', '0000-00-00', 'wx200wws.gif', 299.9900, '2007-03-30 20:12:53', NULL, NULL, 23.00, 1, 1, 1, 0), (1002, 32, 'YZ200YYS', '0000-00-00', 'yz200yys.gif', 299.9900, '2007-03-30 20:12:53', NULL, NULL, 23.00, 1, 1, 1, 0), Make the changes, then copy them back into the backup. Then your backup would look like this: DROP TABLE IF EXISTS `products`; CREATE TABLE `products` ( `products_id` int(11) NOT NULL auto_increment, `products_quantity` int(4) NOT NULL, `products_model` varchar(12) default NULL, `erik` date NOT NULL, `products_image` varchar(64) default NULL, `products_price` decimal(15,4) NOT NULL, `products_date_added` datetime NOT NULL, `products_last_modified` datetime default NULL, `products_date_available` datetime default NULL, `products_featured_until` date default NULL, `products_weight` decimal(5,2) NOT NULL, `products_status` tinyint(1) NOT NULL, `products_featured` tinyint(1) default '0', `products_tax_class_id` int(11) NOT NULL, `manufacturers_id` int(11) default NULL, `products_ordered` int(11) NOT NULL default '0', PRIMARY KEY (`products_id`), KEY `idx_products_date_added` (`products_date_added`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=28; INSERT INTO `products` (`products_id`, `products_quantity`, `products_model`, `erik`, `products_image`, `products_price`, `products_date_added`, `products_last_modified`, `products_date_available`, `products_weight`, `products_status`, `products_tax_class_id`, `manufacturers_id`, `products_ordered`) VALUES (1, 32, 'MG200MMS', '0000-00-00', 'mimo/mg200mms.gif', 299.9900, '2007-03-30 20:12:53', NULL, NULL, 23.00, 1, 1, 1, 0), (2, 32, 'AB200AAS', '0000-00-00', 'mimo/ab200aas.gif', 299.9900, '2007-03-30 20:12:53', NULL, NULL, 23.00, 1, 1, 1, 0), (3, 32, 'CD200CCS', '0000-00-00', 'mimo/cd200ccs.gif', 299.9900, '2007-03-30 20:12:53', NULL, NULL, 23.00, 1, 1, 1, 0), (4, 32, 'EF200EES', '0000-00-00', 'mimo/ef200ees.gif', 299.9900, '2007-03-30 20:12:53', NULL, NULL, 23.00, 1, 1, 1, 0), * * * (1000, 32, 'UV200UUS', '0000-00-00', 'mimo/uv200uus.gif', 299.9900, '2007-03-30 20:12:53', NULL, NULL, 23.00, 1, 1, 1, 0), (1001, 32, 'WX200WWS', '0000-00-00', 'mimo/wx200wws.gif', 299.9900, '2007-03-30 20:12:53', NULL, NULL, 23.00, 1, 1, 1, 0), (1002, 32, 'YZ200YYS', '0000-00-00', 'mimo/yz200yys.gif', 299.9900, '2007-03-30 20:12:53', NULL, NULL, 23.00, 1, 1, 1, 0), Then do as before. You need all of the products because that query DROPs the products table before it CREATEs it again. If you only have half of the products, only half will go in. Or, you could do as before from the start so you will have a lot of images as mimo/mimo/image.jpg then search and replace mimo/mimo/ with mimo/ :huh: This beast is getting out of control. :blink: This is what i am going to do in the mean time, I changed the configure.php image directory to images/mimo/ that fixes in the mean time except all the standard ones will get screwed, in the mean time I can make sure that all the images are correct and nothing is screwed up... then undo that, and go with the incredible job you have done for me, if I had any money I would give you some.... Let's call this horse dead and see if it works out... I will call up on you after I try this out. Again, thanks for all your help, you will hear from me soon... you should make it into a contribution, alot of ppl would love ya!
MagickWomyn Posted April 3, 2007 Posted April 3, 2007 I just used my easy populate spreadsheet and edited the v_products_image field. Seems to work just fine and it's easy to change. I did this ---- subdirectory/productpicture.jpg
Recommended Posts
Archived
This topic is now archived and is closed to further replies.