This is a discussion on Adding an image next to the name link at allprods.tpl.php within the osCMax v2 Customization/Mods forums, part of the osCMax v2.0 Forums category; hi i was trying to add an image in allprods.tpl.php listing, however what i did doesn't seem to work, what ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| hi i was trying to add an image in allprods.tpl.php listing, however what i did doesn't seem to work, what further modification I have to do, here is a what i did : THis is the original code " $products_query = tep_db_query("SELECT p.products_id, pd.products_name FROM " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd WHERE p.products_id = pd.products_id AND p.products_status = 1 AND pd.language_id = $this_language_id ORDER BY pd.products_name"); " So what i did here is simply add p.products_image to the query, so i can select the column with the images names: "$products_query = tep_db_query("SELECT p.products_id, pd.products_name, p.products_image FROM " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd WHERE p.products_id = pd.products_id AND p.products_status = 1 AND pd.language_id = $this_language_id ORDER BY pd.products_name");" The i try to add another element to the array $products_array calling it image and pointing it to products_image: " $products_array[] = array('id' => $products['products_id'], 'name' => $products['products_name'], 'image' => $products['products_image']); } " but my problems are with the echo statement as I was not able to output the result i was expecting, instead what it did was messing up with the links url adding the products_image name, like http://www.domain.com/link/allwhatever.jpg/http ... etc so as I didn't find what the code exactly does, i need some input here ... what i want is to display image --- prod modyfing the template allprods.tpl.php |
| Sponsored Links | ||
| ||
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| adding url link to external page from information box | fuzzyphil | osCommerce 2.2 Modification Help | 2 | 05-21-2005 04:55 PM |
| printable catalog link and image removal problem... | tam283 | osCMax v1.7 Discussion | 1 | 03-28-2005 03:44 PM |
| bad image link it catagories? | Anonymous | osCommerce 2.2 Modification Help | 1 | 12-01-2002 10:09 AM |
| Adding product image to category link | ramonjaime | osCommerce 2.2 Modification Help | 4 | 11-21-2002 06:34 PM |
| Manufactures Box- Image instead of text link | Anonymous | osCommerce 2.2 Modification Help | 1 | 10-18-2002 12:25 PM |