Prev | Current Page 404 | Next

Emilian Balanescu and Cristian Darie

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


When you have completed the following exercise, you will be able to make changes and
additions to your product categories by clicking the Edit Categories button in the departments
page. In the categories page, clicking an Edit button enters the category in edit mode
(see Figure 10-10).
CHAPTER 10 ?–  CATALOG ADMINISTRATION: DEPARTMENTS AND CATEGORIES 295
Figure 10-10. Editing the French category
Exercise: Administering Categories
1. Create a new template file named admin_categories.tpl in the presentation/templates folder
file, and add the following code to it:
{* admin_categories.tpl *}
{load_presentation_object filename="admin_categories" assign="obj"}
action="{$obj->mLinkToDepartmentCategoriesAdmin}">


Editing categories for department: {$obj->mDepartmentName} [
back to departments ... ]


{if $obj->mErrorMessage}

{$obj->mErrorMessage}

{/if}
{if $obj->mCategoriesCount eq 0}

There are no categories in this department!


{else}






{section name=i loop=$obj->mCategories}
{if $obj->mEditItem == $obj->mCategories[i].category_id}

CHAPTER 10 ?–  CATALOG ADMINISTRATION: DEPARTMENTS AND CATEGORIES 296
Category NameCategory Description 

value="{$obj->mCategories[i].


Pages:
392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416
salon kosmetyczny kraków kasyno torpado out of home advertising zaproszenia ślubne