Aamir Posted December 30, 2005 Share Posted December 30, 2005 Hi I would be grateful for any help with this problem. Originally my site used the same image when browsing in the catergories and on the product page. i.e. both index.php and product_info.php both took their images from the products.products_image. I then decided to create thumb nail images for all my products which I uploaded to /images folder. I also then created a new field in the products table called products_image_thumb. I populated the field with the name of the images eg logo_thumb.jpg. On the index.php I change the following code: for ($i=0, $n=sizeof($column_list); $i<$n; $i++) { switch ($column_list[$i]) { etc. case 'PRODUCT_LIST_IMAGE': $select_column_list .= 'p.products_image_thumb, '; // was originally p.products_image etc. break; } When I now go browse through the catergories (index.php) no images appear. When I look at the link it shows my website/images there is no mention of the filename. Any ideas where I have gone wrong? Many thanks in advance. Aamir Link to comment Share on other sites More sharing options...
tina_boots Posted December 30, 2005 Share Posted December 30, 2005 Hi I would be grateful for any help with this problem. Originally my site used the same image when browsing in the catergories and on the product page. i.e. both index.php and product_info.php both took their images from the products.products_image. I then decided to create thumb nail images for all my products which I uploaded to /images folder. I also then created a new field in the products table called products_image_thumb. I populated the field with the name of the images eg logo_thumb.jpg. On the index.php I change the following code: for ($i=0, $n=sizeof($column_list); $i<$n; $i++) { switch ($column_list[$i]) { etc. case 'PRODUCT_LIST_IMAGE': $select_column_list .= 'p.products_image_thumb, '; // was originally p.products_image etc. break; } When I now go browse through the catergories (index.php) no images appear. When I look at the link it shows my website/images there is no mention of the filename. Any ideas where I have gone wrong? Many thanks in advance. Aamir In your SQL query did you include p.producs_image_thumb in your select statement? Be well, Tina If you're not having fun you're not doing it right Teach a person to fish rather than give them a loaf of bread or however that saying goes. Link to comment Share on other sites More sharing options...
Aamir Posted December 30, 2005 Author Share Posted December 30, 2005 In your SQL query did you include p.producs_image_thumb in your select statement? Be well, Tina Tina I think you are right, I didn't change the SQL query. Only problem, I cannot seem to find a reference in index.php for an SQL query to retrive the image (p.products_image). I would be most grateful for any more help. Aamir Link to comment Share on other sites More sharing options...
tina_boots Posted December 30, 2005 Share Posted December 30, 2005 Tina I think you are right, I didn't change the SQL query. Only problem, I cannot seem to find a reference in index.php for an SQL query to retrive the image (p.products_image). I would be most grateful for any more help. Aamir Take a look at the code beginning around line 81. There are a couple of different SQL statements being generated that depending on IF/ELSE conditions, so you'll likely have to make the changes in a couple of places. Also that's just a quick glance, check the rest of the file to ensure that you have all conditions covered. Be well, Tina If you're not having fun you're not doing it right Teach a person to fish rather than give them a loaf of bread or however that saying goes. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.