Jump to content

ImJustBrndn

Members
  • Posts

    28
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ImJustBrndn's Achievements

Member

Member (2/5)

0

Reputation

  1. I've tried searching for this, but couldn't find my exact problem. I have a shopping cart system setup which includes two pages after the cart.php, which are address.php and summary.php. The address.php page takes all the customers information and then forwards it into summary.php which displays the information and submits it in an email to me. I want it so that if they don't fill out one of the forms in address.php it won't let them continue onto summary.php. When they go to summary.php without filling in any information it sends me an e-mail and I just have a bunch of blank e-mails that are annoying. So I want it that if they don't fill it out and aren't ordering anything that address.php won't let them past without first filling in all the forms. Is there anyway to do this make it so that the fields are required and have to be filled in before it can continue onto the next page. Thanks in advance. B
  2. Thanks a lot guys you were all helpful I thought this was a php issue, but it's an apache issue. I used wildteen's approach via the .htaccess file. Thanks again. Brandon
  3. I'm curious as to how to hide file extensions in the browser's address bar. For example http://www.threadless.com/submit http://www.threadless.com/submit.php both take you to the same file, but if you go to the one without the .php, the .php never shows up. Can someone please tell me how to do this, I've searched and not been able to find it out. Thanks in advance guys, you rock. Brandon
  4. Mysql databases are available on my server and yes I store all the information in a session called "cart".
  5. I have a shopping cart system setup and I currently have it forwarding each order in an e-mail to myself. I would like to instead post the information to my database and then somehow create a template page (to look like an invoice) and be able to post all the information from the database for each order in this template. I'm a semi php beginner and could someone please point me in a good direction to start. Like posting information to a database instead of a form? Thanks in advance. Brandon
  6. That worked just fine. I did 3 and got 2.
  7. Thanks for the fast help. The first error is fixed, but the second one when I echo out totalvalue it displays the right amount, and when I do the coupon code it only shows -3. For some reason if I echo the totalvalue it shows up just fine, but if I input the coupon code I only get that -3 like it can't display the totalvalue right in the statement. I've been messing with this for hours and can't get it right. Brandon
  8. I'm having a problem with some of the code I'm using on my site, I keep getting two errors and can't for the life of me figure out how to fix them, any help would be greatly greatly appreciated. [b]Error 1[/b] When I try to insert a code to show the amount of items in my shopping cart I get the following error. [code] Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/content/t/h/e/theperk/html/index.php:6) in /home/content/t/h/e/theperk/html/index.php on line 57 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/content/t/h/e/theperk/html/index.php:6) in /home/content/t/h/e/theperk/html/index.php on line 57[/code] Page Coding (Where I Want To Insert It) [code]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Go Ape Shirts - The only shirts endorsed by the man in the yellow hat.</title> <style type="text/css"> <!-- body { margin-left: 00px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; background-image: url(bg2.jpg); } .style7 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; } .style9 {font-size: x-small} a:link { color: #543B14; } a:hover { color: #D08B54; } .style11 {font-size: 9px; font-family: Verdana, Arial, Helvetica, sans-serif; } .style15 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: medium; } .style16 {font-size: 9px; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: bold; } a:visited { color: #543B14; } a:active { color: #543B14; } --> </style></head> <body> <table width="750" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">   <tr>     <td><table width="100%" border="0" cellspacing="0" cellpadding="0">       <tr>         <?php include 'header.php'; ?>       </tr>       <tr>         <td colspan="2">&nbsp;</td>         </tr>       <tr>         <td colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">           <tr>             <td width="75%" height="38"><img src="new_button.jpg" width="145" height="25" /></td>             <td width="25%"><div align="center"><a href="cart.php" target="_self"><img src="shoppingcart.gif" width="120" height="29" border="0" /></a></div></td>           </tr>         </table></td>       </tr>       <tr>         <td colspan="2"><img src="divider_dot.jpg" width="750" height="5" /></td>       </tr>       <tr>         <td colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">           <tr>             <td width="100%"><table width="100%" border="0" cellspacing="0" cellpadding="5">               <tr>                 <td width="33%"><div align="center">                   <p><a href="products/007/"><img src="products/007/frontpage.gif" width="216" height="144" border="0" /></a><br />                       <span class="style7"><strong><a href="products/007/">Oh Nooo  </a></strong><br />                         <span class="style9">by<a href="about.php"> Justin Schrader  </a></span></span></p>                   </div></td>                 <td width="34%"><div align="center"><a href="products/008/"><img src="products/008/frontpage.gif" width="216" height="144" border="0" /></a><br />                   <span class="style7"><strong><a href="products/008/">Bad Day At The Office </a></strong><br />                         <span class="style9">by <a href="about.php">Erik Varusio </a></span></span></div></td>                 <td width="33%"><div align="center"><a href="products/009/"><img src="products/009/frontpage.gif" width="216" height="144" border="0" /></a><br />                   <span class="style7"><strong><a href="products/009/">Love Is Blind </a></strong><br />                         <span class="style9">by<a href="about.php"> John Mitchell </a><a href="about/johnmitchell.php"></a></span></span></div></td>               </tr>             </table></td>             </tr>           <tr>             <td>&nbsp;</td>           </tr>                     <tr>             <td><img src="news_button.jpg" width="205" height="25" /></td>           </tr>           <tr>             <td><img src="divider_dot.jpg" width="750" height="5" /></td>           </tr>           <tr>             <td><table width="100%" border="0" cellspacing="0" cellpadding="0">               <tr>                 <td width="8%" rowspan="4">&nbsp;</td>                 <td width="92%">&nbsp;</td>                 </tr>               <tr>                 <td><img src="news_header_30aug06.jpg" width="274" height="41" /></td>               </tr>               <tr>                 <td><blockquote>                   <p><span class="style11">by <a href="http://www.goapeshirts.com">GoApeShirts</a> on <a href="http://www.goapeshirts.com/news.php">Wednesday, August 30th, 2006<br />                     </a><span class="style15"><br />                   </span></span> <span class="style7">Welcome to the new Go Ape Shirts website. The new site has a lot of great features and a great new design. Be sure to check out our THREE new shirts printed this week, and as a little surprise we have HOODIES! The weather is getting a little cooler, so be sure to bundle yourself up in a Boo Boo Walker Hoodie. </span></p>                 </blockquote></td>               </tr>               <tr>                 <td>&nbsp;</td>               </tr>               <tr>                 <td>&nbsp;</td>                 <td><img src="news_header_16aug06.jpg" width="223" height="41" /></td>                 </tr>               <tr>                 <td>&nbsp;</td>                 <td><blockquote>                   <p><span class="style11">by <a href="http://www.goapeshirts.com">GoApeShirts</a> on <a href="http://www.goapeshirts.com/news.php">Monday, August 7th, 2006<br />                     </a><span class="style15"><br />                       </span></span> <span class="style7">I will be out of town August 8-14.  I am not sure if I will be able to answer  e-mails.  Any orders placed while I am gone will go out the 16th.  Also, keep an  eye out for 3 new designs coming out in a few weeks.  You can join the  newsletter up above so you can be notified via email when they are released.</span></p>                   </blockquote></td>               </tr>             </table></td>           </tr>           <tr>             <td>&nbsp;</td>           </tr>           <tr>             <td>&nbsp;</td>           </tr>           <tr>             <td><img src="divider_dot.jpg" width="750" height="5" /></td>           </tr>           <tr>             <td><table width="100%" border="0" cellspacing="0" cellpadding="5">               <tr>                 <?php include 'footer.php'; ?>                 </tr>             </table></td>           </tr>         </table></td>       </tr>     </table></td>   </tr> </table> </body> </html> [/code] Code To Insert [code]<? session_start(); // If no sessions has been started $_SESSION["cart"] equals null, thus showing the message no items. if (!isset($_SESSION["cart"])) { $_SESSION["cart"] = NULL; } $itemcount = count($_SESSION["cart"]); echo "You have <b>".$itemcount."</b> item(s) in your basket."; ?>[/code] [b]Error 2[/b] I'm trying to create a coupon system for my shopping cart where if the right word is forwarded from a form on the previos page it deducts 3.00 from the totalvalue. Well if I let the process run I get nothing, but if I echo out the values I either get the price as it is without the discount or just the discount itself (-3.00) as the total. Can someone see what I'm doing wrong. [code]<?php   $coupon = $_POST['coupon'];   $totalvalue = $_POST['totalvalue']; if ($coupon == "monkey") { $finalvalue = $totalvalue - 3.00; } else { echo "<td colspan=\"5\"><center><p>Unknown Coupon</p></center></td>"; } ?>[/code] Again, I know this is a big post, but thanks for taking a look and possibly helping. Brandon
  9. Thanks for all the great help, I'm almost there just having one slight problem. It now does the calculations as it should if someone inputs the code, but it only shows the finalvalue of being -3.... [code]<?php   $coupon = $_POST['coupon'];   $totalvalue = $_POST['totalvalue']; if ($coupon == "monkey") { $finalvalue = $totalvalue - 3.00; } else { echo "<td colspan=\"5\"><center><p>Unknown Coupon</p></center></td>"; } ?>[/code] The $finalvalue = $totalvalue - 3.00; the $totalvalue isn't displaying the forwarded value from the previous page in the formula, but if I echo it, it shows the value just fine, why won't it do it in the formula? Thanks again. Brandon
  10. OK, With your help I've come up with this, but I'm still getting an echo error on the two echo commands featured in the code. I would love to store the codes in the database and pull them out, but I wouldn't even know where to begin with any of that. [code]<?php   $coupon = echo $_POST['coupon'];   $totalvalue = echo $_POST["totalvalue"];   if ($coupon == "monkey") { $finalvalue = $totalvalue - 3.00; } else { echo "<td colspan=\"5\"><center><p>Unknown Coupon</p></center></td>"; } ?></p>[/code]
  11. I have a shopping cart system set up, and It forwards a few values such as the total from the cart -> shipping info -> verify -> paypal. I was wondering if there was anyway for me to put a form field on the shipping info page called "coupon" and then on the verify page have a statement like if coupon = pizza $totalvalue - 3.00 or something like that. Is that possible so that way if they put in a coupon code that I specify it will take off a specific amount, I've been trying to do this but it keeps giving me errors. [code]<?php     if ($coupon == monkey) { $finalvalue = $totalvalue - 3.00; } else { echo "<td colspan=\"5\"><center><p>Unknown Coupon</p></center></td>"; } ?>[/code] That's what I have probably not right. The field from the previous page being forwarded to this page is called "coupon". Thanks in advance. Brandon
  12. Ok, I've got an shopping cart system set up on my site right now. Right now I have it posting all the information in and email and sending it to a defined address. I would like to interm post the information to a database. Can someone please tell me how I go about this. I'm semi-new to php and don't have a clue. I would also like to assign a order number to that order so I can track them easier. How do I make php start assigning numbers to all successful orders, in a set order like 1,2,3,4,5 -> 1093, 1094. Like that so they all stay in order. Thanks for the help. Brandon
  13. I have a shopping cart system set up and I want to have a button that adds $4.00 to the total if the shipment is going international. I would like to know if there is a "add" command or something like that, that I can have this button point to, to add $4.00 to the total value of the shipment. This is the cart code as far as the money values go.                         $totalvalue = $totalvalue + ($item["price"]*$ses_quan); $subtotal = ($item["price"]*$ses_quan); $shipping = 3.50 + ($totalvalue / 18.00 * 1.00); $finalvalue = $totalvalue + $shipping I would like to add $4.00 only on international shipments. Can someone tell me how to go about it and if there is a way to add that as a variable like..  $finalvalue = $totalvalue + $shipping + $international .... But how would I get it to figure the variable international bc I only want it to be $4.00 on certain shipments. Thanks in advance. Brandon
  14. Thanks I wasn't for sure there was an action for that. Now as far as where it says //updated db is that actually a command or do I have to put my other stuff in there.
×
×
  • 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.