Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

how to thumbnail in catalog?


kubee

Recommended Posts

Not exactly sure what you mean but there are contributions that allow you to easily have 3 different images/sizes for each product. Do a search for small medium large in the contributions area.

 

There are other great contributions and I am sure some of the better scripters could tell you other ways but I have used the contribution and love it.

 

It allows me to have a small image for the thumbnail, a medium image for the product page and a pop up... but you can use just two images say a small and large and just specify the same thing for medium and large images when entering the products. Lots of uses.

Edited by wendyjames

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

hi, this mod just can have one size thumbnail in the first page and catalog page, if i want to set one more size of catalog page how can i do ? thanks

 

thanks for reply. i means i have install the gd2 thumbnail mod, if i have catatlog "dvd" if i click into it, it will go to "product_list" page (i think, i am not sure) like the ebay top-down list. i need a different size image in this page, smaller than new_product list page. hope everyone can understand what i mean. i am not very good in programme. thanks

Link to comment
Share on other sites

Not sure if this will work or not but you could try changing

          case 'PRODUCT_LIST_IMAGE':
           $lc_align = 'center';
           if (isset($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['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['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['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a> ';
           }
           break;

to

          case 'PRODUCT_LIST_IMAGE':
           $lc_align = 'center';
           if (isset($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['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'] .  'width="whatever" height="whatever"') . '</a>';
           } else {
             $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'].  'width="whatever" height="whatever"') . '</a> ';
           }
           break;

in catalog/includes/modules/product_listing.php

Changing "whatever" to the size you want.

All I did was change

, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT

to

. 'width="whatever" height="whatever"'

 

Like I said, may not work but it's worth a shot but remember to back up your files before you try it.

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

thank you very much! i have done it, it works but i do like this way

 

 

          case 'PRODUCT_LIST_IMAGE':
           $lc_align = 'center';
           if (isset($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['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'] .  'width="whatever" height="whatever"') . '</a>';
           } else {
             $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'].  'width="whatever" height="whatever"') . '</a> ';
           }
           break;

 

to

 

case 'PRODUCT_LIST_IMAGE':
           $lc_align = 'center';
           if (isset($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['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'] .  SMALL_IMAGE_WIDTH/2, SMALL_IMAGE_HEIGHT/2"') . '</a>';
           } else {
             $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'].  SMALL_IMAGE_WIDTH/2, SMALL_IMAGE_HEIGHT/2"') . '</a> ';
           }
           break;

 

one more question, i want to remove the subcategory icon from product_new page, how to do it? i can not find the code. thanks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...