Solved

Script sample for small webshop

Posted on 2007-11-15
8
548 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
  • 3
  • 3
  • 2
8 Comments
 
LVL 5

Expert Comment

by:deeppra
Comment Utility
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
Comment Utility
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
Comment Utility
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
 

Author Comment

by:dsl77
Comment Utility
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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 12

Expert Comment

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

Author Comment

by:dsl77
Comment Utility
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
Comment Utility
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
Comment Utility
We'll use Mals ... thanks for all your help! ;)
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Every business owner understands the significance of online customer reviews and the impact it can have on sales and revenues. With technology advancing at such a rapid pace, getting online reviews has never been easier, especially when many regions…
Digital marketing agencies have encountered both the opportunities and difficulties that emerge from working with a wide-ranging organizations.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now