julianpuje Posted September 23, 2005 Posted September 23, 2005 I want (have) to create a box for the upcoming products module that also shows the product image along with the name and date expected. I've modified the following line in the module that should work once i've established how to call the image from the database. I need to define the $expected field for the product_image to show: <td class="smallText"> <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $expected['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $expected['products_image'], $expected['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a> </td>' . "\n" . Does anybody know what or where i edit the database so product_image is in the $expected fields????? along with the already there product_name. I think that makes sense anyway. :'( Any help appreciated. TIA Julian A little knowledge is dangerous, I SHOULD KNOW. If Life Begins At 40, What ends????
Guest Posted September 23, 2005 Posted September 23, 2005 should be an sql query that sets up the $expected (I guess from an $expected_query variable) Have you done that part of the code? like this: $expected_query = tep_db_query("select p.products_id, ............) while($expected = tep_db_fetch_array($expected_query) { // output code here }
julianpuje Posted September 23, 2005 Author Posted September 23, 2005 Thanks for the reply, i have changed the bit you mention and tweaked a few other things and have now managed to get the image boxes there. If i right click on the X where the image should be and select properties the address for the image is correct but the image name is wrong. It's the correct image name but with %20 thrown in there a couple of times. Not too sure where this is coming from. I have image cache installed and have tried the image to come from there instead, but it ends up the same with the %20 again. Any ideas? The site i'm working on is HERE. Any help/advice appreciated. Thanks Julian A little knowledge is dangerous, I SHOULD KNOW. If Life Begins At 40, What ends????
Guest Posted September 23, 2005 Posted September 23, 2005 Seem the path is ok but the image name itself has a problem? Have you checked your dbase how the image names are stored? Or try with a test image just make one called test.jpg see how that goes.
julianpuje Posted September 23, 2005 Author Posted September 23, 2005 just added a test product with test image called test.jpg and it has changed the image name again with a %20 in there???? and the product name, i think thats where the problem is. It's calling the image the products name instead of the image name. Test%20Product The product is called "test product" and the image is called "test.jpg" If that makes sense. I will have to have another play with the code, unless somebody can see whats wrong. Cheers again Julian A little knowledge is dangerous, I SHOULD KNOW. If Life Begins At 40, What ends????
julianpuje Posted September 23, 2005 Author Posted September 23, 2005 Finally found it :thumbsup: , with all the changes i had made to find the problem, i added one by changing the $expected['products_image'] to $expected['products_name'] Thanks for your help, got there in the end. Got to try and get it into 3 columns now :'( ? cheers Julian A little knowledge is dangerous, I SHOULD KNOW. If Life Begins At 40, What ends????
Guest Posted September 23, 2005 Posted September 23, 2005 I thought of that but when I checked the code you posted you had the image name correctly appended so I thought must be something else.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.