[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&amp;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&amp;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&amp;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">+&lt;?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-&gt;query('select global_product_notifications from :table_customers_info where customers_info_id =:customers_info_id');
+  $Qglobal-&gt;bindTable(':table_customers_info', TABLE_CUSTOMERS_INFO);
+  $Qglobal-&gt;bindInt(':customers_info_id', $osC_Customer-&gt;id);
+  $Qglobal-&gt;execute();
+
+  if ($Qglobal-&gt;valueInt('global_product_notifications') !== 1) {
+    $Qorder = $osC_Database-&gt;query('select orders_id from :table_orders where customers_id = :customers_id order by date_purchased desc limit 1');
+    $Qorder-&gt;bindTable(':table_orders', TABLE_ORDERS);
+    $Qorder-&gt;bindInt(':customers_id', $osC_Customer-&gt;id);
+    $Qorder-&gt;execute();
+
+    $Qproducts = $osC_Database-&gt;query('select products_id, products_name from :table_orders_products where orders_id = :orders_id order by products_name');
+    $Qproducts-&gt;bindTable(':table_orders_products', TABLE_ORDERS_PRODUCTS);
+    $Qproducts-&gt;bindInt(':orders_id', $Qorder-&gt;valueInt('orders_id'));
+    $Qproducts-&gt;execute();
+
+    $products_array = array();
+    while ($Qproducts-&gt;next()) {
+      $products_array[] = array('id' =&gt; $Qproducts-&gt;valueInt('products_id'),
+                                'text' =&gt; $Qproducts-&gt;value('products_name'));
+    }
+  }
+?&gt;
+
+&lt;div class="pageHeading"&gt;
+  &lt;h1&gt;&lt;?php echo HEADING_TITLE_CHECKOUT_SUCCESS; ?&gt;&lt;/h1&gt;
+&lt;/div&gt;
+
+&lt;form name="order" action="&lt;?php echo tep_href_link(FILENAME_CHECKOUT, 'success=update', 'SSL'); ?&gt;" method="post"&gt;
+
+&lt;div&gt;
+  &lt;div style="float: left;"&gt;&lt;?php echo tep_image(DIR_WS_IMAGES . 'table_background_man_on_board.gif', HEADING_TITLE_CHECKOUT_SUCCESS); ?&gt;&lt;/div&gt;
+
+  &lt;div style="padding-top: 30px;"&gt;
+    &lt;p&gt;&lt;?php echo TEXT_SUCCESS; ?&gt;&lt;/p&gt;
+
+    &lt;p&gt;
+&lt;?php
+  if ($global['global_product_notifications'] != '1') {
+    echo TEXT_NOTIFY_PRODUCTS . '&lt;br&gt;&lt;p class="productsNotifications"&gt;';
+
+    $products_displayed = array();
+    for ($i=0, $n=sizeof($products_array); $i&lt;$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'] . '&lt;br&gt;';
+        $products_displayed[] = $products_array[$i]['id'];
+      }
+    }
+
+    echo '&lt;/p&gt;';
+  } else {
+    echo TEXT_SEE_ORDERS . '&lt;br&gt;&lt;br&gt;' . TEXT_CONTACT_STORE_OWNER;
+  }
+?&gt;
+    &lt;/p&gt;
+
+    &lt;h1 style="text-align: center;"&gt;&lt;?php echo TEXT_THANKS_FOR_SHOPPING; ?&gt;&lt;/h1&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class="submitFormButtons" style="text-align: right;"&gt;
+  &lt;?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?&gt;
+&lt;/div&gt;
+
+&lt;table border="0" width="100%" cellspacing="0" cellpadding="0"&gt;
+  &lt;?php if (DOWNLOAD_ENABLED == 'true') include('includes/modules/downloads.php'); ?&gt;
+&lt;/table&gt;
+
+&lt;table border="0" width="100%" cellspacing="0" cellpadding="0"&gt;
+  &lt;tr&gt;
+    &lt;td width="25%"&gt;&lt;table border="0" width="100%" cellspacing="0" cellpadding="0"&gt;
+      &lt;tr&gt;
+        &lt;td width="50%" align="right"&gt;&lt;?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?&gt;&lt;/td&gt;
+        &lt;td width="50%"&gt;&lt;?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?&gt;&lt;/td&gt;
+      &lt;/tr&gt;
+    &lt;/table&gt;&lt;/td&gt;
+    &lt;td width="25%"&gt;&lt;?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?&gt;&lt;/td&gt;
+    &lt;td width="25%"&gt;&lt;?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?&gt;&lt;/td&gt;
+    &lt;td width="25%"&gt;&lt;table border="0" width="100%" cellspacing="0" cellpadding="0"&gt;
+      &lt;tr&gt;
+        &lt;td width="50%"&gt;&lt;?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?&gt;&lt;/td&gt;
+        &lt;td width="50%"&gt;&lt;?php echo tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif'); ?&gt;&lt;/td&gt;
+      &lt;/tr&gt;
+    &lt;/table&gt;&lt;/td&gt;
+  &lt;/tr&gt;
+  &lt;tr&gt;
+    &lt;td align="center" width="25%" class="checkoutBarFrom"&gt;&lt;?php echo CHECKOUT_BAR_DELIVERY; ?&gt;&lt;/td&gt;
+    &lt;td align="center" width="25%" class="checkoutBarFrom"&gt;&lt;?php echo CHECKOUT_BAR_PAYMENT; ?&gt;&lt;/td&gt;
+    &lt;td align="center" width="25%" class="checkoutBarFrom"&gt;&lt;?php echo CHECKOUT_BAR_CONFIRMATION; ?&gt;&lt;/td&gt;
+    &lt;td align="center" width="25%" class="checkoutBarCurrent"&gt;&lt;?php echo CHECKOUT_BAR_FINISHED; ?&gt;&lt;/td&gt;
+  &lt;/tr&gt;
+&lt;/table&gt;
+
+&lt;/form&gt;
</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&amp;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">+&lt;?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-&gt;isStarted('breadcrumb')) {
+        $breadcrumb-&gt;add(NAVBAR_TITLE_CHECKOUT_SUCCESS, tep_href_link(FILENAME_CHECKOUT, $this-&gt;_module, 'SSL'));
+      }
+
+      if ($_GET[$this-&gt;_module] == 'update') {
+        $this-&gt;_process();
+      }
+    }
+
+/* Public methods */
+
+    function getPageContentsFile() {
+      return $this-&gt;page_contents;
+    }
+
+/* Private methods */
+
+    function _process() {
+      $notify_string = 'action=notify&amp;';
+      $notify = (isset($_POST['notify']) ? $_POST['notify'] : array());
+
+      if (!is_array($notify)) $notify = array($notify);
+
+      for ($i=0, $n=sizeof($notify); $i&lt;$n; $i++) {
+        $notify_string .= 'notify[]=' . $notify[$i] . '&amp;';
+      }
+
+      if (strlen($notify_string) &gt; 0) $notify_string = substr($notify_string, 0, -1);
+
+      tep_redirect(tep_href_link(FILENAME_DEFAULT, $notify_string));
+    }
+  }
+?&gt;
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -&gt; 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