JohnnyL Posted March 30, 2017 Share Posted March 30, 2017 Hi! Quick question, how can i remove decimal points from the pricetables? I only want to remove it from the price tables, as soon as client clicks on add and the cart comes up, it doesnt matter if the decimals are shown there. I just want to remove the decimals from the pricetables since it looks better without the ,00. Thanks all help is appreciated! 0 Quote Link to comment Share on other sites More sharing options...
wulfric Posted March 31, 2017 Share Posted March 31, 2017 Look for dropdown: Format and change accordingly. You may also wish to just edit This is the page that has what you want: yourWHMCS.com//configcurrencies.php?action=edit&id=1 edit currency create new currency 0 Quote Link to comment Share on other sites More sharing options...
JohnnyL Posted March 31, 2017 Author Share Posted March 31, 2017 (edited) its fine if u dont have taxes, but Not that great in our case, we do charge taxes, Thanks to the the notice of brian,( they dont show up at cart and invoices) .. any other way? Edited March 31, 2017 by JohnnyL 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 31, 2017 Share Posted March 31, 2017 Thats just perfect!!! without any coding and all that, simple clean solution! I have to say that I think this solution might be dangerous and potentially have serious legal consequences too - i'm thinking specifically if taxes are involved. so let's say you have a product for £10 per month, and a 14.5% sales tax needs to be applied... normally, that would be £11.45 a month... if you change your currency settings to remove the decimal places, they'll get an invoice for £11 instead. legally your tax liability will still be £1.45 per month - the fact your only taking £1.00 from the client is irrelevant - you'd still be responsible for making up the difference! if the tax rate was 17.5%, then instead of correctly taking £1.75 in tax, you'd be taking £2.00... if you aren't charging a sales tax, then wulfric's solution might well be fine - but if you are using taxes, then i'd think very carefully about using this solution as it will not only change the prices in the tables, but throughout the whole ordering process... including the invoice (and any tax reports you run too). 0 Quote Link to comment Share on other sites More sharing options...
JohnnyL Posted March 31, 2017 Author Share Posted March 31, 2017 You are tottaly right!! I cant have this! We DO charge taxes @ 21%. All i wanted it to remove the decimal from the view of pricetables, but obviously they should be charged at the cart, like u showed in the screenshot. So How to fix that brian?? Thanks allot btw for the notice! i overlooked that.. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 31, 2017 Share Posted March 31, 2017 https://forum.whmcs.com/showthread.php?125618-Hide-decimals-from-order-form&p=503574#post503574 if you're using Premium Comparison template, and all your prices end in ',00' - then in products.tpl, you should need to change... {$product.pricing.minprice.cycleText} to... {$product.pricing.minprice.cycleText|replace:',00':''} 2 Quote Link to comment Share on other sites More sharing options...
JohnnyL Posted March 31, 2017 Author Share Posted March 31, 2017 https://forum.whmcs.com/showthread.php?125618-Hide-decimals-from-order-form&p=503574#post503574 if you're using Premium Comparison template, and all your prices end in ',00' - then in products.tpl, you should need to change... {$product.pricing.minprice.cycleText} to... {$product.pricing.minprice.cycleText|replace:',00':''} I tried it, did not work, nothing changed.. the ,00 still there in producttable.. and yes i am using premium comparison.. What else can i try? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted April 1, 2017 Share Posted April 1, 2017 in that pricing block of code in products.tpl, add the replace everywhere! e.g change... <div class="price-area"> <div class="price" id="product{$product@iteration}-price"> {if $product.bid} {$LANG.bundledeal} {if $product.displayprice} <br /><br /><span>{$product.displayPriceSimple}</span> {/if} {elseif $product.paytype eq "free"} {$LANG.orderfree} {elseif $product.paytype eq "onetime"} {$product.pricing.onetime} {$LANG.orderpaymenttermonetime} {else} {if $product.pricing.hasconfigoptions} {$LANG.from} {/if} {$product.pricing.minprice.cycleText} <br> {if $product.pricing.minprice.setupFee} <small>{$product.pricing.minprice.setupFee->toPrefixed()} {$LANG.ordersetupfee}</small> {/if} {/if} </div> to... <div class="price-area"> <div class="price" id="product{$product@iteration}-price"> {if $product.bid} {$LANG.bundledeal} {if $product.displayprice} <br /><br /><span>{$product.displayPriceSimple|replace:',00':''}</span> {/if} {elseif $product.paytype eq "free"} {$LANG.orderfree} {elseif $product.paytype eq "onetime"} {$product.pricing.onetime|replace:',00':''} {$LANG.orderpaymenttermonetime} {else} {if $product.pricing.hasconfigoptions} {$LANG.from} {/if} {$product.pricing.minprice.cycleText|replace:',00':''} <br> {if $product.pricing.minprice.setupFee} <small>{$product.pricing.minprice.setupFee->toPrefixed()} {$LANG.ordersetupfee}</small> {/if} {/if} </div> 0 Quote Link to comment Share on other sites More sharing options...
JohnnyL Posted April 1, 2017 Author Share Posted April 1, 2017 Tried it just now, still not removing the decimals.. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted April 1, 2017 Share Posted April 1, 2017 can you PM me a link to your site - i'll need to see what's going on. 0 Quote Link to comment Share on other sites More sharing options...
JohnnyL Posted April 1, 2017 Author Share Posted April 1, 2017 can you PM me a link to your site - i'll need to see what's going on. PM sent! Thanks for the help! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted April 1, 2017 Share Posted April 1, 2017 aah - you've changed your currency settings to use .00 instead of ,00 (as per your first image!) so everywhere you previously had in the template... |replace:',00':''} change it to... |replace:'.00':''} 0 Quote Link to comment Share on other sites More sharing options...
JohnnyL Posted April 1, 2017 Author Share Posted April 1, 2017 You are right! i was confused, i had put back in the wrong settings, again overlooked it! Awesome help! its working now! 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.