Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Trying to echo special ends-date


mazza

Recommended Posts

Posted

Tried adding this to product_info.php:

 

//added specials date	

  $products_special_query = tep_db_query("select expires_date from " . TABLE_SPECIALS . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "'"); 

 $specials = tep_db_fetch_array($products_special_query);

 

And then echoing the value out with:

 

<?php echo '' . $specials['expires_date'] . ''; ?>

 

But this is not working :cry: . Any ideas what is wrong with it ?

"Use no way as way, have no limitation as limitation." - Bruce Lee

Posted

<?php echo '' . $specials['expires_date'] . ''; ?>

could be simplified to

<?php echo $specials['expires_date']; ?>

but I don't think that's the problem.

 

Is it doing anything? Can you should us a little of the code around the echo line?

In olden times the men were made of iron and the ships were made of wood; now it's the other way around. :wink:

Posted

You might need (int) in front of $HTTP, like this

(int)$HTTP_GET_VARS['products_id']

In olden times the men were made of iron and the ships were made of wood; now it's the other way around. :wink:

Posted

Nope. I think it is from the sql query part. If I stick this:

 

?php echo TEXT_PRODUCTS_LEFT . ': ' . ($product_info_values['products_quantity']); ?>

 

It displays it rigth.

"Use no way as way, have no limitation as limitation." - Bruce Lee

Archived

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

×
×
  • Create New...