Forums / General Questions / Trying to make a custom order form

Trying to make a custom order form

Locked

Views: 3,604

Results 1 to 15 of 15
This thread is locked. New replies are disabled.
24 Oct 2010, 1:46 AM
#1
phil_roark avatar

phil_roark

New Zenner

Join Date:
Oct 2010
Posts:
6
Plugin Contributions:
0

Trying to make a custom order form

I Have searched everywhere, I cannot find the answer. my website is http://www.phoenixleatherworks.com. I am attempting to make a custom order form. I have followed the directions I have found online and in the FAQ, wiki, and forums. I am posting the code i got from a custom PHP builder form. Here are 2 different portions and I am unable to send mail when someone clicks submit. I can get the form to show up and data entered, but it will not send the form. Please Help!!!!

<?php
error_reporting(E_PARSE);
define("ADMIN_MAIL", "*******");
define("HOST_NAME", $_SERVER['HTTP_HOST']);
define("PHP_SELF", $_SERVER['PHP_SELF']);
define("ERR_MISSING", "Missing required field : ");
define("ERR_EMAIL", "Please enter a valid e-mail address : ");
define("ERR_CREDIT_CARD_NUMBER", "Please check the credit card number : ");
define("ERR_CREDIT_CARD_EXPIRED", "Please check the credit card expiry date : ");
define("ERR_SELECT_UPLOAD", "Please select file : ");// recipient
 define('FORM_RECIPIENT', '[email protected]');
// --- Array of Form Elements ---
$form_mail[] = array( "name" => "First_name", "text" => "Please Enter your First name",  "type" => "text", "required" => "Required" ) ;
$form_mail[] = array( "name" => "Last_Name", "text" => "Please enter you Last Name",  "type" => "text", "required" => "Required" ) ;
$form_mail[] = array( "name" => "E-mail_address", "text" => "Please enter your E-mail address",  "type" => "email", "required" => "Required" ) ;

** SNIP **

<?php
		if( $sErr ) print "<script language='javascript' type='text/javascript'>location.href='#error';</script>";;; 

else: //!$isHideForm
	print( "<br><br><hr><center><b>Your form has been sent. Thank you.</b><br><br><input type='button' value='Home' onclick=\"location.href='/';\"></center><br><br>" );
endif; //!$isHideForm
			?>

</body>
</html>

i apologize for "sounding" so stupid, but I am a leather crafter. not a web developer, but if anyone can please help figure out what is causing problems, and give me simple yet detailed instructions on what to do, I would really appreciate it.

Thank you in advance.

24 Oct 2010, 3:37 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Trying to make a custom order form

Zen Cart's checkout process handles all that for you, securely. What your form is attempting to do is simply duplicating everything Zen Cart will already do with its built-in features.

Also, your form makes mention of collecting and emailing credit card numbers. If you do that, you're opening yourself up to serious fraud risks, and if your credit card company finds out they'll be all over you in a flash.

If you're trying to collect information to complete the sale of a product, use the built-in products and attributes to do that, and let the checkout process handle the payment components.

If you're trying to put up a contact-us page, there's already one built-in to Zen Cart.

If you're just trying to put up a page to collect sales interests only, why are you using Zen Cart at all?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

24 Oct 2010, 3:44 AM
#3
phil_roark avatar

phil_roark

New Zenner

Join Date:
Oct 2010
Posts:
6
Plugin Contributions:
0

Re: Trying to make a custom order form

I was trying to create a custom order form, or idea generator that people had, as a leather smith, most of my work is custom, and it was supposed to be a place where i could get peoples interest with a custom leather creation. if zencart can do that other than the contact us page, please let me know where. i was not trying to collect information like credit cards. it was an automatic form generator, and failed miserably..........

24 Oct 2010, 3:49 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Trying to make a custom order form

What kind of information do you want to collect, and why?
What do you intend to do with each piece of info you collect when you get it?
When collecting this info, do you intend to show them examples or ideas of things you want their input about?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

24 Oct 2010, 4:59 AM
#5
phil_roark avatar

phil_roark

New Zenner

Join Date:
Oct 2010
Posts:
6
Plugin Contributions:
0

Re: Trying to make a custom order form

I need to collect: first name, last name, email, phone #, best method of contact (email or phone), best time to contact, box for image file to upload a picture, and a message field for customers ideas.
This is a custom order form for my leather shop.
I intend to contact the person with a custom order quote and any questions I may have about their order.
I do not intend on giving them examples. The customer gives the ideas for the product that they want.

24 Oct 2010, 5:10 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Trying to make a custom order form

Okay.

Zen Cart is an e-commerce system, designed to showcase a catalog of products which customers browse online and from which they select what they wish to purchase, and then proceed to checkout by paying for the order with their credit card, after the system automatically calculates shipping, taxes, sales/specials discounts, etc.

It doesn't sound like you're needing to use any of those features ... so, unless I'm missing something, I'm unclear why you're looking at Zen Cart to run your site.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

24 Oct 2010, 5:25 AM
#7
phil_roark avatar

phil_roark

New Zenner

Join Date:
Oct 2010
Posts:
6
Plugin Contributions:
0

Re: Trying to make a custom order form

grrrr. you are missing something, i just want a form that will collect the above information and mail it to me.

24 Oct 2010, 5:34 AM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Trying to make a custom order form

Okay, evidently you don't want to clarify what I'm missing.

Zen Cart isn't designed to do what you described. It's way more deeply involved with sales than just collecting some fields of information about custom data.
If you're actually wanting to "sell" products, then simply create a product, add some input fields (attributes) to it for people to type in what they want done for that product, including attaching uploaded images, and let them checkout with all that information supplied. Whether you want them to pay up front or pay later is up to you after they've placed their order.

But, while I really don't recommend it, if you're wanting to build a completely separate email-only form within Zen Cart, then the approach discussed in the following thread would be the better way: http://www.zen-cart.com/forum/showthread.php?p=386482#post386482. Sorry, but that means you'll have to roll up your sleeves and do some programming.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

24 Oct 2010, 5:50 AM
#9
phil_roark avatar

phil_roark

New Zenner

Join Date:
Oct 2010
Posts:
6
Plugin Contributions:
0

Re: Trying to make a custom order form

I apologize, I have been beating my head against a wall for a few days trying to figure this out on my own, and I am a little frustrated. I have calmed down a bit. Let me explain what I do. I am a leather crafter. I make products that I sell at shows and so on. I was looking for some new Ideas the other day and discovered that there are not many crafters that put their work online for people to purchase. The hit stats for my website are incredible considering it has only been online for a week. The link you sent me to the other post is helpful, i must have missed it in my searches. I am not trying to "steal" any information, but a lot of my customers have custom requests, such as belts with a special name on it. the form is not supposed to gather any information other than name, e-mail, phone, a picture they want on the belt, and any specific measurements. The form I posted the code for was from freeformcode.com, and they have all the other options, but I don't need those. I understand it might just be easier to put a link to the e-mail address and a description of what I need, but I was trying to make the form for it. My zen-cart site is for showcasing my products, but I wanted a place for the people that want a little extra to be able to request it by just filling in a few boxes.

24 Oct 2010, 5:57 AM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Trying to make a custom order form

The following product is a bit overkill on possible customization options, but it shows you what you can do with a product in Zen Cart in order to collect those custom needs, including custom text/wording, and uploaded artwork/logos, etc. You could do that for your customization products, and then let them go thru checkout, which will collect their name/address/phone details as part of their "order".
Example: http://www.zen-cart.net/demo/index.php?main_page=product_info&cPath=22&products_id=34

As far as making the product be a "quote", set the price as 0 and add text to the product name and description explaining that it's a quoted product and they will be contacted with actual pricing after they checkout and you have some time to prepare their custom quote.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

24 Oct 2010, 6:07 AM
#11
phil_roark avatar

phil_roark

New Zenner

Join Date:
Oct 2010
Posts:
6
Plugin Contributions:
0

Re: Trying to make a custom order form

I will delve into that a little bit more int the morning. I agree as that is a little overkill, but I may be able to make it work.

24 Oct 2010, 6:08 AM
#12
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Trying to make a custom order form

That example is just showing off the possibilities. You can set up any combination of choices you like.

Here's another somewhat simpler example: http://www.zen-cart.net/demo/index.php?main_page=product_info&cPath=22&products_id=46
Again, you can set it up according to your own needs.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

1 Dec 2010, 8:55 PM
#13
mikeinvaldosta avatar

mikeinvaldosta

New Zenner

Join Date:
Dec 2010
Location:
Georgia, US
Posts:
4
Plugin Contributions:
0

Re: Trying to make a custom order form

Phil,

If you are just trying to solicit emails from potential clients with a custom leather need, and DO NOT wish to have this captured in your ZC database, or any other database, there is probably a simpler solution.

I suspect the problem is with PHP, perhaps not providing a file for storage as I believe the form was designed to both store and forward. But I may be way off.

You can use your existing form and simply change the ACTION to a simple CGImail script located in your CGI folder. You will have to create a .txt file to serve as the template of your email message.

Not as dynamic as the PHP solution, but it should meet your stated goal.

This is a dated, but original explanation of the process. http://web.mit.edu/wwwdev/cgiemail/user.html

Hope it helps. Good Luck.

1 Dec 2010, 9:08 PM
#14
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Trying to make a custom order form

Keep in mind that while Mike's suggestion may work, if you're sending mail from a CGI script, it's very likely it'll get trapped by junkmail filters and delivered to a spam folder if it even gets delivered at all.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

1 Dec 2010, 9:09 PM
#15
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Trying to make a custom order form

I used product attributes to make a vendor application form for a festival. It does a lot of the same kinds of things you want to do; I created a mod, Flexible Attributes, to get the form looking exactly the way I wanted it. Look a the nyfaeriefest site in my sig, Artist Vendors > Vendor Application.