Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help with changes required!


mark27uk3

Recommended Posts

Hi Guys,

 

I am trying to modify the star products contribution, I have posted in the contrib support forum and the autor tells me that he is to busy to modify the code and I was wondering if anyone else could help?

 

If you look here you will see that I have one product in a box on the main page.

 

What I would like is to have the large image replaced by the thumbnail image, I have toyed around with the code but to no avail.

 

If anyone can do this I would appreciate it.

 

Here is the code from star_products.php

 

<?php

 //$header_star_product = array();
 //$header_star_product[] = array('align' => 'center', 'text' => sprintf(STAR_TITLE));
 //new contentBoxHeading($header_star_product);

 $star_product_info = 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_id = '" . $HTTP_GET_VARS['products_id'] . "' and pd.products_id = '" . $HTTP_GET_VARS['products_id'] . "'and pd.language_id = '" . $languages_id . "'");
 $star_products_query = tep_db_query("select substring(pd.products_description, 1, 598) as products_description, p.products_id, p.products_image, p.manufacturers_id, p.products_tax_class_id, sp.product_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_STAR_PRODUCT . " sp  where p.products_id = pd.products_id and p.products_status = '1' and pd.products_description != '' and p.products_id=sp.product_id and pd.language_id = '" . $languages_id . "'");
 $star_products = tep_db_fetch_array($star_products_query);
 $star_products['products_name'] = tep_get_products_name($star_products['products_id']);
 $star_products["0"] = array('align' => 'center',
         'params' => 'width="100%" valign="top"',
                                     'text' => '<tr>
              <td height="15%" width="85%" class="star-product-title"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $star_products['products_id']) . '">' . $star_products['products_name'] . '</a></td>
        <td align="right"  height="100%" width="15%" rowspan="2"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $star_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $star_products['products_image'], $star_products['products_name'], 210) . '</a></td>
      </tr>
      <tr>
        <td height="85%" width="85%" class="star-product">'. $star_products["products_description"] . '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '">' . STAR_READ_MORE . '</a></td>
      </tr>
      <tr>
        <td><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '">' . tep_draw_separator('pixel_trans.gif', '10', '10') . '<a href="' . tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $star_products['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_IN_CART) . '</a></td>
      </tr>');
new contentBox($star_products);
?>

 

This is the line that needs changing

 

         <td align="right"  height="100%" width="15%" rowspan="2"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $star_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $star_products['products_image'], $star_products['products_name'], 210) . '</a></td>

 

Thanks in advance

 

Mark

Lifes a bitch, then you marry one, then you die!

Link to comment
Share on other sites

<td align="right"  height="100%" width="15%" rowspan="2"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $star_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $star_products['products_image'], $star_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>

 

Maybe ?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...