Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help - contribuition "Display Rondom Products w/Descrip


rnt

Recommended Posts

Hi I?m testing contribuition " Display Rondom Products w/Description".

How can i put only products from one categorie or manufacturer.

 

Thks for the help..

 

----CODE---

<?

$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 . "'");

$new_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

 

from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id =

 

pd.products_id and p.products_status = '1' and

 

pd.products_description != '' order by rand() DESC limit " .

 

'5');

$new_products = tep_db_fetch_array($new_products_query);

$new_products['products_name'] =

 

tep_get_products_name($new_products['products_id']);

 

 

 

 

?>

<div align="center">

<center>

<table border="1" cellpadding="20" cellspacing="0"

 

style="border-collapse: collapse" width="100%"

 

bordercolor="#2799E2" id="AutoNumber1">

<tr>

<td>

<table border="0" cellpadding="0" cellspacing="0"

 

style="border-collapse: collapse" bordercolor="#2799E2"

 

id="AutoNumber1">

<tr>

<td>

<div align="center">

<center>

<table border="0" cellpadding="0" cellspacing="0"

 

style="border-collapse: collapse" bordercolor="#111111"

 

id="AutoNumber2">

<tr>

<td align="center"><div align="center">

<center>

<table border="0" width="100%" cellpadding="0"

 

cellspacing="0" style="border-collapse: collapse"

 

bordercolor="#111111" id="AutoNumber1">

<tr>

<td class="main">

<?

echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO,

 

'products_id=' . $new_products['products_id']) . '">' .

 

$new_products['products_name'] . '</a>';

?></td>

<td align="right"><table border="5" cellpadding="0"

 

cellspacing="0" style="border-collapse: collapse"

 

bordercolor="#111111">

<tr>

<td><?php echo '<a href="' .

 

tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' .

 

$new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES .

 

$new_products['products_image'], 'Newest Anime', 210, 138) .

 

'</a>'; ?></td>

</tr>

</table>

</td>

</tr>

</table>

</center>

</div>

</td>

</tr>

<tr>

<td class="main">

<? echo $new_products['products_description']

?>

 

...<a href="

<?

echo tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']);

?>

">Read More</a>

</td></tr></table>

 

</center>

</div>

</td>

</tr>

</table>

</td>

</tr>

</table>

</center>

</div>

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.

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...