Admin Control Panel
Our shopping cart admin page consist of the following :
Below is what admin main page ( admin/index.php ) look like.
|
|
By the way the shopping cart name is PlainCart :-) Each sub-module (category, product, etc) will have similar file structure. They are :
The admin/index.php only serves as a simple display when the admin enters the administrator section. On this page (and all other pages in the admin sections ) we check if the one requesting the file is already logged in or not. This way we can be sure that anyone who plays around with the admin pages are those who have the required permission. All admin pages will be using the same template so they will all look alike. Basically each admin file will set the page title, what javascript to include and the main content. If you want to customize the look of the admin pages you only need to modify the template and the css file ( admin.css ) . Here is the code for template.php Source code : admin/include/template.php <?php
if (!defined('WEB_ROOT')) { exit; } $self = WEB_ROOT . 'admin/index.php'; You see the bolded section on the top? All file that is meant to be included from another file will have this right at the beginning of the code. So if we request the file directly like this : plaincart/admin/include/template.php it won't display anything. But first, we have to postpone making the admin pages and create the login page first. Because a shop admin certainly must login before doing anything to the shop. NOTE : When you play with the admin pages demo you will see that any changes you make doesn't have any effect at all. This is because i've commented some of the code in the demo. I do this just to make sure all the settings, products, and categories stay the same. The code for download, however, are not commented. So when you install it on your server you can make any changes as you wish |
|
|
|
|
Database Abstraction | PHP MySQL Shopping Cart Tutorial : Admin Control Panel | Admin - Login |
|
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 - 2008 www.phpwebcommerce.com