Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

star product table removal


poon

Recommended Posts

the starproduct.php is shown below....

<?php
 function tep_star_product_with_attributes($products_id) {
 $attributes_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$products_id . "'");
 $attributes = tep_db_fetch_array($attributes_query);

 if ($attributes['count'] > 0) {
return true;
 }
 else {
return false;
}
 }

 $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_price, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price, p.products_tax_class_id, sp.product_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_STAR_PRODUCT . " sp left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id 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']);
 $evita_cortar_palabras = explode( ' ',  $star_products["products_description"] );
array_pop( $evita_cortar_palabras );
$star_products["products_description"]  = implode( ' ', $evita_cortar_palabras );

if (!tep_star_product_with_attributes($star_products['products_id'])) {
 $star_products["0"] = array('align' => 'center',
				  'params' => 'width="100%" valign="top"',
								  'text' => '<div id="featured"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '" class="featuredmargin">' . tep_image(DIR_WS_IMAGES . $star_products['products_image'], $star_products['products_name'], 82, 82) . '</a><br />
<span class="productname">' . $star_products['products_name'] . '</span>
<span class="description"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '">'. strip_tags($star_products["products_description"]) . '</a></span>
<span class="price">'.
$currencies->display_price($star_products['final_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span></div>');
$star_products_output = array_slice($star_products, sizeof($star_products)-1);
new contentBox($star_products_output);
}

else {
 $star_products["0"] = array('align' => 'center',
				  'params' => 'width="100%" valign="top"',
								  'text' => '<div id="featured"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '" class="featuredmargin">' . tep_image(DIR_WS_IMAGES . $star_products['products_image'], $star_products['products_name'], 82, 82) . '</a><br />
<span class="productname">' . $star_products['products_name'] . '</span>
<span class="description"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '">'. strip_tags($star_products["products_description"]) . '</a></span>
<span class="price">'.
$currencies->display_price($star_products['final_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span></div>');
new contentBox($star_products);
}
?>

i can find everything but the tables in the codes box;

it displays as;

<table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox">
 <tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="4" class="infoBoxContents">
 <tr width="100%" valign="top">
<td align="center" width="100%" valign="top">

<div id="featured"><a href="http://www.southeast-design.com/product_info.php?products_id=136" class="featuredmargin"><img src="images/newviralposterfortdk.jpg" border="0" alt="BOSANDKJAS" title=" BOSANDKJAS " width="82" height="82"></a><br />

<span class="productname">BOSANDKJAS</span>

<span class="description"><a href="http://www.southeast-design.com/product_info.php?products_id=136"></a></span>

<span class="price"><span class=currency_symbol>$</span>69.69<span class=currency_symbol></span></span></div>

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

 

i want to remove the tables because its interfering with my design im making....

 

help would be nice...thanks

Link to comment
Share on other sites

The HTML table codes come from this line of code:

 

new contentBox($star_products_output);

That code is found in /catalog/includes/classes/boxes.php

 

There may be some contribution or thread around that explains how to make the code "table-less".

 

But, I don't have a link to it.

:blush:

 

At least you know WHERE the problem is now.

:lol:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...