swipestripe
[ class tree: swipestripe ] [ index: swipestripe ] [ all elements ]

Class: Attribute

Source Location: /code/product/Attribute.php

Class Overview

DataObject
   |
   --Attribute

Represents a Product Attribute, e.g: Size, Color, Material etc.


Author(s):

Version:

  • 1.0

Copyright:

  • Copyright (c) 2011, Frank Mullenger

Variables

Methods



Class Details

[line 16]
Represents a Product Attribute, e.g: Size, Color, Material etc.

Attributes are created in the ShopAdmin where they can be set with default Options. They are then selected on each product they relate to. Once an attribute is added to a Product, that Product needs to define some Options for that Attribute and also have some Variations. If the Product does not have Variations when it needs to then it cannot be purchased.




Tags:

author:  Frank Mullenger <frankmullenger@gmail.com>
version:  1.0
copyright:  Copyright (c) 2011, Frank Mullenger


[ Top ]


Class Variables

static $belongs_many_many = array(    
    'Products' => 'Product'
  )

[line 44]

Belongs many many relations for the Attribute


Type:   Array


[ Top ]

static $db = array(
    'Title' => 'Varchar(255)',
    'Description' => 'Text'
  )

[line 25]

DB fields for the Attribute, Title acts as the label for the select field on the AddToCartForm - so it does not need to be unique.



Tags:

access:  public

Type:   Array


[ Top ]

static $has_many = array(
    'Options' => 'Option'
  )

[line 35]

Has many relations for the Attribute



Tags:

access:  public

Type:   Array


[ Top ]

static $searchable_fields = array(
     'Title'
   )

[line 53]

Searchable fields for Attributes



Tags:

access:  public

Type:   Array


[ Top ]



Class Methods


method getCMSFields [line 63]

FieldSet getCMSFields( )

Add some fields to the CMS for managing Attributes.



[ Top ]


Documentation generated on Thu, 08 Mar 2012 16:47:24 +1300 by phpDocumentor 1.4.4