Esempio n. 1
0
 $result = mysql_query($query);
 while ($data = mysql_fetch_array($result)) {
     $id = $data['product_id'];
     $product_name = $data['product_name'];
     $price = $data['product_price'];
     //To display the image
     $query = "SELECT * FROM product_image WHERE product_id = {$id} AND image_status = 1 LIMIT 1";
     $image = mysql_fetch_array(mysql_query($query));
     $alt = $image["alt"];
     $out .= '<li>';
     $out .= '<a class="product_image" href="product_details.php?id=' . $id . '"><img src="images/' . $image['image_name'] . '" title="' . $product_name . '" alt="' . $alt . '"  width="265" height="265" /></a>';
     $out .= '<div class="product_info">';
     $out .= '<h3><a href="product_details.php?id=' . $id . '">' . $data['product_name'] . '</a></h3>';
     $out .= '</div>';
     $out .= '<div class="price_info"> <a href="storeScripts/process_wishlist.php?product_name=' . $product_name . '&id=' . $id . '&price=' . $price . '">+ Add to wishlist</a>';
     $out .= '<button onclick="addToCart(' . $id . ')" class="price_add" title="" type="button"><span class="pr_price">' . $configuration->getCurrency() . '&nbsp;' . number_format($data['product_price'], 2) . '</span><span class="pr_add">Add to Cart</span></button>';
     $out .= '</div>';
     $out .= '</li>';
 }
 //Set Meta Data
 $page = new Page_Class();
 $page->setPageTitle('Index Page [buy anything you want in this online store]');
 $page->setPageDescription('e-comerce site');
 $page->setPageKeywords('buy, sales, specials, etc');
 $page->setPropertyTitle('');
 $page->setPropertyDesc('');
 $page->setPropertyType('');
 $page->setPropertyUrl('');
 $page->setPropertySiteName('');
 $page->setPropertyImage('');
 $page->setCssLink(css());
echo $resp;
?>
</table>
<br />

<h4 class="heading">Payment Information</h4>
<?php 
require_once 'storeScripts/configuration_class.php';
$configuration = new Configuration_Class();
?>
<br /><br />

<div class="mc2"  style="text-align: right;">
                	<ul>
                      <li><span style="font-size: 11pt;"><b>Your Subtotal		:</b></span> <label style="font-size: 13pt;color: red;font-weight: bold;"><?php 
echo $configuration->getCurrency();
?>
&nbsp;<?php 
echo number_format($order_total, 2);
?>
</label></li> 
                      <li><span style="font-size: 11pt;"><b>Shipping Cost 		:</b> </span> <label style="font-size: 13pt;color: red;font-weight: bold;"><?php 
echo $configuration->getCurrency();
?>
&nbsp;0.00</label></li>
                      <li><span style="font-size: 11pt;"><b>Discount Amount		:</b></span> <label style="font-size: 13pt;color: red;font-weight: bold;"><?php 
echo $configuration->getCurrency();
?>
&nbsp;0.00</label> </li>
                      <li><span style="font-size: 11pt;"><b>Your Total Payment	: </b></span><label style="font-size: 13pt;color: red;font-weight: bold;"><?php 
echo $configuration->getCurrency();
</select> 
</td>
</tr>

<tr>
<th  align = "right">Date Purchased:</th>
<td><?php 
echo $date_purchased;
?>
</td>
</tr>

<tr>
<th  align = "right">Order Total:</th>
<td><?php 
echo $configuration->getCurrency() . '&nbsp;' . number_format($order_total, 2);
?>
</td>
</tr>

</table>

<h3>Shipping Information</h3>

<input type="hidden" name ="id" value="<?php 
echo $orders_id;
?>
" />

<label for="customer_id"><b>Customer Id:</b></label><br />
<input type="text" id="customer_id" name="customer_id" value="<?php 
Esempio n. 4
0
     $model = $data["product_model"];
     $color = $data["product_color"];
     $size = $data["product_size"];
     $id = $data['product_id'];
     $link = '';
     $link = $image["image_name"];
     $alt = $image["alt"];
     $out .= '<div style = " width: 700px; padding: 10px;">';
     $out .= '<div style = "float: left;">';
     $out .= '<a href="images/' . $link . '" title="' . $data['product_name'] . '" class="grouped_elements" rel="group1" > ' . '<img id = "image_display" src="images/' . $image["image_name"] . '" width="250" height="250" /></a>';
     $out .= '<br /><br /><div>' . $image_slide . '</div>';
     $out .= '</div>';
     $out .= '<div style = "float: left; margin-left: 10px;">';
     $out .= '<p><a href="storeScripts/process_wishlist.php?product_name=' . $product_name . '&id=' . $id . '&price=' . $price . '">Add to wishlist</a></p>';
     $out .= '<p style="display:inline;">' . $data['product_name'] . '</p>';
     $out .= '<p style="color: red; font-size: 14pt; font-weight: bolder;">' . $configuration->getCurrency() . '&nbsp;' . number_format($data['product_price'], 2) . '</p>';
     $out .= '<form action="cart.php" method="post" name="form1" id="form1">';
     $out .= '<input type="hidden" name="pid" id="pid" value="' . $id . '" />';
     $out .= '<input type="submit" name="btncart" id="btncart" value="Add To Cart" />';
     $out .= '</form>';
     $out .= '</div>';
     $out .= '<div style="clear: both;"></div>';
     $out .= '<br /><h3>Product Description: </h3><hr style="border: 1px gray solid;"/><br />';
     $out .= '<p style="text-align: justify;">' . nl2br($data['product_long_description']) . '</p>';
     $out .= '</div><br /><br />';
 }
 if (mysql_num_rows($result) < 0) {
     echo 'Sorry productID not found !!!';
     exit;
 }
 //Add 1 to product_viewed field in the product table
Esempio n. 5
0
    }
    $pagination .= "</div>\n";
}
//END OF PAGINATION
while ($data = @mysql_fetch_array($result)) {
    $customer_id = $data["customers_id"];
    $email = "SELECT customer_email FROM customer WHERE customer_id = {$customer_id} LIMIT 1";
    $r = mysql_query($email);
    $d = mysql_fetch_array($r);
    $orders_id = $data["orders_id"];
    $out .= '<tr>';
    $out .= '<td align="center">' . $data["orders_id"] . '</td>';
    $out .= '<td align="center"><a href="customer_edit_report.php?customer_id=' . $customer_id . '" style="text-decoration: none;">' . $d["customer_email"] . '</a></td>';
    $out .= '<td align="center">' . $data["date_purchased"] . '</td>';
    $out .= '<td align="center">' . $data["orders_status"] . '</td>';
    $out .= '<td align="center">' . $configuration->getCurrency() . ' ' . number_format($data["orders_total"], 2) . '</td>';
    $out .= '<td align="center"><a href="customer_orders_edit.php?id=' . $orders_id . '">Edit</a></td>';
    $out .= '</tr>';
}
require_once 'header.php';
?>
<br />
<center>
<h2>Orders</h2>
<br />

<script type="text/javascript">
function sort_orders(){

	var find = document.querySelector("#sort_orders").value;
	window.location = "customer_orders.php?page=<?php