Checkout.php pointing to custum confirmation HTML-page?

Get help with nopcart formatting or style related issues.

Moderators: Koibito, Stefko, Randy

Checkout.php pointing to custum confirmation HTML-page?

Postby T!M » Tue Aug 12, 2003 11:21 am

I'm using the checkout.php-script, and I have a question. After conforming their order; the scripts displays a txt-page (generated at the very end of the script by a couple of 'echo' lines). Instead of displaying that message; I would like the script to point to my own confirmation page (i.e. confirmation.html). I can't seem to find how to achieve this... Please help!!

Note: I actually want the same thing for the two error messages that result in a similar txt-page. When one of these errors (mandatory field missing/incorrect e-mail) occurs; I want to have my own HTML-error pages displayed...
T!M
 
Posts: 1
Joined: Sat Aug 09, 2003 4:27 pm

Custom thanks.html page

Postby Randy » Wed Oct 22, 2003 12:27 pm

The custom thankyou page in html is easy:

to the user defined variables at the top of checkout.php add the filename of your thankyou page:

$header = "header.html";
$footer = "footer.html";
$returnpage = "/";
$thankspage = "thanks.htm";
$youremail = "spam@nopdesign.com";
$csvfilename = "orders.csv";
$csvquote = "\"\"";
$mode = "BOTH";

at the bottom of the page where it now generates the thankyou message, replace the two includes and the echos with

//# Send email conformation to the customer.....
$mailheaders = "From: $youremail\r\n";
$mailheaders .="X-Mailer: PHP Mail generated by:NOP Design Shopping Cart\r\n";
$subject = "Order Confirmation";
mail($b_email, $subject, $strMessageBody, $mailheaders);

include($thankspage);

?>

Now to generate custom messages for errors, you will have to edit/customise the header & footer files used in the include() for each error page. There are 2: doerror and doformerror. Of course you can used different headers and/or footers for each message, just remembering the echo statements will have to appear in the html page somewhere.

Have fun...you can't break it permanently!

Randy
Randy
Guru
 
Posts: 1511
Joined: Tue Apr 22, 2003 12:21 pm
Location: Thunder Bay, Ontario


Return to Help: Formatting and Style

Who is online

Users browsing this forum: No registered users and 0 guests

cron