Jump to content

samjslater

New Members
  • Posts

    9
  • Joined

  • Last visited

samjslater's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. WOAH. Guys, time zones apply here Thank you all so much for your help. I have sorted it. mrMarcus your simple suggestion of creating a mediating page to collect the variables in the place of the orriginal inputs was perfect. I made a form which detected the "?cart" and if it was set, collecting the variables from the previous inputs, and showed them to the customer, who then confirmed sending the collected data to the cart. I would be interested to know why you don't like my process (I am a total novice). Is there a better way (hell is there a cms type system for creating such things as this?). Anyway. So much love here. You've all communicated crystal clear. Thanks.
  2. Sorry mrMarcus. There's been a cock up. Here is it as clearly as possible: http://antibang.com/selfassemblygifts/shop.php?productID=2#ad-image-0 Submit the form with the code: SANTA101 in the discount box. Once the form is submitted, view source on the page and: <form action="http://ww7.aitsafe.com/cf/add.cfm" method="post"> <input name="userid" type="hidden" value="94285118" /> <input name="product" type="hidden" value="'.$productNAME.'" /> <input name="productID" type="hidden" value="'. $_GET['productID'].'" /> <input name="qty" type="hidden" value="'.$qty.'" /> <input name="price" type="hidden" value="'.$value.'" /> </form> Will be at the top. How do I get that info to pass to the http:// at the top of the form?
  3. I'm using an image to submit the form, so i have a hidden input called 'action' which I use to trigger that variable at the top. It does work because I can see the form information in the source when I submit the form. The variables seem to have to be collected at the top of the page, and then, once collected they're sent to the cart. I just cant get them to send. What is the simplest way to send this all the form information to: http://ww7.aitsafe.com/cf/add.cfm Thanks.
  4. Right, so i've sorted many many things. Thank you so much for your help. The last thing I can't do is get a redirect to send this collected form information at the top of the page, to the specified location in the top of the form (ocho'd a few lines down). Thoughts? if($_GET['productID'] == 1){ $productNAME = "Limited Edition"; $productDESCRIPTION = "Self Assembly Gifts: Limited edition bauble in display box."; $productPRICE = "14.99"; $productDISCOUNT = "10.99"; $qty = $_POST['qty']; if($_POST['promo'] == "SANTA101"){ $value = $productDISCOUNT; } else { $value = $productPRICE; } if($_POST['action'] == "Submit Form"){ echo ' <form action="http://ww7.aitsafe.com/cf/add.cfm" method="post"> <input name="userid" type="hidden" value="94285118" /> <input name="product" type="hidden" value="'.$productNAME.'" /> <input name="productID" type="hidden" value="'. $_GET['productID'].'" /> <input name="qty" type="hidden" value="'.$qty.'" /> <input name="price" type="hidden" value="'.$value.'" /> </form> '; exit; }
  5. antibang.com/selfassemblygifts/form.php When you click on an item in section A, you load a set of pictures and variables which can then be sent to a shopping cart (section c). The only problem that is occuring is when the form is submitted it doesn't detect if SANTA101 exists in the "discount code", it just rolls on ahead and uses the default price. I want it to see if the discount code is correct, amend the price, and THEN go to the shopping cart. Any clues? thanks alot for your help. Much appreciated. x
  6. And yes, I'm checking GET because the productID is set on the first page, however I want to parse the information relating to the GET variable onto the shopping cart in POST (so it cant be edited). Why am I such a tard? Can't do this. Must practice.
  7. ok, this is the functional bits (assuming the 'productID' var is set in the link) <?php if($_GET['product'] == 1){ $productNAME = "Limited Edition"; $productDESCRIPTION = "Self Assembly Gifts: Limited edition bauble in display box."; $productPRICE = "14.99"; $productDISCOUNT = "10.99"; } if($_GET['product'] == 2){ $productNAME = "Standard Edition"; $productDESCRIPTION = "Self Assembly Gifts: Standard edition bauble."; $productPRICE = "6.99"; $productDISCOUNT = "5.99"; } ?> <form action="http://ww7.aitsafe.com/cf/add.cfm" method="post"> <input name="userid" type="hidden" value="94285118" /> <input name="product" type="hidden" value="<? echo $productNAME; ?>" /> <input name="qty" type="hidden" value="<? echo $qty; ?>" /> <input type="hidden" name="gift_amount" value="<? if($_GET['promo'] == "SANTA101"){ echo "4"; } else { echo "0"; } ?>" /> <input name="price" type="hidden" value="<? if($_GET['promo'] = "SANTA101"){ echo $productDISCOUNT; } else { echo $productPRICE; } ?>" /> <input name="return" type="hidden" value="http://selfassemblygifts.com/shop.php" /> <? if(isset($_GET['product'])){ echo $productDESCRIPTION; } else { echo "Start at A: GIFTS"; } ?> <input name="qty" type="text" size="5" maxlength="3" /> <input name="promo" type="text" size="10" maxlength="10" /> <input type="image" name="button" src="images/layout/cart.gif" style="margin-left: -50px;" /> </form>
  8. What do you mean by short tags? as in "<?"
  9. I've spent nearly 5 hours trying to word out why the form won't pass the correct price to the shopping cart after seeing if the Discount code (yes it's SANTA101) is correct. I can make all the correct calculations happen on the first page, but it won't send the right info to the shopping cart. i'm tired, and my client is pissed. Any help and i'll send you a mince pie. Hell, i'll bake Santa. Thanks in advance. Sam p.s. I've deleted anything long and unnecessary. <?php if($_GET['product'] == 1){ $productNAME = "Limited Edition"; $productDESCRIPTION = "Self Assembly Gifts: Limited edition bauble in display box."; $productPRICE = "14.99"; $productDISCOUNT = "10.99"; } if($_GET['product'] == 2){ $productNAME = "Standard Edition"; $productDESCRIPTION = "Self Assembly Gifts: Standard edition bauble."; $productPRICE = "6.99"; $productDISCOUNT = "5.99"; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <link rel="stylesheet" type="text/css" href="lib/jquery.ad-gallery.css" /> <body text="#990000" link="#B78D2E" vlink="#634C17"> <div id="header"> <div class="content"> <h1> </h1> </div> </div> </div> <!-- end header --> <div id="wrapper"> <div id="outer1"> <div class="content"> <div id="container"> <div id="content"> <div class="section-header a"> <div class="section-title"> <h5>GIFTS</h5> </div> </div> <div class="section"> <div class="bullet"> <div class="bullet-number top-pad"> <h1>1</h1> </div> <div class="project-blockr"></div> <div class="product-block"> <div class="product-block"> <a href="?product=1"> <h4>Christmas Bauble</h4> </a> <h4>(limited edition)</h4> </div> </div> <div class="price-block">RRP: <strong>£14.99</strong> </div> </div> <div class="bullet"> <div class="bullet-number top-pad"> <h1>2</h1> </div> <div class="project-blockr"></div> <div class="product-block"> <div class="product-block"> <a href="?product=2"> <h4>Christmas Bauble</h4> </a> <h4>(standard edition)</h4> </div> </div> <div class="price-block">RRP: <strong>£14.99</strong> </div> </div> <div class="spacer"> </div> <div class="about"> Here at SAgifts we believe that all ages should enjoy trying their hand and brain at part of the making process. We gift design that engages you with the joys of assembling and learning as you do. </div> <div class="about"> Our first gift we are sharing is a christmas bauble. </div> <div class="about"> Give as a gift to a friend, a family member, or why not treat yourself to an innovative, festive and fun activity to light up christmas. </div> </div> </div> </div> </div> <!-- end content --> </div> <div id="outer2"> <div class="content"> <div id="container"> <div id="content"> <div class="section-header b"> <div class="section-title"> <h5>GALLERY</h5> </div> </div> <!------- Starter image ------------> <? if(!isset($_GET['product'])){ ?> <img src="images/layout/center.png" title="Rob Sharple's Ball Ball.jpg" alt="A view in hand.jpg" class="image0" /> <? } ?> <!-------- Starter Image End ---------> <? if ($_GET['product'] == 1){ ?> <div id="gallery" class="ad-gallery"> <div class="ad-image-wrapper"> </div> <div class="ad-controls"> </div> <div class="ad-nav"> <div class="ad-thumbs"> </div> </div> </div> <? } ?> <? if ($_GET['product'] == 2){ ?> <div id="gallery" class="ad-gallery"> <div class="ad-image-wrapper"> </div> <div class="ad-controls"> </div> <div class="ad-nav"> <div class="ad-thumbs"> </div> </div> </div> <? } ?> </div> </div> </div> <!-- end content --> </div> <!-- end outer2 --> <div id="outer3"> <div class="content"> <div id="container"> <div id="content"> <div class="section-header c"> <div class="section-title"> <h5>CHRISTMAS LIST</h5> </div> </div> <form action="http://ww7.aitsafe.com/cf/add.cfm" method="post"> <input name="userid" type="hidden" value="94285118" /> <input name="product" type="hidden" value="<? echo $productNAME; ?>" /> <input name="qty" type="hidden" value="<? echo $qty; ?>" /> <input type="hidden" name="gift_amount" value="<? if($_GET['promo'] == "SANTA101"){ echo "4"; } else { echo "0"; } ?>" /> <input name="price" type="hidden" value="<? if($_GET['promo'] = "SANTA101"){ echo $productDISCOUNT; } else { echo $productPRICE; } ?>" /> <input name="return" type="hidden" value="http://selfassemblygifts.com/shop.php" /> <div class="section"> <div class="bullet"> <div class="bullet-number"> <h1>1</h1> </div> <h4> Product </h4> <div class="description-box"> <? if(isset($_GET['product'])){ echo $productDESCRIPTION; } else { echo "Start at A: GIFTS"; } ?> </div> </div> <div class="bullet"> <div class="bullet-number"> <h1>2</h1> </div> <h4>Quantity</h4> <p> <div class="bullet-cart-space"> <h1> </h1> </div> <input name="qty" type="text" size="5" maxlength="3" /> </p> </div> <div class="bullet"> <div class="bullet-number"> <h1>3</h1> </div> <h4>Got a promo code?</h4> <p> <div class="bullet-cart-space"> <h1> </h1> </div> <input name="promo" type="text" size="10" maxlength="10" /> </p> <div class="bullet"> <div class="bullet-number"> <h1>4</h1> </div> <div class="bullet-cart-space"> <h1> </h1> </div> <input type="image" name="button" src="images/layout/cart.gif" style="margin-left: -50px;" /> </div> </div> </form> </div> </div> </div> </div> <!-- end content --> <!-- end outer2 --> <!-- end #wrapper --> <div id="footer-suround"> <div id="footer"> <div id="about"> <div class="content"> <div class="footer-picture"> <img src="images/layout/logo.gif" width="98" height="97" alt="logo" /> </div> <div class="footer-content"> <div class="footer-content-text"> <p><img src="images/layout/email.gif" width="240" height="28" alt="email: overhere@selfassemblygifts.co.uk" /><br /> <img src="images/layout/twitter.gif" width="141" height="28" alt="twitter: @SAgifts / #SAgifts" /></p> </p> </div> </div> </div> <p> </p> <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> </form> </div> </div> <!-- end footer --> </body> </html>
×
×
  • 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.