PDA

View Full Version : Removing pence from a price


Nick
23-Jun-2003, 01:51 PM
Hi

Is there anyway of removing the pence (or in this case cents) from the product price displayed on the product pages?

Our client is only dealing in whole numbers of dollars with no cents. i.e. a product price is $700 not $700.00

It doesn't matter how it looks in the cart or the checkout. We just don't want to display the cents in the price on the product page.


Thanks in advance.

Nick

NormanRouxel
23-Jun-2003, 05:08 PM
Nick,

Hi again,

You could use some (more) JavaScript to munge the original NETQUOTEVAR:COST in Act_ProductPrice.html

i.e. replace the first NETQUOTEVAR:COST with:-


<script language=JavaScript>
<!--
document.write("NETQUOTEVAR:COST".replace(/&amp;#46;\d\d/,""));
// -->
</script>
<noscript>NETQUOTEVAR:COST</noscript>



I just typed that lot straight in so there may be typos. The <noscript> stuff is needed for the extrememy rare case that there's a non javascript browser peeking at your pages. They'll get the cents as usual.

Norman