tpl by adding the following highlighted link code to
the carts admin page:
|
CATALOG ADMIN |
PRODUCTS ATTRIBUTES ADMIN |
CARTS ADMIN |
STOREFRONT |
LOGOUT |
9. Open presentation/admin_menu.php, and add the following code that creates the new menu link:
class AdminMenu
{
public $mLinkToStoreAdmin;
public $mLinkToAttributesAdmin;
public $mLinkToCartsAdmin;
public $mLinkToStoreFront;
public $mLinkToLogout;
public function __construct()
{
$this->mLinkToStoreAdmin = Link::ToAdmin();
$this->mLinkToAttributesAdmin = Link::ToAttributesAdmin();
$this->mLinkToCartsAdmin = Link::ToCartsAdmin();
if (isset ($_SESSION['link_to_store_front']))
$this->mLinkToStoreFront = $_SESSION['link_to_store_front'];
10. Add the highlighted code at the end of the init() method of the StoreAdmin class in presentation/
store_admin.php, which loads presentation/templates/admin_carts.tpl:
elseif ($admin_page == 'Products')
$this->mContentsCell = 'admin_products.tpl';
elseif ($admin_page == 'ProductDetails')
$this->mContentsCell = 'admin_product_details.tpl';
elseif ($admin_page == 'Carts')
CHAPTER 12 ?– CREATING YOUR OWN SHOPPING CART 397
$this->mContentsCell = 'admin_carts.
Pages:
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507