Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Quick question about specials_new_products_price


cclayton

Recommended Posts

I would like to output the new specials price field "specials_new_products_price" from the Specials Table on the product_info.php page... At the moment, I am just adding in:

 

<?php echo $specials_new_products_price; ?>

 

But its not outputting anything... what do I need to add into this page to get this output? Thanks!

Founder & Director at CSC Tours Ltd

Link to comment
Share on other sites

It's not outputting anything, because it's an empty variable. Did you set what the value of $specials_new_products_price is?

 

Near the top of product_info.php, you can see how the spacial price is pulled

 

$new_price = tep_get_products_special_price($product_info['products_id'])

 

and for the correct display (currency, tax etc)

 

$currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id']))

 

You can use exactly this, or define a new variable like

 

$my_new_variable = $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id']))

 

of course after the $new_price is set, for example just after $products_price is set

 

Then you can echo the $my_new_variable within the file

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...