Community Add-Ons

Add file to this package
Top » Other

images in catalog listings
for osCommerce Online Merchant v2.2

I made this hak on a 2.2 feb.

I have a large database with several different versions of an item using the same name and had trouble finding the exact image I wished to edit.

here is the edit: (no files to download)

I have found that it is handy to have images in the category listing. It makes it much easier to find the correct product you seek to edit.
A very simple hak

In the file catalog/admin/Categories.php

<td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id'] . '&action=new_product_preview&read=only') . '">' . tep_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a> ' . $products['products_name']; ?></td>
<td class="dataTableContent" align="center">

Change:

DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW

To

DIR_WS_CATALOG_IMAGES . $products['products_image'] . ' " width="30" height="30"', ICON_PREVIEW

Whole section looks like:


<td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id'] . '&action=new_product_preview&read=only') . '">' . tep_image(DIR_WS_CATALOG_IMAGES . $products['products_image'] . ' " width="30" height="30"', ICON_PREVIEW) . '</a> ' . $products['products_name']; ?></td>
<td class="dataTableContent" align="center">

Legend:  Download   Report
Expand All / Collapse All
Another method Monkeybrain 8 Nov 2007  

None of the previous methods worked for me, so I came up with another method.

images in catalog alternative signsnsuch 18 Oct 2007  
images in catalog listings Tom Paul Grissom 5 Mar 2003