Photo-Graffix Gallery -> Checkout.php Page

Discussion in 'PHP' started by Brian07002, Jun 23, 2007.

  1. #1
    Hi all,

    I need to write up a simple checkout page in php. But this will need to be 'connected' in a 'variable sense' with photo-graffix gallery.

    I have some code but very little, that's why I am here for some help.

    Ok, first I would download a demo of the program (unless you that good, and don't need it)...

    I have a demo of Photo-Graffix 3.3

    http://www.photo-graffix.com/trial.php
    Code (markup):
    Ok, to begin...

    To get a variable to be echoed out to the 'checkout.php' page using photo-graffix is like such:

    Where ever you put this code in the checkout.php page:
    <?php $name = $_GET['photoname']; echo $name ?>
    Code (markup):
    It will display the name of the image name that you specify on the url string such as 'YourPic' (without the quotes) as specified in the url below.

    http://www.yourdomain.com/graffix/checkout.php?photoname=YourPic
    Code (markup):
    Note: YourPic (as specified in the above url) can be anything, I will use it for the item number for each image in the gallery. Also, if anyone has another suggestion for the url above that will substitute 'YourPic' for a variable based on the image clicked on in the gallery (not sure if photo-graffix works like that), but that would be awesome if you found out, so I don't have to type in each item number for each url. But if need be, I will do it.

    Now I also would need the description to be echoed out onto the checkout page as well, keep in mind this is only a basic checkout page, so not to be technical. Now I haven't tested the code below so I don't know if it works, but I will need the description as well to be echoed to the checkout page. This code was emailed to me from photo-graffix, they said it works. I haven't tested it yet though.

    http://www.yourdomain.com/gallery/checkout.php?item=photoname&description=photodescr
    Code (markup):
    Now that you know that, a basic checkout page may look like this:

    <!-- CONTENT STARTS -->
    <p align="center"><font face="Verdana">Checkout Page</font></p>
    <table border="0">
    	<tr>
    		<td><font face="Verdana" size="2">&nbsp;Item Name:&nbsp; <?php $name = $_GET['photoname']; echo $name ?> </font></td>
    	</tr>
    </table>
    <table border="0">
    	<tr>
    		<td><font face="Verdana" size="2">Quantity: </font>
    		<input type="text" name="T1" size="2"> </td>
    	</tr>
    </table>
    <br>
    <table border="0" cellspacing="0" cellpadding="0" height="240" width="596">
    <tr>
    <td height="20"><font face="Verdana" size="2">&nbsp;First Name: </font>
    <font face="Verdana"><font size="1"><input type="text" name="fname" size="17"> 
    </font> 
    <font color="#FF0000" size="1">*</font></font></td>
    </tr>
    <tr>
    <td height="20"><font face="Verdana" size="2">&nbsp;Last Name: </font>
    <font face="Verdana"><font size="1"><input type="text" name="lname" size="29"> 
    </font> 
    <font color="#FF0000" size="1">*</font></font></td>
    </tr>
    <tr>
    <td height="20"><font face="Verdana"><font size="2">&nbsp;Street Address:
    </font><font size="1"><input type="text" name="address" size="31"> </font>
    <font size="1" color="#FF0000">*</font><font size="1"> (Please Include Apt #, 
    Suite #, Floor Etc.)</font></font></td>
    </tr>
    <tr>
    <td height="20"><font face="Verdana"><font size="2">&nbsp;City: </font>
    <font size="1">
    <input type="text" name="city" size="24"> 
    <font color="#FF0000">*</font></font></font></td>
    </tr>
    <tr>
    <td height="20"><font face="Verdana"><font size="2">&nbsp;State: </font>
    <font size="1">
    <input type="text" name="State" size="2" value="NJ"> 
    <font color="#FF0000">*</font></font></font></td>
    </tr>
    <tr>
    <td height="20"><font face="Verdana"><font size="2">&nbsp;Zip Code:
    </font><font size="1"><input type="text" name="address5" size="9"> 
    <font color="#FF0000">* </font>(Zip+4 Ok)</font></font></td>
    </tr>
    </table>
    <!-- CONTENT ENDS -->
    <p align="left"><font color="#FF0000" size="1" face="Verdana">*</font><font face="Verdana" size="2">
    </font><font size="1" face="Verdana">Denotes Required Field</font></p>
    <a href="print.php">Print Order</a>
    HTML:
    Ok..Now for the 'tough' part it's making me :mad: Been try so hard to get this, need help bad here.

    I want to add a simple checkout.php page that can do the following:

    1. Save sessions (very simple shopping cart) so more than one item can be added to the checkout.php page
    2. Make Printer Friendly (so the page can be printed on paper without problems)

    Here's a page where php session help with refresh your memory if need be.

     http://www.thewatchmakerproject.com/journal/276/building-a-simple-php-shopping-cart
    Code (markup):
    I Thank all who help with this project!
     
    Brian07002, Jun 23, 2007 IP
  2. Brian07002

    Brian07002 Active Member

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    86
    #2
    Anyone? I am still stumped on this, any help would be greatly appreciated.

    Thanks alot!
     
    Brian07002, Jul 3, 2007 IP