Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

product_info, product code appearing when not specified


andrew40

Recommended Posts

Posted

Have a product_info working nicely, however have some text appearing from somewher, which I cannot work out.

 

The code is

 

<tr><td colspan=2 class=cy2><b><?= strtoupper($products_name); ?></b><br><br></td></tr>
				 <tr><td colspan=2><b>Item #:</b>  <?= $products_id; ?><br><br class=px4>

 

Which is basically Product Name and Item

 

However what gets output is..

 

<tr><td height=10 colspan=2></td></tr>

<tr><td colspan=2 class=cy2><b>Hand Fork<br><span class="smallText">[32136]</span></b><br><br></td></tr>

<tr><td colspan=2><b>Item #:</b>  504<br><br class=px4>

 

 

where did the

<span class="smallText">[32136]</span>
come from????
Posted

its probably coming from the database or the $products_name was pre-formated earlier in the script. I remember seeing some template code doing this.

Posted
its probably coming from the database or the $products_name was pre-formated earlier in the script. I remember seeing some template code doing this.

 

 

Found this in /includes/functions/general.php

 

// Return a product's name
// TABLES: products
 function tep_get_products_name($product_id, $language = '') {
global $languages_id;

if (empty($language)) $language = $languages_id;

$product_query = tep_db_query("select products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$product_id . "' and language_id = '" . (int)$language . "'");
$product = tep_db_fetch_array($product_query);

return $product['products_name'];
 }

 

Would this be doing it?

Posted

no where's the code with $products_name var being initialized? Start from there.

Posted
no where's the code with $products_name var being initialized? Start from there.

 

 

Many thanks, found it and removed, much obliged.....

Archived

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

×
×
  • Create New...