View Full Version : Remove Pennies from Pricing
Mark NGN
15-Apr-2003, 02:53 PM
Hi All, me again :)
I have another unusual request. Can I remove the display of pennies in pricing on the website pages. Eg
£2000 to be displayed and NOT £2000.00
Kindest regards
Mark
NormanRouxel
15-Apr-2003, 03:38 PM
Try this. Edit Act_ProductPrice.html and replace the fragment
NETQUOTEVAR:COST
with
<script language=JavaScript>document.write('NETQUOTEVAR:COST'.replace(/&#46;\d\d/,""));</script>
Customers will need a JavaScript enabled browser or they'll see rubbish. Also this add rather a lot of code instead of the few bytes for the price. You'll have to decide if it's worth it.
Norman
Mark NGN
16-Apr-2003, 04:27 PM
Norman,
Thanks for the code. I will try it.
:D
Mark
Mark NGN
16-Apr-2003, 04:45 PM
Noman,
I replaced the NETQUOTEVAR:COST as suggested and I got a html generation error. "ENDSEPARATOR not found"
I had this in act_productprice.html
<!-- ProductPrice HTML begin -->
<!-- This template is used for the product price text. -->
<br><span class="actxsmall"><b><Actinic:RETAIL_PRICE_TEXT>NETQUOTEVAR:PRICEPROMPT</Actinic:RETAIL_PRICE_TEXT> NETQUOTEVAR:DISCOUNT_QUANTITY NETQUOTEVAR:COST</b></span><span class="actxxsmall">NETQUOTEVAR:TAXMESSAGE</span>
<!-- This template is used for the product price text. -->
<!-- ProductPrice HTML end -->
and replaced it with :-
<!-- ProductPrice HTML begin -->
<!-- This template is used for the product price text. -->
<br><span class="actxsmall"><b><Actinic:RETAIL_PRICE_TEXT>NETQUOTEVAR:PRICEPROMPT</Actinic:RETAIL_PRICE_TEXT> NETQUOTEVAR:DISCOUNT_QUANTITY <script language=JavaScript>document.write('NETQUOTEVAR:COST'.replace(/.\d\d/,""));</script> </b></span><span class="actxxsmall">NETQUOTEVAR:TAXMESSAGE</span>
<!-- This template is used for the product price text. -->
<!-- ProductPrice HTML end -->
Could you see where I went wrong please?
regards Mark
NormanRouxel
16-Apr-2003, 11:00 PM
Damn forum munges text, bungs in smilies (although you can turn them off if you remember), makes it impossible for you to enter certain HTML character codes (even within CODE flags) and hates the word JavaScript - I just typed it as one word but forum sometimes sticks a space in. I've attached a modified Act_ProductPrice.html that works fine for me.
Norman
Mark NGN
17-Apr-2003, 06:30 AM
Norman,
Thank you very, very much for this code. It has helped me enourmously.
Kindest regards
Mark
:D
NormanRouxel
17-Apr-2003, 10:08 AM
Great. Just remember that users need JavaScript (but that IS about everyone). By the way what are you selling that's so expensive?
Norman
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.