NAME

Interchange6::Schema::Result::Cart

DESCRIPTION

The Cart class (table) is used for storing shopping carts with products in the cart held in the related Interchange6::Schema::Result::CartProduct class.

ACCESSORS

carts_id

Primary key.

name

The name of the cart. You might perhaps have a "main" cart that is used by default for the current shopping session and also a "wishlist" cart. Other uses might be "saved_items" so a user can save things for another time or maybe on logout all cart items are moved to "previous_session" cart.

users_id

Foreign key constraint on "users_id" in Interchange6::Schema::Result::User via "user" relationship.

sessions_id

Foreign key constraint on "sessions_id" in Interchange6::Schema::Result::Session via "session" relationship. Is nullable.

created

Date and time when this record was created returned as DateTime object. Value is auto-set on insert.

last_modified

Date and time when this record was last modified returned as DateTime object. Value is auto-set on insert and update.

UNIQUE CONSTRAINTS

carts_name_sessions_id

On ( name, sessions_id )

RELATIONS

cart_products

Type: has_many

Related object: Interchange6::Schema::Result::CartProduct

session

Type: belongs_to

Related object: Interchange6::Schema::Result::Session

user

Type: belongs_to

Related object: Interchange6::Schema::Result::User

METHODS

clone($name)

Return a clone of the with the new name. If a clone with the same name and same session already exists, the clone is removed and recreated anew.