osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

Adding an image next to the name link at allprods.tpl.php

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 ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Customization/Mods

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 07-19-2005, 04:08 AM
osCMax Testing Team
 
Join Date: Oct 2003
Posts: 52
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
icecold
Default Adding an image next to the name link at allprods.tpl.php

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -8. The time now is 12:23 AM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax