Forum Moderators: open

Message Too Old, No Replies

formular (multiply and sum up) in frontpage?

         

Anke

10:04 pm on Feb 2, 2004 (gmt 0)

10+ Year Member



Hi everybody,

I don't know if it belongs in this forum. We want to have an order form where the customer inserts the number of products required. Also we then want to have this entered number, multiplied with the unit price so that the customer sees the total amount to pay.

Is that clear?

So we hope to enter somehow a table with headings, the customer enters the units required and then the table calculates the total costs for the customer.

Any idea how to do it and hopefully also inexpensive?

Thanks for your help.

Anke

katy8439

12:03 pm on Feb 4, 2004 (gmt 0)

10+ Year Member



Hi Anke,

The best way to do this would be to use JavaScript to update the form automatically when the user changes the value.

Katy

Anke

2:59 pm on Feb 4, 2004 (gmt 0)

10+ Year Member



Hi Kathy,

Thanks for that hint. However, I am not familiar with Javascript. Do you have any idea what I have to do or where I can read how to do it?

Anke

DaScribbler

11:46 am on Feb 5, 2004 (gmt 0)

10+ Year Member



Check out Hotscripts.com. They have TONS of scripts submitted by developers across the net.

I just now did a check with the Search utility for 'Shopping Carts' (which sounds like what you are looking for) and turned up many many many results.

They range in price from Free (most of them) up to a few hundred dollars. I'm relatively confident you'll have no problem finding one which won't cost you a dime. Most of my perusing of the results were in the PHP scripts.

Additionally, there are links to the developer's site, who usually have demo sites up so you can see their scripts in action.

Anke

12:56 pm on Feb 5, 2004 (gmt 0)

10+ Year Member



Thanks DaScribbler for your tip. I will search and hope to find what I need.

Have a good day

Anke

katy8439

2:26 pm on Feb 5, 2004 (gmt 0)

10+ Year Member



Hi Anke,

It would be a something a bit like

<html>
<head>
<title>My Cart</title>
<script language="javaScript">
var hammerCost="13.99"
var cost
function changeQuant()
{
cost=document.orderForm.quantity.value*hammerCost
document.orderForm.hammerTotal.value=cost
}
</script>
</head>

<body>

<form name="orderForm" action="index.htm" method="post">
<table width="100%" cellpadding="3" cellspacing="0" border="1">
<tr><td>Product</td><td>price</td><td>Quantity</td><td>total</td></tr>
<tr><td>Acme Hammer</td><td>£13.99</td><td><input type="text" name="quantity" size="4" onChange="changeQuant()"></td><td><input type="text" name="hammerTotal" size="4"></td></tr>
</table>
</form>
</body>
</html>

My JavaScript's a bit rusty so you'll have to excuse me.

There are quite a few free shopping carts available, one of them I've seen is called Comersus which looks quite nice, this is an ASP based one.

Don't forget though, if you're going to process orders online you need a Secure server to do it through.

Hope that helps

Katy