Guest Posted February 18, 2009 Share Posted February 18, 2009 Hello all who read this, I hope that someone can help me out with this. I've HIGHLY customized the OSCommerce package to develop a website that doesn't really sell anything in the traditional sense OSCommerce was made for, I use it to display information and A LOT of it. I've customized the admin/categories.php page with a lot of added fields for price displays and item information displays, and I've of course modified the product_info.php page to reflect these. My issue is that when I tried to add the ability to show multiple photos I hit a roadblock and can't figure my way out of it. I looked at probably all the multiple photo contributions and they don't really seem to point me in the right direction. I HAVE SUCCEEDED to the point where when I go to add new images they upload, they display on the preview page BUT when I go to update the product with the added image I get an error. The Error I get is: 1054 - Unknown column 'product_image_obverse' in 'field list' update products set products_quantity = '0', products_model = '', products_price_G = '1.00', products_price_VG = '7.00', products_price_F = '2.00', products_price_VF = '8.00', products_price_XF = '3.00', products_price_AU = '9.00', products_price_BU = '4.00', products_price_Proof = '10.00', products_price_CU = '5.00', products_price_CH_CU = '11.00', products_price_GEM_CU = '6.00', products_date_available = null, products_weight = '104', products_diameter = '±22 Millimeters', products_mintage_circ = '35,334', products_mintage_proof = '0', products_designer = 'Possibly Joseph Wright or Adam Eckfeldt', products_metal_content = 'Copper - 100%', products_preciousmetal_content = '', products_edge = 'Lettered (\"TWO HUNDRED FOR A DOLLAR\")', products_denomination = '1/200 or $0.005', products_production_process = '', products_coin_type = '', products_approval_date = '', products_production_facility = 'Philadelphia', products_public_law_number = '', products_congressional_number = '', products_status = '1', products_tax_class_id = '', manufacturers_id = '0', products_image = 'Bouffykins1.jpg', product_image_obverse = 'Bouffykins1.jpg', product_image_reverse = 'Bouffykins copy.png', products_last_modified = now() where products_id = '28' I'm almost certain this is a very simple issue but I can't for the life of me think of what it could be. The error just seems to be in the update process...the page continues to display fine and pull the test data for the one product just fine. Just these images are the issue. If it helps, here is a link to the product_info.php page to see the end result of the customizations so far: http://www.numismaniacs.com/product_info.php?products_id=28 Link to comment Share on other sites More sharing options...
usernamenone Posted February 18, 2009 Share Posted February 18, 2009 Try naming you images by proper names this will cause an error or not display and image Bouffykins copy.png you can not have a space in image names. try this Bouffykins_copy.png Link to comment Share on other sites More sharing options...
Guest Posted February 18, 2009 Share Posted February 18, 2009 Thanks for the reply, just tried it and got the same issue. :unsure: Link to comment Share on other sites More sharing options...
ncoded Posted February 18, 2009 Share Posted February 18, 2009 ok i am going to write this functionality soon, so when i do i will post the high level view on this. basically pre thoughts were to use a naming convention such as: ----productmodel----1.jpg ----productmodel----2.jpg and so on. essentially you need a naming convention that will never appear in a supplier code (product model). then all you would do is query that (new table), and then just loop through the array linking the images in place. havent thought about the pop-up just yet, would probably use lightbox instead (eg show the image in a layer (i guess) over the top of the site). Link to comment Share on other sites More sharing options...
Guest Posted February 19, 2009 Share Posted February 19, 2009 It doesn't seem to be an issue with image naming, even taking a space out of the name didn't help. SAME EXACT ERROR. 1054 - Unknown column 'product_image_obverse' in 'field list' It's like it's telling me there's no such database field as products_image_obverse when there most certainly is! Link to comment Share on other sites More sharing options...
usernamenone Posted February 19, 2009 Share Posted February 19, 2009 every time I see a 1054 - Unknown column it has been a php 5 version code error or mysql5 error caused by using a previous version. Link to comment Share on other sites More sharing options...
ncoded Posted February 19, 2009 Share Posted February 19, 2009 sorry lola perhpas this comment was out of place, i was just working though how i was going to implement part of this. ok back to your error, im running alot of osc's on php 5 and mysql 5, so perhaps i can help you get this solved. first things first, if i ask if you 'have done this or that' and is sounds really obvious and basic, then apologies - its difficult to know what you have done or not, as well as your skill level. -- 1. have you run you sql command via mysql (logged in, either web or console)? the reason that i say this is because normally when i get these kind of errors (see below) it normally turns out to be a typo in the sql. 2. that error msg above, where is from? is that what the browser shows? 4. the number 1054, wheres that from? is that an mysql error? it 'looks' (im guessing) the line number of the erro. 5. is your osc db a default one, or have you added new tables and or changed fields? -- ok come back to me on these and we will go to the next level Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.