Prev | Current Page 414 | Next

Emilian Balanescu and Cristian Darie

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

attribute_id}"
value="Update" />

name="submit_delete_attr_{$obj->mAttributes[i].attribute_id}"
value="Delete" />


{else}

{$obj->mAttributes[i].name}

CHAPTER 11 ?–  CATALOG ADMINISTRATION: PRODUCTS AND ATTRIBUTES 307
name="submit_edit_val_{$obj->mAttributes[i].attribute_id}"
value="Edit Attribute Values" />
name="submit_edit_attr_{$obj->mAttributes[i].attribute_id}"
value="Edit" />
name="submit_delete_attr_{$obj->mAttributes[i].attribute_id}"
value="Delete" />


{/if}
{/section}

{/if}

Add new attribute:







2. Create a new presentation object file named admin_attributes.php in the presentation folder, and
add the following code to it:
// Class that supports attributes admin functionality
class AdminAttributes
{
// Public variables available in smarty template
public $mAttributesCount;
public $mAttributes;
public $mErrorMessage;
public $mEditItem;
public $mLinkToAttributesAdmin;
// Private members
private $_mAction;
private $_mActionedAttributeId;
// Class constructor
public function __construct()
{
// Parse the list with posted variables
foreach ($_POST as $key => $value)
// If a submit button was clicked .


Pages:
402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426
Apartamenty Świnoujście noclegi hel Lokaty jednodniowe projekty domków letniskowych męskie skarpetki rowerowe