Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Small (very small) image in category listing


RickChase

Recommended Posts

Posted

Here's the concept... When a customer clicks on any given category, they are greeted with a list of all available products. What I'd like to do is use the product image (a very small image) to the left of the item listing.

 

Any easy way to do this?

 

Thank you!

Rick

Posted

You could edit the display and change the size of what is displayed there to .75*width .75*height etc.

 

This would not effect the display size anywhere else, just there.

Posted

Yeah, I knew that part, but what I am not sure of is how to actually call and place the image. I'll do some searching tonight and find it.

 

Thanks!

Rick

Posted

In /includes/modules/product_listings.php is this case statement:

 

          case 'PRODUCT_LIST_IMAGE':

           $lc_align = 'center';

           if ($HTTP_GET_VARS['manufacturers_id']) {

             $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing_values['products_id'], 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . $listing_values['products_image'], $listing_values['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>';

           } else {

             $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing_values['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing_values['products_image'], $listing_values['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a> ';

           }

           break;

 

If you were to edit this, you can make the display smaller for the product_listing only.

 

          case 'PRODUCT_LIST_IMAGE':

           $lc_align = 'center';

           if ($HTTP_GET_VARS['manufacturers_id']) {

             $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing_values['products_id'], 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . $listing_values['products_image'], $listing_values['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>';

           } else {

             $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing_values['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing_values['products_image'], $listing_values['products_name'], SMALL_IMAGE_WIDTH*.75, SMALL_IMAGE_HEIGHT*.75) . '</a> ';

           }

           break;

 

Using .75 or whatever size adjustment you want for the image.

Posted

I should have been more clear - sorry.

 

What I am looking for would actually be a mod to the default.php, so that when I click on a category on the left, and all the products appear on the page (default.php?cPath=21....) they would have a very small image next to them.

 

This would be kindof like the products_new.php, but the images would be way smaller (like 20x20) and there would not be all the added info (date added, manufacturer).

 

Actually, if I could just find where to replace the code on default.php with the code on products_new, then make the images smaller on both, that might be the way to go! Just thinking aloud on that one...

 

Thanks,

Rick

Posted

The default.php calls /includes/modules/products_listings.php

 

In this file is the call for the image, if you have turned it on in the Admin to display on product listings.

 

If you edit the image call to make the images .75 or .20 or what have you, they will now be smaller than the default setting in the Admin and not effect the size of the images on other areas of the program.

Posted
if you have turned it on in the Admin to display on product listings.

 

This board should have an emoticon for "kicking your self in the butt for being too stupid to figure this one out on your own", but since there isn't one, I'll use this one instead...

 

:oops:

 

(thank you)

Rick

Posted

Not a problem ... and we all over look those silly obvious things ... that is what makes this program ... umm ... interesting ... yeah that's the ticket ... interesting :shock:

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...