WebsiteBaker 2.13.8 is now available!
R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WBhttps://forum.websitebaker.org/index.php/topic,32355.0.html
//Information about the Customers Orders in the Customer Profile.//Created by ChochkoBG//Version 1.0// Connecting to the DataBase. Using Manual Defined variables to connect. (I'm not sure that you can use WB Connect Method).$con=mysqli_connect("host","user","password","database");// Checking the connection.if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error();}// Take the Results from the Selected DB Tables.$result = mysqli_query($con,"SELECT * FROM ws_mod_bakery_customer WHERE cust_email = '".$wb->get_email()."'");$result_item = mysqli_query($con,"SELECT * FROM ws_mod_bakery_order");echo "<div align='center'><table border='1'><tr><th>№</th><th>Shipping</th><th>Order Status</th><th>Company</th><th>First Name</th><th>Last Name</th><th>Address</th><th>City</th><th>Country</th><th>ZIP Code</th><th>E-Mail</th><th>Phone number</th><th>SKU</th></tr></div>";while($row = mysqli_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row['order_id'] . "</td>"; echo "<td>" . $row['submitted'] . "</td>"; echo "<td>" . $row['status'] . "</td>"; echo "<td>" . $row['cust_company'] . "</td>"; echo "<td>" . $row['cust_first_name'] . "</td>"; echo "<td>" . $row['cust_last_name'] . "</td>"; echo "<td>" . $row['cust_street'] . "</td>"; echo "<td>" . $row['cust_city'] . "</td>"; echo "<td>" . $row['cust_country'] . "</td>"; echo "<td>" . $row['cust_zip'] . "</td>"; echo "<td>" . $row['cust_email'] . "</td>"; echo "<td>" . $row['cust_phone'] . "</td>"; while($row = mysqli_fetch_array($result_item)) { echo "<td>" . $row['sku'] . "</td>"; echo "</tr>";}}echo "</table>";mysqli_close($con);
//Information about the Customers Orders in the Customer Profile.//Created by ChochkoBG//Version 1.0// Connecting to the DataBase. Using Manual Defined variables to connect.$con=mysqli_connect("host","user","password","DB_NAME");// Checking the connection.if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error();}// Take the Results from the Selected DB Tables.$result = mysqli_query($con,"SELECT * FROM ws_mod_bakery_customerINNER JOIN ws_mod_bakery_orderON ws_mod_bakery_order.order_id = ws_mod_bakery_customer.order_idWHERE cust_email = '".$wb->get_email()."'");echo "<div align='center'><table border='1'><tr><th>№</th><th>First Name</th><th>Last Name</th><th>E-Mail</th><th>Company</th><th>Country</th><th>Address</th><th>City</th><th>ZIP Code</th><th>Phone</th><th>Payment Method</th><th>SKU</th><th>Price</th><th><font color='red'>Order Status</font></th></tr></div>";while($row = mysqli_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row['order_id'] . "</td>"; echo "<td>" . $row['cust_first_name'] . "</td>"; echo "<td>" . $row['cust_last_name'] . "</td>"; echo "<td>" . $row['cust_email'] . "</td>"; echo "<td>" . $row['cust_company'] . "</td>"; echo "<td>" . $row['cust_country'] . "</td>"; echo "<td>" . $row['cust_street'] . "</td>"; echo "<td>" . $row['cust_city'] . "</td>"; echo "<td>" . $row['cust_zip'] . "</td>"; echo "<td>" . $row['cust_phone'] . "</td>"; echo "<td>" . $row['submitted'] . "</td>"; echo "<td>" . $row['sku'] . "</td>"; echo "<td>" . $row['price'] . "</td>"; echo "<td>" . $row['status'] . "</td>"; echo "</tr>";}echo "</table>";mysqli_close($con);
echo "<div align='center'><table border='1'>
echo "<table class='shoporders'>
table.shoporders th { background-color:#039; color:#fff;}
//Information about the Customers Orders in the Customers Profile.//Created by ChochkoBG//Version 1.0// Prevent this file from being accessed directlyif (defined('WB_PATH') == false) { exit("Cannot access this file directly"); }// Get some default valuesrequire_once(WB_PATH.'/modules/bakery/config.php');// Take the Results from the Selected DB Tables.$result = $database->query("SELECT * FROM ws_mod_bakery_customerINNER JOIN ws_mod_bakery_orderON ws_mod_bakery_order.order_id = ws_mod_bakery_customer.order_idWHERE cust_email = '".$wb->get_email()."'");echo "<table class='profileorders'><tr><th>№</th><th>First Name</th><th>Last Name</th><th>E-Mail</th><th>Company</th><th>Country</th><th>Address</th><th>City</th><th>ZIP Code</th><th>Phone</th><th>Payment Method</th><th>SKU</th><th>Price</th><th>Status</th></tr>";while ($row = $result->fetchRow()) { echo "<tr>"; echo "<td>" . $row['order_id'] . "</td>"; echo "<td>" . $row['cust_first_name'] . "</td>"; echo "<td>" . $row['cust_last_name'] . "</td>"; echo "<td>" . $row['cust_email'] . "</td>"; echo "<td>" . $row['cust_company'] . "</td>"; echo "<td>" . $row['cust_country'] . "</td>"; echo "<td>" . $row['cust_street'] . "</td>"; echo "<td>" . $row['cust_city'] . "</td>"; echo "<td>" . $row['cust_zip'] . "</td>"; echo "<td>" . $row['cust_phone'] . "</td>"; echo "<td>" . $row['submitted'] . "</td>"; echo "<td>" . $row['sku'] . "</td>"; echo "<td>" . $row['price'] . "</td>"; echo "<td><font color='red'>" . $row['status'] . "</font></td>"; echo "</tr>";}echo "</table>";
table.profileorders { margin-left:auto; margin-right:auto;}table.profileorders th { filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#d5e3e4', endColorstr='#b3c8cc',GradientType=0 ); position: relative; z-index: -1;}table.profileorders td { filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ebecda', endColorstr='#ceceb7',GradientType=0 ); position: relative; z-index: -1;}table.profileorders { font-family: verdana,arial,sans-serif; font-size:11px; color:#333333; border-width: 1px; border-color: #999999; border-collapse: collapse;}table.profileorders th { padding: 0px; background: #d5e3e4; background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2Q1ZTNlNCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjQwJSIgc3RvcC1jb2xvcj0iI2NjZGVlMCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNiM2M4Y2MiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); background: -moz-linear-gradient(top, #d5e3e4 0%, #ccdee0 40%, #b3c8cc 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#d5e3e4), color-stop(40%,#ccdee0), color-stop(100%,#b3c8cc)); background: -webkit-linear-gradient(top, #d5e3e4 0%,#ccdee0 40%,#b3c8cc 100%); background: -o-linear-gradient(top, #d5e3e4 0%,#ccdee0 40%,#b3c8cc 100%); background: -ms-linear-gradient(top, #d5e3e4 0%,#ccdee0 40%,#b3c8cc 100%); background: linear-gradient(to bottom, #d5e3e4 0%,#ccdee0 40%,#b3c8cc 100%); border: 1px solid #999999;}table.profileorders td { padding: 0px; background: #ebecda; background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ViZWNkYSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjQwJSIgc3RvcC1jb2xvcj0iI2UwZTBjNiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNjZWNlYjciIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); background: -moz-linear-gradient(top, #ebecda 0%, #e0e0c6 40%, #ceceb7 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ebecda), color-stop(40%,#e0e0c6), color-stop(100%,#ceceb7)); background: -webkit-linear-gradient(top, #ebecda 0%,#e0e0c6 40%,#ceceb7 100%); background: -o-linear-gradient(top, #ebecda 0%,#e0e0c6 40%,#ceceb7 100%); background: -ms-linear-gradient(top, #ebecda 0%,#e0e0c6 40%,#ceceb7 100%); background: linear-gradient(to bottom, #ebecda 0%,#e0e0c6 40%,#ceceb7 100%); border: 1px solid #999999;}table.profileorders th p{ margin:0px; padding:8px; border-top: 1px solid #eefafc; border-bottom:0px; border-left: 1px solid #eefafc; border-right:0px;}table.profileorders td p{ margin:0px; padding:8px; border-top: 1px solid #fcfdec; border-bottom:0px; border-left: 1px solid #fcfdec;; border-right:0px;}