Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to add 15% to $product_price


cemfundog

Recommended Posts

I would like to show a retail price on each product info page. Please help with the syntax for this. In other words I would like to take the $product_price and add 15% to it on a seperate line to show the discount they are getting by purchasing online. Thank you all so much for your help...

 

Visit My Website

Link to comment
Share on other sites

Hmm, I wonder if it would work the same way as putting a "sale" price in. Like, have your original price set at the amount you want PLUS your 15%, then where you put sale items in...just put 15% in the box where it will show the original price with a red strikethrough and will show the discounted price below. Eh, might not work, but worth a looking into. You have a lot of products on your site. I am sure there is an easier way.

 

Chelle

 

http://www.clearcreekscraps.com

Link to comment
Share on other sites

I'd recommend using a contribution like this, were you can specify the retail price manually:

 

http://addons.oscommerce.com/info/3574

 

Or you could do a quick and dirty hack like this

 

$products_rrp = $currencies->display_price(($product_info['products_price'] * 1.15), tep_get_tax_rate($product_info['products_tax_class_id']));
echo $products_rrp;

 

It may not look as pretty smile.gif

Link to comment
Share on other sites

I'd recommend using a contribution like this, were you can specify the retail price manually:

 

http://addons.oscommerce.com/info/3574

 

Or you could do a quick and dirty hack like this

 

$products_rrp = $currencies->display_price(($product_info['products_price'] * 1.15), tep_get_tax_rate($product_info['products_tax_class_id']));
echo $products_rrp;

 

It may not look as pretty smile.gif

Thank you all so much for your help. It worked. That was what I needed exactly.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...