Jump to content

More demicals in configurable options


GRECO

Recommended Posts

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

Link to comment
Share on other sites

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.

 

s3lLV1L.png

 

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...

 

 

rsXqWNp.png

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.

 

cWMQCfG.png

 

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated