SPUS

 
 
Selamat Datang ke Laman Web SPUS
 
 
 
 
You are here:: Cube Cart Create E-Mail Form in Contact Us
 
 

Create E-Mail Form in Contact Us

E-mail Print PDF

CONTACT US MOD  V 1.0

Directions for adding a site doc that will email you via the mail() setup, this way they do not have to open thier email program in order to send you a simple email. If you are using smtp for your mail, I do not know if this is going to work for you.

 

 

Download here


This a basic email, I am looking to add additional features such as a validator for the email address and one to ensure that a user selects an option, and maybe make it "blend" into the core of CubeCart, but I have not looked into it yet, I will have future versions released when ready. This MOD is ok to use with version 3.0.X, it is fully tested and works fine, there is some minor changes that need to be done in order to get it workig on your site.


Unzip the files to a directory on your computer.

After unzipping the files open the folder you will see the following files listed:
    sitedocform.php
    countact_us.php
   
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
sitedocform.php

Open this with any word processer or your favorite PHP editor. This file actually creates the form that will be included in your "site docs". Inside this file you need to modify lines 34-39, if you want to, these are the options that show up on the "drop down":


    <option selected="selected">Please Select one....</option>
        <option>Question about item</option>
        <option>Question regarding shipping</option>
        <option>Question about an order</option>
        <option>General question</option>
        <option>other</option>

You can also modify the first line of code, this is the message that apprears above the email form.


That is it on this file, copy ALL of code, open your site doc that you wan to use or make a new one, click on the "Source" button, yes, you will need to have the fckeditior working so that you can upload the file.

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

contact_us.php

Open this file and edit the following lines:

    //Setup the mail format
    $recipient = "ENTER_YOU_EMAIL";
    $subject = "$_POST[topic]";
    $mailheaders .= "From: $_POST[name]";
    $mailheaders .= "Reply-To: $_POST[email]";

After editing, save and upload the file to the root directory, this is the main dir that the index.php file is in. (ex. STORE/)

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Download here

Original post: http://forums.cubecart.com/index.php?showtopic=11278&st=0&#entry53863