[TEP-COMMIT] [CVS catalog] the new checkout success page based on a CSS layout, and the new success
hpdl-OfajU3CKLf1/[email protected] 30 Mar 2005 00:11:31 -0000
| Newsgroups | gmane.comp.web.oscommerce.cvs |
|---|---|
| Message-ID | <[email protected]> |
<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>catalog/catalog/includes</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt>content/pages/<a href="#file1"><span id="added">checkout_success.php</span></a></tt></td><td align="right" id="added">+106</td><td></td><td nowrap="nowrap" align="right">added <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/content/pages/checkout_success.php?rev=1.1&content-type=text/vnd.viewcvs-markup">1.1</a></td></tr>
<tr class="alt"><td><tt>modules/checkout/<a href="#file2"><span id="added">success.php</span></a></tt></td><td align="right" id="added">+60</td><td></td><td nowrap="nowrap" align="right">added <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/checkout/success.php?rev=1.1&content-type=text/vnd.viewcvs-markup">1.1</a></td></tr>
<tr><td></td><td align="right" id="added">+166</td><td></td><td></td></tr>
</table>
<small id="info">2 added files</small><br />
<pre class="comment">
the new checkout success page based on a CSS layout, and the new success
checkout module to handle the processing logic
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname" id="added"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/content">content</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/content/pages">pages</a><br /></span>
<div class="fileheader" id="added"><big><b>checkout_success.php</b></big> <small id="info">added at <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/content/pages/checkout_success.php?rev=1.1&content-type=text/vnd.viewcvs-markup">1.1</a></small></div>
<pre class="diff"><small id="info">diff -N checkout_success.php
--- /dev/null Wed Mar 30 02:11:26 2005
+++ /tmp/cvsAAAj6aqEa Wed Mar 30 02:11:27 2005
@@ -0,0 +1,106 @@
</small></pre><pre class="diff" id="added">+<?php
+/*
+ $Id$
+
+ osCommerce, Open Source E-Commerce Solutions
+ http://www.oscommerce.com
+
+ Copyright (c) 2005 osCommerce
+
+ Released under the GNU General Public License
+*/
+
+ $Qglobal = $osC_Database->query('select global_product_notifications from :table_customers_info where customers_info_id =:customers_info_id');
+ $Qglobal->bindTable(':table_customers_info', TABLE_CUSTOMERS_INFO);
+ $Qglobal->bindInt(':customers_info_id', $osC_Customer->id);
+ $Qglobal->execute();
+
+ if ($Qglobal->valueInt('global_product_notifications') !== 1) {
+ $Qorder = $osC_Database->query('select orders_id from :table_orders where customers_id = :customers_id order by date_purchased desc limit 1');
+ $Qorder->bindTable(':table_orders', TABLE_ORDERS);
+ $Qorder->bindInt(':customers_id', $osC_Customer->id);
+ $Qorder->execute();
+
+ $Qproducts = $osC_Database->query('select products_id, products_name from :table_orders_products where orders_id = :orders_id order by products_name');
+ $Qproducts->bindTable(':table_orders_products', TABLE_ORDERS_PRODUCTS);
+ $Qproducts->bindInt(':orders_id', $Qorder->valueInt('orders_id'));
+ $Qproducts->execute();
+
+ $products_array = array();
+ while ($Qproducts->next()) {
+ $products_array[] = array('id' => $Qproducts->valueInt('products_id'),
+ 'text' => $Qproducts->value('products_name'));
+ }
+ }
+?>
+
+<div class="pageHeading">
+ <h1><?php echo HEADING_TITLE_CHECKOUT_SUCCESS; ?></h1>
+</div>
+
+<form name="order" action="<?php echo tep_href_link(FILENAME_CHECKOUT, 'success=update', 'SSL'); ?>" method="post">
+
+<div>
+ <div style="float: left;"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_man_on_board.gif', HEADING_TITLE_CHECKOUT_SUCCESS); ?></div>
+
+ <div style="padding-top: 30px;">
+ <p><?php echo TEXT_SUCCESS; ?></p>
+
+ <p>
+<?php
+ if ($global['global_product_notifications'] != '1') {
+ echo TEXT_NOTIFY_PRODUCTS . '<br><p class="productsNotifications">';
+
+ $products_displayed = array();
+ for ($i=0, $n=sizeof($products_array); $i<$n; $i++) {
+ if (!in_array($products_array[$i]['id'], $products_displayed)) {
+ echo osc_draw_checkbox_field('notify[]', $products_array[$i]['id']) . ' ' . $products_array[$i]['text'] . '<br>';
+ $products_displayed[] = $products_array[$i]['id'];
+ }
+ }
+
+ echo '</p>';
+ } else {
+ echo TEXT_SEE_ORDERS . '<br><br>' . TEXT_CONTACT_STORE_OWNER;
+ }
+?>
+ </p>
+
+ <h1 style="text-align: center;"><?php echo TEXT_THANKS_FOR_SHOPPING; ?></h1>
+ </div>
+</div>
+
+<div class="submitFormButtons" style="text-align: right;">
+ <?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?>
+</div>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0">
+ <?php if (DOWNLOAD_ENABLED == 'true') include('includes/modules/downloads.php'); ?>
+</table>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0">
+ <tr>
+ <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
+ <tr>
+ <td width="50%" align="right"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td>
+ <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
+ </tr>
+ </table></td>
+ <td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
+ <td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
+ <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
+ <tr>
+ <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
+ <td width="50%"><?php echo tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif'); ?></td>
+ </tr>
+ </table></td>
+ </tr>
+ <tr>
+ <td align="center" width="25%" class="checkoutBarFrom"><?php echo CHECKOUT_BAR_DELIVERY; ?></td>
+ <td align="center" width="25%" class="checkoutBarFrom"><?php echo CHECKOUT_BAR_PAYMENT; ?></td>
+ <td align="center" width="25%" class="checkoutBarFrom"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td>
+ <td align="center" width="25%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_FINISHED; ?></td>
+ </tr>
+</table>
+
+</form>
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname" id="added"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules">modules</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/checkout">checkout</a><br /></span>
<div class="fileheader" id="added"><big><b>success.php</b></big> <small id="info">added at <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/checkout/success.php?rev=1.1&content-type=text/vnd.viewcvs-markup">1.1</a></small></div>
<pre class="diff"><small id="info">diff -N success.php
--- /dev/null Wed Mar 30 02:11:26 2005
+++ /tmp/cvsAAA0haqFa Wed Mar 30 02:11:28 2005
@@ -0,0 +1,60 @@
</small></pre><pre class="diff" id="added">+<?php
+/*
+ $Id$
+
+ osCommerce, Open Source E-Commerce Solutions
+ http://www.oscommerce.com
+
+ Copyright (c) 2005 osCommerce
+
+ Released under the GNU General Public License
+*/
+
+ class osC_Checkout_Success {
+
+/* Public variables */
+
+ var $page_contents = 'checkout_success.php';
+
+/* Private variables */
+
+ var $_module = 'success';
+
+/* Class constructor */
+
+ function osC_Checkout_Success() {
+ global $osC_Services, $breadcrumb;
+
+ if ($osC_Services->isStarted('breadcrumb')) {
+ $breadcrumb->add(NAVBAR_TITLE_CHECKOUT_SUCCESS, tep_href_link(FILENAME_CHECKOUT, $this->_module, 'SSL'));
+ }
+
+ if ($_GET[$this->_module] == 'update') {
+ $this->_process();
+ }
+ }
+
+/* Public methods */
+
+ function getPageContentsFile() {
+ return $this->page_contents;
+ }
+
+/* Private methods */
+
+ function _process() {
+ $notify_string = 'action=notify&';
+ $notify = (isset($_POST['notify']) ? $_POST['notify'] : array());
+
+ if (!is_array($notify)) $notify = array($notify);
+
+ for ($i=0, $n=sizeof($notify); $i<$n; $i++) {
+ $notify_string .= 'notify[]=' . $notify[$i] . '&';
+ }
+
+ if (strlen($notify_string) > 0) $notify_string = substr($notify_string, 0, -1);
+
+ tep_redirect(tep_href_link(FILENAME_DEFAULT, $notify_string));
+ }
+ }
+?>
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.9</small></center>
</body></html>
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click