GRECO Posted June 13, 2014 Share Posted June 13, 2014 Hello, I am trying to create a VM product with each variable chosen by configurable options. For example I want the user to choose how much ram he would use and then the price is calculated. The thing is it work fine but the configurable options allow me to use only 2 demicals so i have to set the price to x.xx but i want to use x.xxx I need at least 3 demicals. I've searched and found a same issue with taxes and read that it has to be done through sql. This still stands? Is there a newer fix? Regards 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted June 13, 2014 Share Posted June 13, 2014 I think that solution still stands - can't recall seeing anything in the recent changelogs that show the number of decimal places has been extended. remember to backup the database before trying this! 0 Quote Link to comment Share on other sites More sharing options...
GRECO Posted June 13, 2014 Author Share Posted June 13, 2014 Can you actually guide me through this? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted June 13, 2014 Share Posted June 13, 2014 tweaking the tables or backing up the database? do you have access to phpmyadmin or similar? 0 Quote Link to comment Share on other sites More sharing options...
GRECO Posted June 13, 2014 Author Share Posted June 13, 2014 Tweaking the tables I know how to do the rest. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted June 13, 2014 Share Posted June 13, 2014 well, first thing is to backup the tables! then run phpmyadmin, click on your whmcs mysql db and find the tblpricing table - click on it. you should then see the contents of the table - but you don't need to edit this, you want to click on "Structure" along the top row. the fields you want to change are monthly and those below it - there's probably no need to change the setupfee values from 2 dp. so if you click the "Change" button on the same row as "monthly", you'll see the following screen... you want to change the "Length/Values" entry from 10,2 (for 2 decimal places), to 10,3 (for 3 decimal places) or 10,4 (for 4 decimal places) etc. once you've done then, press "Save" and then do the same for the other billing cycle rows. after you've changed them all (or just the ones you need to), if you log into your WHMCS and view your configuration options, you should find that you can now enter more decimals. it is also worth noting that this tweak will also change the pricing for products, domains, addons etc to the same number of decimal places... works fine for config options, domain prices are seemingly rounded to 2 decimal places anyway, but I haven't tried it with products or addons. btw - did I tell you to backup the database before doing this! if you want to play even safer, it might be worth waiting for one of the whmcs support guys to confirm that there are no consequences of doing this - I haven't see any while writing this, but there may be something further down the line that i'm unaware of. hope that helps. 0 Quote Link to comment Share on other sites More sharing options...
GRECO Posted June 13, 2014 Author Share Posted June 13, 2014 Hey there, Thanks for this detailed guide. Although I guess the best way (besides the backup) is to wait for a confirmation from the staff Thanks again 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Ryan Posted June 13, 2014 Share Posted June 13, 2014 Hey guys, Shouldn't be any adverse effects from this work around but, as always, this has not been fully tested and cannot be supported by WHMCS. So be sure to test the changes before you apply them to a production install of WHMCS. --Thanks 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.