Solved

Script sample for small webshop

Posted on 2007-11-15
8
576 Views
Last Modified: 2012-08-13
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.
0
Comment
Question by:dsl77
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
8 Comments
 
LVL 5

Expert Comment

by:deeppra
ID: 20288888
This is a small Email library developed in java i think this suits u r needs

http://www.chilkatsoft.com/java-email.asp
0
 
LVL 5

Expert Comment

by:deeppra
ID: 20288920
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
 
LVL 12

Expert Comment

by:pigmentarts
ID: 20299062
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:dsl77
ID: 20311130
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
 
LVL 12

Expert Comment

by:pigmentarts
ID: 20311363
mals will send auto email with a download link if you after payment
0
 

Author Comment

by:dsl77
ID: 20311454
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
 
LVL 12

Accepted Solution

by:
pigmentarts earned 500 total points
ID: 20315999
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
 

Author Comment

by:dsl77
ID: 20334303
We'll use Mals ... thanks for all your help! ;)
0

Featured Post

Get Actionable Data from Your Monitoring Solution

Your communication platform is only as good as the relevance of the information you send. Ensure your alerts get to the right people every time with actionable responses. Create escalation rules that ensure everyone follows the process and nothing is left to chance.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Read about the 3 stages of the buyer's journey: awareness, consideration, and decision.
A great marketing strategy is diverse.  Read about the not so popular, yet effective, marketing tactics you can start using today!
The viewer will learn how to dynamically set the form action using jQuery.
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question