Prev | Current Page 184 | Next

Emilian Balanescu and Cristian Darie

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


class StoreFront
{
public $mSiteUrl;
// Class constructor
public function __construct()
{
$this->mSiteUrl = Link::Build('');
}
}
?>
5. Modify presentation/templates/store_front.tpl like this:
{* smarty *}
{config_load file="site.conf"}
{load_presentation_object filename="store_front" assign="obj"}
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


{#site_title#}

href="{$obj->mSiteUrl}styles/tshirtshop.css" />








Place contents here




{include file="departments_list.tpl"}
CHAPTER 4 ?–  CREATING THE PRODUCT CATALOG: PART 1 110





6. Open index.php, and add a reference to the Link class as shown in the highlighted code:
// Include utility files
require_once 'include/config.php';
require_once BUSINESS_DIR . 'error_handler.php';
// Sets the error handler
ErrorHandler::SetHandler();
// Load the application page template
require_once PRESENTATION_DIR .


Pages:
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196