
Scrap Gold calculator PHP
- or -
Post a project like this5226
£250(approx. $334)
- Posted:
- Proposals: 10
- Remote
- #123594
- Awarded
Web Developer - TypeScript / JavaScript | Node.JS | React | Docker | Go | Scala | C# | MySQL
WordPress Expert/WordPress Development/WordPress Security/WordPress Updates/WordPress Hosting

Senior Full Stack Developer | Laravel | PHP | React | JavaScript | TypeScript | API Expert | Node.js | Unity C# | AI Integration | DevOps

Specialist WordPress + WooCommerce Developer - WPMUDEV Certified - PHP, HTML, CSS, JS/jQuery, Bootstrap, Foundation

6433526495725869110046386902363794862161047278333140825
Description
Experience Level: Expert
Budget – we are not sure what the budget would be for this kind of work.
Deadline – as soon as possible please.
My client has a convert scrap gold into cash website in wordpress 3.3.1.
He would like to add a scrap gold value calculator similar to these ones to appear in the right hand column on every page. The best way to incorporate the form would be something we’re happy to be advised on. Two examples of what we mean are contained below.
http://www.cash4mygold.co.uk
http://www.cashforyourgold.co.uk
There are 2 parts to the project.
The first part involves creation of a form that asks user for
- The weight in grams of their scrap gold
- The quality in carats of their scrap gold
- A calculate amount button
- Display the approx value in pounds the user would receive that day from my client’s firm
How the value is reached is the second part of the project.
There are a number of carats with each one a percentage of purity and thus value. In addition my client, as a gold buyer, will take his commission which is a fixed percentage.
To reach the result you will need to read an xml feed here http://dgcsc.org/goldprices.htm and extract that day's ask price for gold per gram in GBP. The value there is for 24 carat or pure gold. There are a number of other carats with the value percentages below:
24 carat is 999 or 1000 (essentially is pure)
22 carat is 916.6 fine
18 carat is 750 fine
14 carat is 585 fine
10 carat is 417 fine
9 carat is 375 fine
There are 4 variables involved in each calculation
1) The gram weight of user’s gold (float)
2) The day’s ask price for a gram of pure gold http://dgcsc.org/goldprices.htm (float)
3) The quality/carat of user’s gold (float)
4) The commission charged by client. (float )
Example 1
- Site visitor comes to website and accesses the gold calculator.
They have weighed their scrap gold and it is 16 grams. They check its carat and it s 14 carat. My client offers 70% of the current market rate. (current ask price is 35GBP/gram from http://dgcsc.org/goldprices.htm )
Calculation:
( Weight in grams 16 multiplied by days gold ask price) - ( reduction for quality/carat ) - (reduction for client’s commission)
= (weight 16g x days value 35 GBP ) ( multiplied by .585 ) ( multiplied by .70 for client’s commission )
= (16 * 35 ) * (.585) * (.70) )
= £560 * (.585) * (.70 )
= £327.6 * ( .70)
= £292
The value displayed to the user is £292
Example 2
User enters 11 grams at 22 carat quality. They then press calculate button. The days ask gold price per gram is 32GBP.
= (weight 11 x todays ask price 32 ) x ( 0.9166 carat quality ) x (commission 0.7 )
= ( 11 x 32 ) * 0.9166 * 0.7
= £225
Example 3
User enters 55 grams at 18 carat quality with ask price of that day of 28GBP.
= ( weight x todays value ) x quality x commission
= (55 x 28 ) x .75 x 0.70
= £808.50
Additional
The form will not need styled. Someone else will style the form at a later date.
Elements Needed
- It will have a drop down list for carat to keep it simple as there are only 6 options to choose from. It wil contain 9, 10, 14, 18, 22, 24.
- it will have an text box/ input box which will only accept numeric values. It should be able to handle up to 2 decimal places. http://www.cash4mygold.co.uk/ the cash for gold calculator here has an elegant way of dealing with non numeric user input - it simply doesn’t enter a character. I think this would be the best for my client and of course a simple bit of warning to the user would be all that is needed in case they tried to enter ‘twelve’ for example.
We also would like the option to alter the value of the commission at a later date. And so the code would need to be pretty well commented.
Thanks for reading.
Deadline – as soon as possible please.
My client has a convert scrap gold into cash website in wordpress 3.3.1.
He would like to add a scrap gold value calculator similar to these ones to appear in the right hand column on every page. The best way to incorporate the form would be something we’re happy to be advised on. Two examples of what we mean are contained below.
http://www.cash4mygold.co.uk
http://www.cashforyourgold.co.uk
There are 2 parts to the project.
The first part involves creation of a form that asks user for
- The weight in grams of their scrap gold
- The quality in carats of their scrap gold
- A calculate amount button
- Display the approx value in pounds the user would receive that day from my client’s firm
How the value is reached is the second part of the project.
There are a number of carats with each one a percentage of purity and thus value. In addition my client, as a gold buyer, will take his commission which is a fixed percentage.
To reach the result you will need to read an xml feed here http://dgcsc.org/goldprices.htm and extract that day's ask price for gold per gram in GBP. The value there is for 24 carat or pure gold. There are a number of other carats with the value percentages below:
24 carat is 999 or 1000 (essentially is pure)
22 carat is 916.6 fine
18 carat is 750 fine
14 carat is 585 fine
10 carat is 417 fine
9 carat is 375 fine
There are 4 variables involved in each calculation
1) The gram weight of user’s gold (float)
2) The day’s ask price for a gram of pure gold http://dgcsc.org/goldprices.htm (float)
3) The quality/carat of user’s gold (float)
4) The commission charged by client. (float )
Example 1
- Site visitor comes to website and accesses the gold calculator.
They have weighed their scrap gold and it is 16 grams. They check its carat and it s 14 carat. My client offers 70% of the current market rate. (current ask price is 35GBP/gram from http://dgcsc.org/goldprices.htm )
Calculation:
( Weight in grams 16 multiplied by days gold ask price) - ( reduction for quality/carat ) - (reduction for client’s commission)
= (weight 16g x days value 35 GBP ) ( multiplied by .585 ) ( multiplied by .70 for client’s commission )
= (16 * 35 ) * (.585) * (.70) )
= £560 * (.585) * (.70 )
= £327.6 * ( .70)
= £292
The value displayed to the user is £292
Example 2
User enters 11 grams at 22 carat quality. They then press calculate button. The days ask gold price per gram is 32GBP.
= (weight 11 x todays ask price 32 ) x ( 0.9166 carat quality ) x (commission 0.7 )
= ( 11 x 32 ) * 0.9166 * 0.7
= £225
Example 3
User enters 55 grams at 18 carat quality with ask price of that day of 28GBP.
= ( weight x todays value ) x quality x commission
= (55 x 28 ) x .75 x 0.70
= £808.50
Additional
The form will not need styled. Someone else will style the form at a later date.
Elements Needed
- It will have a drop down list for carat to keep it simple as there are only 6 options to choose from. It wil contain 9, 10, 14, 18, 22, 24.
- it will have an text box/ input box which will only accept numeric values. It should be able to handle up to 2 decimal places. http://www.cash4mygold.co.uk/ the cash for gold calculator here has an elegant way of dealing with non numeric user input - it simply doesn’t enter a character. I think this would be the best for my client and of course a simple bit of warning to the user would be all that is needed in case they tried to enter ‘twelve’ for example.
We also would like the option to alter the value of the commission at a later date. And so the code would need to be pretty well commented.
Thanks for reading.
John C.
0% (0)Projects Completed
1
Freelancers worked with
1
Projects awarded
100%
Last project
5 Mar 2012
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies