Bringing products catalog to customers
Presenting products catalog to customers is much like presenting products and categories in back end.
To navigate in products catalog customer can use a category tree:
![]() | When clicking a certain category link, customer is directed to index.php?categoryID=X where X is the integer ID of the catego- ry, e.g. 5. Script should perform following operations if categoryID parameter is passed:
|
A list of products within current category can be easily fetched from the database using following SQL query:
SELECT * FROM `PRODUCT` WHERE categoryID = `$current_categoryID`;
Clicking a certain product link brings visitor detailed product information page - index.php?productID=XX.
XX indicates unique integer ID of the product.
Just like with the category, script should validate productID parameter value, search for a product in the database, and then fetch all required information from the database and present it to visitor:

Clicking "Add to cart" button will add this product to customer's shopping cart.




0 comments:
Post a Comment