We use cookies to provide you with a better experience. If you continue to use this site, we'll assume you're happy with this. Alternatively, click here to find out how to manage these cookies

hide cookie message
Contact Forum Editor

Send an email to our Forum Editor:


PLEASE NOTE: Your name is used only to let the Forum Editor know who sent the message. Both your name and email address will not be used for any other purpose.

Tech Helproom


It's free to register, to post a question or to start / join a discussion


 

E-commerceapplication for pricing by area


geoff47

Likes # 0

I wonder if it possible to have an application to price a commodity by area ?
My idea would be the customer puts in two dimensions and it results in a price based on a price per square metre.
I could give fixed prices for fixed sizes, but would like another option so customers can choose exactly what size they buy.

Hope it's not a tall order.
Any suggestions would be very welcome.
Thanks in advance

Like this post
geoff47

Likes # 0

I cannot thank you enough.
Hopefully I can tweak it about a bit to do exactly what I want.
Linking it to a shopping cart.
Many thanks indeed

Like this post
geoff47

Likes # 0

Thank you for that, I shall give it a go.
I know next to nothing about code, but have been surprising myself lately.
Done things I thought were beyond me.
Thanks I shall let you know how I get on.
Don't hold your breathe.....this may take a while.

Like this post
Ansolan

Likes # 0

Have the code below lying around if that helps. A bit basic but gives you a start. Doubtless mentioning what you already know but in case, save the code in notepad, change the extension to .html and have a look, see if you think this is worth incorporating into your page. You would only need to change the value (currently 300) and add a little styling to suit.

<html>
<head>
<title>Calculator</title>
<script type="text/javascript">
//calculator
function cal() {
var x=document.form.length.value
var y=document.form.width.value
var a=x*y //calculates square meters
var total=a*300 //calculates cost. Enter your own cost/sq. meter
document.form.total.value=total;
}
</script>
</head>
<body>

<h3>Project cost calculator:</h3>
<form action="" name="form">
<p><input type="text" name="length" size="2" /> Enter the length of your project in meters.<br />
<input type="text" name="width" size="2" /> Enter the width of your project in meters.</p>

<p><b>Click this button to calculate the approximate cost of your project:</b><br />
<input type="button" name="money" value="calculate" onclick="cal()" /></p>

<p>£ <input type="text" name="total" size="6" /></p>
</form>
</body>
</html>

Like this post

Reply to this topic

This thread has been locked.



IDG UK Sites

Black Friday 2014 tech deals UK Live: Best Black Friday deals from Apple, Amazon, Argos, eBay,...

IDG UK Sites

Black Friday feeding frenzy infects the UK

IDG UK Sites

VAT MOSS: Will I be affected by the EU VAT changes? Here are the facts for designers and artists

IDG UK Sites

Black Friday 2014 UK: Apple deals, Amazon deals & Black Friday tech offers