Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

images <alt>


1 reply to this topic

#1 interbikes

  • Community Member
  • 352 posts
  • Real Name:interbikes

Posted 27 October 2003, 00:11

Is there a way to dynamically have the images <alt> tag as the product name, price and manufacturer?

I think this would help search results right??

thanks, pete.

#2 iiinetworks

  • Community Member
  • 3,734 posts
  • Real Name:Matt

Posted 27 October 2003, 00:31

Around line 72 of product_info.php, change
    $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
to
    $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id, m.manufacturers_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.manufacturers_id=m.manufacturers_id and p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
Around line 109, change
 tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"')
to something like
 tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'] . ' for ' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . ' from ' . $product_info['manufacturers_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"')
Hth,
Matt