Prev | Current Page 635 | Next

Emilian Balanescu and Cristian Darie

"Beginning PHP and MySQL E-Commerce: From Novice to Professional, Second Edition"

tpl';
$this->mCategoriesCell = 'categories_list.tpl';
}
8. In the same file (presentation/store_front.php), add a new member to the StoreFront class:
// Define the template file for the cart summary cell
public $mCartSummaryCell = 'blank.tpl';
// Define the template file for the login or logged cell
public $mLoginOrLoggedCell = 'customer_login.tpl';
// Controls the visibility of the shop navigation (departments, etc)
public $mHideBoxes = false;
// Page title
public $mPageTitle;
// PayPal continue shopping link
public $mPayPalContinueShoppingLink;
9. Also in the StoreFront class, modify the init() method adding the highlighted code to the end of the
method as shown here:
if (isset ($_GET['RegisterCustomer']) ||
isset ($_GET['AccountDetails']))
$this->mContentsCell = 'customer_details.tpl';
elseif (isset ($_GET['AddressDetails']))
$this->mContentsCell = 'customer_address.tpl';
elseif (isset ($_GET['CreditCardDetails']))
$this->mContentsCell = 'customer_credit_card.tpl';
if (isset ($_GET['Checkout']))
{
if (Customer::IsAuthenticated())
$this->mContentsCell = 'checkout_info.tpl';
else
$this->mContentsCell = 'checkout_not_logged.tpl';
$this->mHideBoxes = true;
}
// Load the page title
$this->mPageTitle = $this->_GetPageTitle();
}
10. Modify presentation/templates/store_front.tpl to show only the login or logged-in box on the
left when showing the checkout page by adding the highlighted code:
CHAPTER 16 ?–  MANAGING CUSTOMER DETAILS 536

{include file=$obj->mLoginOrLoggedCell}
{if !$obj->mHideBoxes}
{include file="search_box.


Pages:
623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647
Apartamenty Świnoujście noclegi hel Lokaty jednodniowe projekty domków letniskowych męskie skarpetki rowerowe