Jump to content

Craptacular

Members
  • Posts

    27
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling
  • Location
    Vancouver, WA

Craptacular's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. It was a stupid DB issue. The script wasn't breaking anything. Thanks for all the help and suggestions for cleaning this feature up!
  2. Here are some updated files. I haven't applied the edits suggested yet but have reduced the extra lines of code by keeping only the relevant code in the files. Thanks for having a look! shippingQuote.php reply.php single.php
  3. Okay. But when I put the debugging code in there, nothing happens so it should be populating the DB. Hmmm. Well thanks for all the work and help with getting this thing looking less cluttered and running more efficiently!
  4. Hey guys, So I am adding to an already existing Shipping quote form and backend reply system. I basically just added one new item, tested if it was working on the front and backend (which it was), and then proceeded to add the other new items. BUT for some reason the database is not being populated. HOWEVER when the automated email is sent after the customer asks for a quote via this system, it shows all the correct information, but yet the database isn't showing anything, and the backend reply system doesn't show that they selected an item to get a quote on (if they select one, or all of the 6 new items). I know it's something silly I'm missing, but I am just not seeing it, and I have spent at least two days trying to find the issue! PLEASE HELP me! Thanks so much! (Sorry it's so much code in this post, I wanted to make sure I included it all so you can see what's all going on. I am only having issues with the Gun Vault Products GV2000S, GVB2000, GV3000, GVB3000, NV300, BB3000, the rest of the items work perfectly. I have attached the scripts.) So here is the HTML: <div class="gunvaults" style="float: left; margin-bottom: 1em;"> <!--BEGIN GUN VAULTS--> <h4 style="font-weight: bold; text-decoration: underline; margin-left: 1em;">Gun Vault Products</h4> <div class="ship-wrap"> <div class="checkbox"><label for="sv500"><input type="checkbox" name="sv500" id="sv500" /> Model SV500</label></div> <div id="quantity-21" class="quantity"><label for="quantity-sv500">Quantity: </label> <select name="quantity-sv500" id="quantity-sv500"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5+">5+</option> </select></div> </div> <div class="ship-wrap"> <div class="checkbox"><label for="svb500"><input type="checkbox" name="svb500" id="svb500" /> Model SVB500</label></div> <div id="quantity-22" class="quantity"><label for="quantity-svb500">Quantity: </label> <select name="quantity-svb500" id="quantity-svb500"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5+">5+</option> </select></div> </div> <div class="ship-wrap"> <div class="checkbox"><label for="gv1000s"><input type="checkbox" name="gv1000s" id="gv1000s" /> Model GV1000S</label></div> <div id="quantity-23" class="quantity"><label for="quantity-gv1000s">Quantity: </label> <select name="quantity-gv1000s" id="quantity-gv1000s"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5+">5+</option> </select></div> </div> <div class="ship-wrap"> <div class="checkbox"><label for="gv1000d"><input type="checkbox" name="gv1000d" id="gv1000d" /> Model GV1000D</label></div> <div id="quantity-24" class="quantity"><label for="quantity-gv1000d">Quantity: </label> <select name="quantity-gv1000d" id="quantity-gv1000d"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5+">5+</option> </select></div> </div> <div class="ship-wrap"> <div class="checkbox"><label for="gv2000s"><input type="checkbox" name="gv2000s" id="gv2000s" /> Model GV2000S</label></div> <div id="quantity-25" class="quantity"><label for="quantity-gv2000s">Quantity: </label> <select name="quantity-gv2000s" id="quantity-gv2000s"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5+">5+</option> </select></div> </div> <div class="ship-wrap"> <div class="checkbox"><label for="gvb2000"><input type="checkbox" name="gvb2000" id="gvb2000" /> Model GVB2000</label></div> <div id="quantity-26" class="quantity"><label for="quantity-gvb2000">Quantity: </label> <select name="quantity-gvb2000" id="quantity-gvb2000"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5+">5+</option> </select></div> </div> <div class="ship-wrap"> <div class="checkbox"><label for="gv3000s"><input type="checkbox" name="gv3000s" id="gv3000s" /> Model GV3000S</label></div> <div id="quantity-27" class="quantity"><label for="quantity-gv3000s">Quantity: </label> <select name="quantity-gv3000s" id="quantity-gv3000s"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5+">5+</option> </select></div> </div> <div class="ship-wrap"> <div class="checkbox"><label for="gvb3000"><input type="checkbox" name="gvb3000" id="gvb3000" /> Model GVB3000</label></div> <div id="quantity-28" class="quantity"><label for="quantity-gvb3000">Quantity: </label> <select name="quantity-gvb3000" id="quantity-gvb3000"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5+">5+</option> </select></div> </div> <div class="ship-wrap"> <div class="checkbox"><label for="nv300"><input type="checkbox" name="nv300" id="nv300" /> Model NV300</label></div> <div id="quantity-29" class="quantity"><label for="quantity-nv300">Quantity: </label> <select name="quantity-nv300" id="quantity-nv300"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5+">5+</option> </select></div> </div> <div class="ship-wrap"> <div class="checkbox"><label for="bb3000"><input type="checkbox" name="bb3000" id="bb3000" /> Model BB3000</label></div> <div id="quantity-30" class="quantity"><label for="quantity-bb3000">Quantity: </label> <select name="quantity-bb3000" id="quantity-bb3000"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5+">5+</option> </select></div> </div> </div><!--/gun vaults--> </div><!--/shipping models--> The script that talks with the HTML shipping form (the above html) is called shippingQuote.php, and the script for displaying the requested items (the backend quoting system) and the backend replying area is called single.php and then the reply script after the quote is complete is called reply.php. (Now the following scripts have ALL products included, but I am only having issues with the Gun Vault Products: GV2000S, GVB2000, GV3000, GVB3000, NV300, BB3000). shippingQuote.php single.php reply.php
  5. Yeah... I was retarded and pasted the code twice. I am uploading the updated files now. Derp on me! It's been a long few days!
  6. Thanks you Psycho and mac_gyver. I inherited this code and haven't gotten around to the simplification you are talking about, because I totally agree!
  7. Hey guys, So I am adding to an already existing Shipping quote form and backend reply system. I basically just added one new item, tested if it was working on the front and backend (which it was), and then proceeded to add the other new items. BUT for some reason the database is not being populated. HOWEVER when the automated email is sent after the customer asks for a quote via this system, it shows all the correct information, but yet the database isn't showing anything, and the backend reply system doesn't show that they selected an item to get a quote on (if they select one, or all of the 6 new items). I know it's something silly I'm missing, but I am just not seeing it, and I have spent at least two days trying to find the issue! PLEASE HELP me! Thanks so much! (Sorry it's so much code in this post, I wanted to make sure I included it all so you can see what's all going on. I am only having issues with the Gun Vault Products GV2000S, GVB2000, GV3000, GVB3000, NV300, BB3000, the rest of the items work perfectly. I have attached the scripts.) So here is the HTML: <div class="ship-wrap"> <div class="checkbox"><label for="gv2000s"><input type="checkbox" name="gv2000s" id="gv2000s" /> Model GV2000S</label></div> <div id="quantity-25" class="quantity"><label for="quantity-gv2000s">Quantity: </label> <select name="quantity-gv2000s" id="quantity-gv2000s"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5+">5+</option> </select></div> </div> <div class="ship-wrap"> <div class="checkbox"><label for="gvb2000"><input type="checkbox" name="gvb2000" id="gvb2000" /> Model GVB2000</label></div> <div id="quantity-26" class="quantity"><label for="quantity-gvb2000">Quantity: </label> <select name="quantity-gvb2000" id="quantity-gvb2000"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5+">5+</option> </select></div> </div> <div class="ship-wrap"> <div class="checkbox"><label for="gv3000s"><input type="checkbox" name="gv3000s" id="gv3000s" /> Model GV3000S</label></div> <div id="quantity-27" class="quantity"><label for="quantity-gv3000s">Quantity: </label> <select name="quantity-gv3000s" id="quantity-gv3000s"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5+">5+</option> </select></div> </div> <div class="ship-wrap"> <div class="checkbox"><label for="gvb3000"><input type="checkbox" name="gvb3000" id="gvb3000" /> Model GVB3000</label></div> <div id="quantity-28" class="quantity"><label for="quantity-gvb3000">Quantity: </label> <select name="quantity-gvb3000" id="quantity-gvb3000"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5+">5+</option> </select></div> </div> <div class="ship-wrap"> <div class="checkbox"><label for="nv300"><input type="checkbox" name="nv300" id="nv300" /> Model NV300</label></div> <div id="quantity-29" class="quantity"><label for="quantity-nv300">Quantity: </label> <select name="quantity-nv300" id="quantity-nv300"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5+">5+</option> </select></div> </div> <div class="ship-wrap"> <div class="checkbox"><label for="bb3000"><input type="checkbox" name="bb3000" id="bb3000" /> Model BB3000</label></div> <div id="quantity-30" class="quantity"><label for="quantity-bb3000">Quantity: </label> <select name="quantity-bb3000" id="quantity-bb3000"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5+">5+</option> </select></div> The script that talks with the shipping form (the above html) is called single.php and the script for displaying the requested items (the backend quoting system) is called reply.php. (Now the following scripts have ALL products included, but I am only having issues with the Gun Vault Products: GV2000S, GVB2000, GV3000, GVB3000, NV300, BB3000). single.php reply.php
  8. Hey! Thanks! I am downloading it now so I can start playing!
  9. I know it's a lot, but I wanted to make sure everyone had the required information to maybe see what I'm doing. Thanks for the response! The problem with debugging is that it just says it's empty but the data is in the database.
  10. Thanks for the response. Yes all of the information is populating in the database. The weird thing is is that the first part: $model = "Shipping quote for $qt8e of Model T8-E.<br />"; is bringing all of the quantity and model and displaying it (left side of the page in the first image). But the second part of that part of the script: $model_quote = printInvoice("Residential - Curbside/Garage", "T8-E", 399, $qt8e, $t8e_quote_residence, $total); $model_quote = $model_quote . printInvoice("Business - Lift Gate Required", "T8-E", 399, $qt8e, $t8e_quote_business1, $total); $model_quote = $model_quote . printInvoice("Business - No Lift Gate Required", "T8-E", 399, $qt8e, $t8e_quote_business, $total); $model_quote = $model_quote . printInvoice("Truck Terminal*", "T8-E", 399, $qt8e, $t8e_quote_terminal, $total); $model_quote = $model_quote . printInvoice("Warehouse Pickup - Vancouver, WA", "T8-E", 399, $qt8e, 0.01, $total); $model_quote = $model_quote . "<tr><td> </td><td> </td><td> </td><td> </td><td> </td></tr>"; isn't displaying the same data. That's what I don't get. Thanks for the help, though! (right side in the first image)
  11. I have a shipping quote form that is adding information to a database just fine. Then on the back end I have a reply system for the employees to give the shipping quote. This is where I am having issues. The first part works and shows the replier the users contact info and requested product and quantity wanted, but the second part for the quoting doesn't show any of the form for quoting and says that the user didn't select a model or quantity. (Image included) I can't seem to figure out why. And the weird part is that all the other ones work for the other products, just fine... Any ideas. Oh andthe information from the user does show up in the database. The issue is with the t8e. Any help would be appreciated. Thanks! This is what the outcome for the T8-E is in the quoting system: This is what it's supposed to look like: require('config.php'); // from the form newest version $id = trim(strip_tags($_POST['reply-id'])); $status = trim(strip_tags($_POST['status'])); //SERIES T8 $t8_quote_terminal = trim(strip_tags($_POST['t8-quote-terminal'])); $t8_quote_business = trim(strip_tags($_POST['t8-quote-business'])); $t8_quote_business1 = trim(strip_tags($_POST['t8-quote-business1'])); $t8_quote_residence = trim(strip_tags($_POST['t8-quote-residence'])); $t8e_quote_terminal = trim(strip_tags($_POST['t8e-quote-terminal']));//This is the product having issues $t8e_quote_business = trim(strip_tags($_POST['t8e-quote-business'])); $t8e_quote_business1 = trim(strip_tags($_POST['t8e-quote-business1'])); $t8e_quote_residence = trim(strip_tags($_POST['t8e-quote-residence'])); //SERIES T14 $t14_quote_terminal = trim(strip_tags($_POST['t14-quote-terminal'])); $t14_quote_business = trim(strip_tags($_POST['t14-quote-business'])); $t14_quote_business1 = trim(strip_tags($_POST['t14-quote-business1'])); $t14_quote_residence = trim(strip_tags($_POST['t14-quote-residence'])); $ups = $_POST['ups']; $conway = $_POST['conway']; $yrc = $_POST['yrc']; $reddaway = $_POST['reddaway']; $terminal_name = trim(strip_tags($_POST['terminal_name'])); $terminal_location = trim(strip_tags($_POST['terminal_location'])); $estimated_time = trim(strip_tags($_POST['estimated_time'])); $replier = trim(strip_tags($_POST['replier'])); $reply_comments = trim(strip_tags($_POST['reply_comments'])); //Functions function printInvoice($shipping_method, $model, $model_price, $qty, $shipping_amount, $total) { $shipping_amount = str_replace("$", "", $shipping_amount); settype($shipping_amount, "float"); if (empty($shipping_amount)) { return false; } if ($shipping_amount === 0.01) { $shipping_amount = 0; } settype($qty, "integer"); $total = $shipping_amount+($model_price*$qty); settype($total, "float"); return "<tr><td>".$model."</td><td>".$shipping_method."</td><td>$".$model_price."</td><td>".$qty."</td><td>$".$shipping_amount."</td><td>$".$total."</td></tr>"; } $invoice_header = "<table cellpadding=\"8\" class=\"invoice\"><tr><th><b>Model</b></th><th><b>Delivery Method</b></th><th><b>Price</b></th><th><b>Qty</b></th><th><b>Shipping</b></th><th><b>Total</b></th></tr>"; date_default_timezone_set('America/Los_Angeles'); $the_date = date("g:ia, F j, Y"); $reply_date = date("F j, Y"); // Connect to Database to store information $mysqli = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME); if (mysqli_connect_errno()) { printf("Connect Failed: %s\n", mysqli_connect_error()); } else { $query = "SELECT * FROM tracker WHERE ID = $id"; $fullres = mysqli_query($mysqli, $query); $newArray = mysqli_fetch_array($fullres, MYSQL_ASSOC); $name = $newArray['Name']; $email = $newArray['Email']; $address = $newArray['Address']; $city = $newArray['City']; $state = $newArray['State']; $zip = $newArray['Zip']; $telephone = $newArray['Telephone']; $source = $newArray['Source']; //SERIES T8 $t8 = $newArray['t8']; $qt8 = $newArray['QT8']; $t8e = $newArray['t8e']; $qt8e = $newArray['QT8e']; //SERIES T14 $t14 = $newArray['t14']; $qt14 = $newArray['QT14']; $local = $newArray['LocalPickup']; $terminal = $newArray['Terminal']; $business1 = $newArray['Business1']; $business2 = $newArray['Business2']; $curbside = $newArray['Curbside']; $comments = $newArray['Comments']; $reply = $newArray['Reply']; $date = $newArray['Date']; mysqli_close($mysqli); } $model = ""; $model_quote = ""; //Begin Quote form //SERIES T8 if (!empty($t8e)) {$model = "Shipping quote for $qt8e of Model T8-E.<br />"; $model_quote = printInvoice("Residential - Curbside/Garage", "T8-E", 399, $qt8e, $t8e_quote_residence, $total); $model_quote = $model_quote . printInvoice("Business - Lift Gate Required", "T8-E", 399, $qt8e, $t8e_quote_business1, $total); $model_quote = $model_quote . printInvoice("Business - No Lift Gate Required", "T8-E", 399, $qt8e, $t8e_quote_business, $total); $model_quote = $model_quote . printInvoice("Truck Terminal*", "T8-E", 399, $qt8e, $t8e_quote_terminal, $total); $model_quote = $model_quote . printInvoice("Warehouse Pickup - Vancouver, WA", "T8-E", 399, $qt8e, 0.01, $total); $model_quote = $model_quote . "<tr><td> </td><td> </td><td> </td><td> </td><td> </td></tr>"; } if (!empty($t8)) {$model = "Shipping quote for $qt8 of Model T8.<br />";//This part works, the rest for this part of the script for the t8e does not work $model_quote = printInvoice("Residential - Curbside/Garage", "T8", 399, $qt8, $t8_quote_residence, $total); $model_quote = $model_quote . printInvoice("Business - Lift Gate Required", "T8", 399, $qt8, $t8_quote_business1, $total); $model_quote = $model_quote . printInvoice("Business - No Lift Gate Required", "T8", 399, $qt8, $t8_quote_business, $total); $model_quote = $model_quote . printInvoice("Truck Terminal*", "T8", 399, $qt8, $t8_quote_terminal, $total); $model_quote = $model_quote . printInvoice("Warehouse Pickup - Vancouver, WA", "T8", 399, $qt8, 0.01, $total); $model_quote = $model_quote . "<tr><td> </td><td> </td><td> </td><td> </td><td> </td></tr>"; } //SERIES T14 if (!empty($t14)) {$model = $model . "Shipping quote for $qt14 of Model T14.<br />"; $model_quote = $model_quote . printInvoice("Residential - Curbside/Garage", "T14", 479, $qt14, $t14_quote_residence, $total); $model_quote = $model_quote . printInvoice("Business - Lift Gate Required", "T14", 479, $qt14, $t14_quote_business1, $total); $model_quote = $model_quote . printInvoice("Business - No Lift Gate Required", "T14", 479, $qt14, $t14_quote_business, $total); $model_quote = $model_quote . printInvoice("Truck Terminal*", "T14", 479, $qt14, $t14_quote_terminal, $total); $model_quote = $model_quote . printInvoice("Warehouse Pickup - Vancouver, WA", "T14", 479, $qt14, 0.01, $total); $model_quote = $model_quote . "<tr><td> </td><td> </td><td> </td><td> </td><td> </td></tr>"; } if ($model == "") {$model = "$name did not specify a model or quantity.<br />";} $model_quote = $model_quote . "</table>"; $shipping = ""; if (!empty($local)) {$shipping = "<br />Local Pickup";} if (!empty($terminal)) {$shipping = $shipping . "<br />Terminal Pickup";} if (!empty($business1)) {$shipping = $shipping . "<br />Business Delivery (Lift Gate Not Required)";} if (!empty($business2)) {$shipping = $shipping . "<br />Business Delivery (Lift Gate Required)";} if (!empty($curbside)) {$shipping = $shipping . "<br />Residential Delivery (Curbside)";} if (!empty($house)) {$shipping = $shipping . "<br />In-House Delivery";} if ($shipping == "") {$shipping = "<br />No Shipping Method Selected.";} if ($terminal_name !== "" && $terminal_location !== "") { $terminal_info = "<p>*The quoted terminal price is for the $terminal_name terminal in $terminal_location.</p>"; } else { $terminal_info = ""; }
  12. YEP! I was wrong... Tablesorter works perfectly. I got it working. It wasn't working because I was rushing to get it done, (on a Friday) and called the js before I included the librairies! Der! My bad guys. Thanks for the replies, folks!
  13. Hi, I am trying to make my search results table sortable. The content is obviously dynamic, so how would I do this? Tablesorter.js does not work… I am using CodeIgniter... Any help would be fantastic! Thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.