Prev | Current Page 416 | Next

Emilian Balanescu and Cristian Darie

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

$this->mLinkToAttributesAdmin);
}
}
// If deleting an attribute ...
if ($this->_mAction == 'delete_attr')
{
$status = Catalog::DeleteAttribute($this->_mActionedAttributeId);
if ($status < 0)
$this->mErrorMessage =
'Attribute has one or more values and cannot be deleted';
else
header('Location: ' . $this->mLinkToAttributesAdmin);
}
// If editing an attribute value ...
if ($this->_mAction == 'edit_val')
{
header('Location: ' .
htmlspecialchars_decode(
Link::ToAttributeValuesAdmin(
$this->_mActionedAttributeId)));
exit();
}
// Load the list of attributes
$this->mAttributes = Catalog::GetAttributes();
$this->mAttributesCount = count($this->mAttributes);
}
}
?>
3. Create a new template file named admin_attribute_values.tpl in the presentation/templates
folder file, and add the following code to it:
{* admin_attribute_values.tpl *}
{load_presentation_object filename="admin_attribute_values" assign="obj"}
CHAPTER 11 ?–  CATALOG ADMINISTRATION: PRODUCTS AND ATTRIBUTES 310
action="{$obj->mLinkToAttributeValuesAdmin}">


Editing values for attribute: {$obj->mAttributeName} [
back to attributes ... ]


{if $obj->mErrorMessage}

{$obj->mErrorMessage}

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

There are no values for this attribute!


{else}





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


Pages:
404405406407408409410411412413414415 416 417418419420421422423424425426427428
wyborpoker onlineEverest Poker Bonus Kodpokermultihack do metina 2
Attribute Value