Script sample for small webshop

Hi Experts,

I need to create a small ’webshop’ on our exciting website that is currently build on HTML and ASP.

My company has published a book, and therefore wishes to make it available to be purchased online.

So I’m looking for a simple script that I can insert (copy/paste) into our webpage. Besides the options to insert name, company address, qty etc. we need a email to be sent when placing an order as well for inserting the data into a access file.

When can I find such a script sample with these few extensions?

We’re running IIS6 – 2003R2 – and I have no gift in programming what so ever!

Thanks in advance.
dsl77Asked:
Who is Participating?
 
pigmentartsConnect With a Mentor Commented:
to be honest mals is best with only a few products 1 or 2 otherwise its better to have a full dynamic site or more products. its one pice of code thats goes on your site gets all user info etc
0
 
deeppraCommented:
This is a small Email library developed in java i think this suits u r needs

http://www.chilkatsoft.com/java-email.asp
0
 
deeppraCommented:
Here is a small program to send email


Sending email via SMTP

The first example shows how to send a basic email message via SMTP. Below, you'll find the SimpleSender class, which takes your message's details from the command line and calls a separate method -- send(...) -- to send it:

package com.lotontech.mail;
import javax.mail.*;
import javax.mail.internet.*;
import java.util.*;
/**
  * A simple email sender class.
  */
public class SimpleSender
{
  /**
    * Main method to send a message given on the command line.
    */
  public static void main(String args[])
  {
    try
    {
      String smtpServer=args[0];
      String to=args[1];
      String from=args[2];
      String subject=args[3];
      String body=args[4];
      send(smtpServer, to, from, subject, body);
    }
    catch (Exception ex)
    {
      System.out.println("Usage: java com.lotontech.mail.SimpleSender"
       +" smtpServer toAddress fromAddress subjectText bodyText");
    }
    System.exit(0);
  }

for more info http://www.javaworld.com/javaworld/jw-10-2001/jw-1026-javamail.html
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
pigmentartsCommented:
mals ecommerce is totally free and allows you to do just this into a html site free ssl included. once users have paid they are automated a download link. free gateways also! its all done for you, if you do decide to  pay you can then customises it to the look and theme of your site.

http://www.mals-e.com/
0
 
dsl77Author Commented:
Hi all, many of the above solutions are great.

But the solution we need is more simple. i have found a scipt that i have tried to edit to my needs.

i need the funktion to send email, perhaps some more code is needed. And also a checkbox/radio whether to select book a or book b.

Thanks in advance.

contact.php
 
<?php
$EmailFrom = "contact@test.com";
$EmailTo = "sysadm@company.dk";
$Subject = "Contact Form";
$Name = $_POST['Name']; 
$Email = $_POST['Email']; 
$Company = $_POST['Company']; 
$Phone = $_POST['Phone']; 
$Comments = $_POST['Comments']; 
 
// The body text of your email
 
$Body = "";
$Body .= "Name: ";
$Body .= $Name;
$Body .= "
";
$Body .= "Email: ";
$Body .= $Email;
$Body .= "
";
$Body .= "Company: ";
$Body .= $Company;
$Body .= "
";
$Body .= "Phone: ";
$Body .= $Phone;
$Body .= "
";
$Body .= "Comments: ";
$Body .= $Comments;
$Body .= "
";
 
// command that calls the php mail() function
$result = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
 
// redirection as a function of $result variable boolean value 
if ($result){
print "<meta http-equiv="refresh" content="0;URL=messagesent.html">";
}
else{
print "<meta http-equiv="refresh" content="0;URL=messagenotsent.html">";
}
?>
 
contact.html
 
<html><style type="text/css">
<!--
body {
	background-image: url(overview_bg_.jpg);
}
.style1 {font-family: Verdana, Arial, Helvetica, sans-serif}
-->
</style>
<body>
<p><strong>text</strong></p>
<p>&nbsp;</p>
<table cellspacing="0" cellpadding="0" width="50">
<form action=contact.php method=post name=form class="style1">
<tr>
<td>Name:</td>
<td><input name="Name" size="40" /></td>
</tr>
<tr>
<td>Email:</td>
<td><input name="Email" size="40" /></td>
</tr>
<tr>
<td>Company:</td>
<td><input name="Company" size="40" /></td>
</tr>
<tr>
  <td>Address:</td>
  <td><input name="Company2" size="40" /></td>
</tr>
<tr>
  <td>City:</td>
  <td><input name="Company2" size="40" /></td>
</tr>
<tr>
  <td>Zip Code:</td>
  <td><input name="Company2" size="40" /></td>
</tr>
<tr>
<td>Phone:</td>
<td><input name="Phone" size="40" /></td>
</tr>
<tr>
<td>Comments:</td>
<td><textarea name="Comments" rows="5" cols="32"></textarea></td>
</tr>
<tr>
<td><input name="submit" type="submit" value="Send" /></td>
</tr>
</form>
</table>
<p>&nbsp;</p>
</body>
</html>

Open in new window

0
 
pigmentartsCommented:
mals will send auto email with a download link if you after payment
0
 
dsl77Author Commented:
Malswith credit card payment ... it's to advanced for our needs. We only need to sell one product online and the information the users types in, will be used when sending an invoice.

Can anybody use the code submitted?
0
 
dsl77Author Commented:
We'll use Mals ... thanks for all your help! ;)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.