Tabang mga ka istoryans.,depend nami thesis ugma.,problema ko sa paypal checkout
plz ko insert ug paypal checkout sa codes
plz help me with paypal checkout button codes instead of reserve orders on the given codes and screenshots below
heres the code:
<?php
session_start();
include('functions/functions.php');
if(!isset($_SESSION['cart']))
{
$_SESSION['cart'] = array();
$_SESSION['total_items'] = 0;
$_SESSION['total_price'] = '0.00';
}
?>
<!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=utf-8" />
<title>Welcome to Onietech Computer Solution</title>
<link rel="stylesheet" href="styles/mystyles.css" />
<link rel="shortcut icon" href="favicon.ico">
<link rel="icon" type="image/gif" href="animated_favicon1.gif">
<script type="text/javascript" src="script/prototype.js"></script>
<script type="text/javascript" src="script/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="script/lightbox.js"></script>
<link rel="stylesheet" href="styles/lightbox.css" type="text/css" media="screen" />
<script language="javascript" type="text/javascript">
function showMen(elmt){
if(document.getElementById(elmt).style.visibility == "visible"){
document.getElementById(elmt).style.visibility = "hidden"
document.getElementById(elmt).style.position = "absolute"
}
else{
document.getElementById(elmt).style.visibility = "visible"
document.getElementById(elmt).style.position = "relative"
}
}
function loadMen(){
<?php
if(isset($_GET['menu'])){
$menu = $_GET['menu'];
}
else{
$menu = "1";
}
?>
document.getElementById('sub<?php echo $menu; ?>').style.visibility = "visible"
document.getElementById('sub<?php echo $menu; ?>').style.position = "relative"
}
</script>
</head>
<body onload="loadMen()">
<div id="container">
<div id="top">
<div id="cartdiv" align="right">
<div style="height:95px">
</div>
</div>
<div id="toplink"><a href="index.php">Home</a> | <a href="Aboutus.php">About us</a> | <a href="news.php">News</a> | <a href="contacts.php">Contact us</a> |
<?php
if(!$_SESSION['MM_Username']){
echo ' <a href = "signup.php">Signup</a> | <a href="login.php">Login</a>' ;
}
else{
echo '<a href="logout.php">Logout</a>' ;
}
?>
</div>
<div id = "contentHolder">
<div id="leftnav">
<p>Category</p>
<div id = "navholder">
<?php
$nav = navi();
?>
</div>
<div>
<p>You orders<br />
<?php echo $_SESSION['total_items']; ?> Items<br />
Total price = <?php echo number_format($_SESSION['total_price'],2); ?> Php
<div align="center"><A href="store.php?view=checkout">View orders</A></div>
</p>
</div>
</div>
<div id="content">
<div>
<?php
if(isset($_GET['view'])){
$view = $_GET['view'];
}
else{
$view = "";
}
switch($view){
case "checkout":
if($_SESSION['cart'])
{
?>
<h2>Checkout</h2>
<form action="functions.php" method="post">
<table id="items" width="550" cellpadding="0" cellspacing="0" align="center">
<thead>
<tr bgcolor="#CCCCFF">
<th>Item</th>
<th>Item Price</th>
<th>Qty</th>
<th>Subtotal</th>
<th>Command</th>
</tr>
</thead>
<tbody>
<?php
$col = 0;
foreach($_SESSION['cart'] as $id => $qty):
$product = find_product($id);
if($col == 0){
?>
<tr align="center" bgcolor="#FFFFCC" onmouseover="bgColor='#CCFFCC'" onmouseout="bgColor='FFFFCC'">
<?php
$col = 1;
}
else{ ?>
<tr align="center" bgcolor="#CCCCFF" onmouseover="bgColor='#CCFFCC'" onmouseout="bgColor='#CCCCFF'">
<?php
$col = 0;
}
?>
<td align="left">
<img src="<?php echo $product['image']; ?>" width = '70' align="absmiddle"/>
<?php echo $product['name']; ?></td>
<td>Php <?php echo number_format($product['price'],2); ?></td>
<td><input type="text" size="2" name="<?php echo $id ?>" value="<?php echo $qty; ?>" /></td>
<td>$<?php echo number_format($product['price'] * $qty, 2); ?></td>
<td><a href = "functions.php?remove=true&id=<?php echo $product['id']; ?>">remove</a>
</tr>
<?php endforeach; ?>
<tr>
<td colspan="5" align="center">
<input type="submit" name="update" value="update" /><br />
<?php if($_SESSION['MM_Username']){
echo "<a href = 'order.php?user=".$_SESSION['MM_Username']."'>reserve orders now!</a>";
}else{
echo "<a href = 'login.php'>login</a> to continue order process";
}?>
</td>
</tr>
</tbody>
</table>
</form>
<?php
}
else
{
echo '<p>You have no orders... <a href="store.php">Order Here</a></p>';
}
break;
default:
$products = showProducts();
}
?>
</div>
</div>
<div align="center" id="bottom-links">
<small><a href="index.php">Home</a> | <a href="Aboutus.php">About us</a> | <a href="contacts.php">Contact us</a></small>
</div>
</div>
<div id="footer" align="center"><span style="font-size:11px">All rights reserve 2012</span></div></div>
</body>
</html>