Shop - View Product Detail
When you click on one of the product from the product list. The product detail page will show up. For each product we display the full-sized image, name, price and 'Add to cart' button. When you want to customize this page remember NOT to change the button to 'Buy Now' because the visitor may not ready to buy yet so don't scare her away. Here is the snapshot of the product detail page. We have full size image on top left corner, the description at the bottom, then the product name, price and an 'Add To Cart' button on the right.
No weird stuff here. This kind of layout is actually very common to see on shopping sites across the internet. And by following the common stuff we can be sure that the visitor won't be confused with this layout. There's one more important thing about the 'Add To Cart' button. We only show this if we still have this product in stock. After we run out of this product we just display 'Out Of Stock' . Here is the code snippet from include/productDetail.php Source code : include/productDetail.php <?php
// if we still have this product in stock // show the 'Add to cart' button if ($pd_qty > 0) { ?> <input type="button" name="btnAddToCart" value="Add To Cart" onClick="window.location.href='<?php echo $cart_url; ?>';" class="box"> <?php } else { echo 'Out Of Stock'; } ?> |
| Looking for affordable parking in Manhattan? Pick Quik Park. | |
|
|
Online Shop - View Product List | PHP MySQL Shopping Cart Tutorial : Online Shop - View Product Detail | Online Shop - Add To Cart |
|
At long last i'm finally able to update this site. Now the shopping cart can handle payment through paypal. As always you have any critiques, questions, comments or problems about this tutorial please tell me. Click here to send your feedback. And if you like this tutorial please link to this site. It will really help a lot :-) |
PHP MySQL Shopping Cart Tutorial
Copyright © 2005 - 2010 www.phpwebcommerce.com