jerseyjoe Posted March 17, 2006 Share Posted March 17, 2006 I need a knowledgeable CCer to hand-hold and guide me through editing the CC data base. The problem is, as discussed in another thread, I did a direct batch-delete of images from the upload folder through FTP. But, since they are listed in the db, that leaves them listed in the CC Image Manager. I now need to edit them out in the db itself before the Image Manager will delist them. Thank you "groovejuice" for diagnosing that issue in another thread. Although I have PHPAdmin on my server, I know so little about MySql and know so little about how to manage it that I have to treat it as if it were a live hand grenade with the pin pulled. I could do an awful lot of damage in a few seconds. I've gone as far as opening the PHPadmin and looking at the interface. I then closed it with a shuddder of relief that I did not destroy it. I'm not alone in this. At least one other user posted the same problem and I've seen similar issues where a step-by-step, "Editing MySql in PHPadmin for Dimmies" tutorial posted here would be a huge help. In fact, I'll write and post (with proper credit, of course) if it someone can take me through it, off forum, step-by-step either in PM or direct email. Anyone? Quote Link to comment Share on other sites More sharing options...
Guest hennaboy Posted March 17, 2006 Share Posted March 17, 2006 Login to phpmyadmin go to your cubecart_inventory table there is all your products are listed and with that the image name assigned to the product click on the pencil icon for each product and then delete the image name save and it will delete any reference to the image for that product Quote Link to comment Share on other sites More sharing options...
jerseyjoe Posted March 17, 2006 Author Share Posted March 17, 2006 Login to phpmyadmin go to your cubecart_inventory table there is all your products are listed and with that the image name assigned to the product click on the pencil icon for each product and then delete the image name save and it will delete any reference to the image for that product Thanks for the fast reply. If you have the patience and time to go into more detail, I still need guidance. I am actually stupid but compliant when given highly detailed instructions. I'm very much like a computer, the original obedient idiot, in that way. I opened PHPmyadmin. I chose the table CubeCart_inventory. So far, so good. But I'm not seeing a list of products. I'm seeing an interface with a row of buttons across the top saying: Browse Structure SQL Search Insert Export Operations Empty "Structure" is already chosen and I'm looking at a spreadsheet-like display of rows and colums. The column heads are labeled: (boxes) Field Type Attributes Null Default Extra Action But I do not see a list of products. If I click on the buttton "Browse" I don't see a list of products there either however I do see what may be a list of images. May I assume you meant that I would see a list of images, not a list of products? However, I have learned never to assume anything. Is this the page I should be on? If so, exactly (step by step) what do I do next? What will I see after I do that? What next? etc. I can tell you that if I click on the pencil in the first column, the selected button in the top row changes to "Insert" and I get an even more intimidating and complex screen of feilds. If somewhere in all those dozens of fields there is one labeled "delete image" or something like that, I do not see it. At that point, I use the back button again and again until the pin is re-installed in the grenade. May I ask for more detail, step by step, please? Quote Link to comment Share on other sites More sharing options...
Guest hennaboy Posted March 17, 2006 Share Posted March 17, 2006 Ok Login to PHPMyadmin Choose your Cubecart DB There will be a list of tables in the database that will appear on the left. Click on cubecart_inventory This will then load in the right frame You should now see a list of fields starting with productid The 5th one down is the one you want called image click the checkbox and then click on the browse tab at the top of the page The next page will now load and you will see a new list with productid, productcode, quantity, description, image and so on... Now for every product listed there is an image name specified so this is what needs to be changed. Each product has a checkbox and then a pencil icon which when you hover your mouse cursor over will say edit. Click on this icon. The next page will load. And there is a list - field, type, function, Null, Value. On this list you need to change the Value for image. This is the 5th one down. Simply delete all the text in the value section and then scroll down to the bottom of the page. At the bottom it should say Save and go back to previous page in the drop down boxes. Leave them as they are and click on Go This will save the changes and return you back a page so you can change the next product. Carry on until you have changed all the product images. Quote Link to comment Share on other sites More sharing options...
jerseyjoe Posted March 18, 2006 Author Share Posted March 18, 2006 First of all, thank you for the detailed instructions. That's exactly the kind of response I asked for. Unfortunately, I may have asked for the wrong question - or not been very clear about the issue - because after having had no problem carrying out your lucid advice, I still have the situiation that launched the question. Here's how I followed your instructions and the results . . . I focused on some specific products where the image had been bulk-deleted using FTP but still ghosts, undeletable, in the CC Image Manager. I went step by step, just as you described and removed the image value just as you suggested for each of 1/2 dozen items. Then I went back to the CC Image Manager, refreshed, and the images are still listed there and when I try to delete them, I still get an error message. Further, there are many images - listed in the Image Manager - for which the product itself was long ago deleted - yet the image related to it, after bulk removal (ftp), is still listed in the Image Manager. Yet those do not appear at all in the _inventory table - and why should they? If I understand what I accomplished using the process you described, all I did was remove the relationship betweensome existing products and an image. It did not remove the image from the Image Manager. The steps I went through have nothing to do with the Image Manager listings. So, if simple logic applies, I should not be editing the _inventory table, I should be editing some place in the data base where the images are listed. Any idea where that is? Thanks again for your help. I just need to go further if you have the patience for me. Does that make sense, or am I missing something? Quote Link to comment Share on other sites More sharing options...
Guest hennaboy Posted March 18, 2006 Share Posted March 18, 2006 As far as i can tell the file prodimages.php queries the database in two places cubecart_img_idx and cubecart_inventory Now with my cart the only table that has any image records as far as i can tell is the cubecart_inventory table and the cubecart_img_idx has no records If you also look at the filemanager index.php it calls on cubecart_inventory table to get a list of the images. I did assume without testing that removing the image name in the cubecart_inventory would remove the image listed on the filemanager however it does not. At the moment im not sure where else to look....sorry Quote Link to comment Share on other sites More sharing options...
jerseyjoe Posted March 18, 2006 Author Share Posted March 18, 2006 Well, I know at least a few more things that don't work either, so I've narrowed the possibilities. Given a stable universe where God does not play jokes and nothing is truly random, I'm gessing there are only somewhere above 3 googleplex cubed possibilities that remain to try. Here's what does not work: I figured maybe I could undo the damage done when I batch-deleted the images. So I FTPd them back. That does nothing but put the images back on the server. The CC Image Manager still declines to remove them. So I removed them again and returned to the Image Manager "Upload Images" system and tried restore one of the deleted images. IM dutifully responds that it can't (won't?) upload that image because it already exists. FWIW - trying to use IM to delete an image returns the following error message: "Warning: unlink(/home/STORENAME/public_html/store/images/uploads/_vti_cnf/weddingdress_350_5300C.jpg): Permission denied in /home/STORENAME/public_html/store/admin/filemanager/index.php on line 109" Line 109 doesn't speak to me but perhaps someone else knows what it is bleating about and how to stuff a sock in it . . . $query = "SELECT doc_id FROM ".$glob['dbprefix']."CubeCart_docs WHERE doc_content LIKE '%".$imageName."%'"; What that has to do with images that don't exist is totally lost on me. Add to the list of other things that does not work is to take a clue from "permission denied" and CHMODing all those folders to 777. After doing that, trying again to delete an image returns the same error. ANYONE? Quote Link to comment Share on other sites More sharing options...
Guest hennaboy Posted March 18, 2006 Share Posted March 18, 2006 Tried to recreate this on my own installation. Deleted an image by ftp then went to the admin filemanager. The image is still listed. So i tried to delete it there. It says Delete failed - however the image name was removed from the filemanager! Uploaded an image by ftp, refreshed the filemanager and the image was listed. Deleted by ftp and refreshed and the image name was removed. I also downloaded a different image, changed the filename and re-uploaded. Refreshed the filemanager and the new image was listed. So with this i concluded that the images are not stored in the database at all. The cubecart_inventory is where the images are assigned to the product. All that is occuring is that the list of images is being compiled from the uploads directory. What could be occuring is this. The image name is still assigned to a product or category in the database. In which case you will need to remove all reference to them. Again look in cubecart_inventory and cubecart_categories. This may be why you are not able to upload as according to the database xxx image is assigned to a product or cat and therefore still exists. Not 100% that will be the solution....but it may help! Quote Link to comment Share on other sites More sharing options...
Guest Posted March 18, 2006 Share Posted March 18, 2006 Joe, I just read through the browse.php file in the filemanager. It doesn't look into the database at all. I'm wondering if perhaps you deleted the images from the wrong spot via FTP? I couldn't know for sure without logging in to your store and looking but this is the only way I can think of after reviewing the code. Perhaps you deleted the thumb only and not the actual image? I dunno. Just trying to help. ;) Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted March 20, 2006 Share Posted March 20, 2006 CubeCart doesn't store the images names in the databse at all. It only stores the name of the master image associated with each product and then a lookup table which assigns multiple images to each product. You'll need to follow the advice already given here concerning the removal of the image name from each product using phpMyAdmin and then remove the image names missing from the lookup table `CubeCart_img_idx`. The instruction given for using phpMyAdmin here are very good so I can't add anything to that really. Best of luck. 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.