NAME

Interchange6::Cart::Cost - Cart cost class for Interchange6 Shop Machine

DESCRIPTION

Cart cost class for Interchange6.

ATTRIBUTES

  • cart_costs_id

    Can be used by subclasses to tie cart cost to Interchange6::Schema::Result::CartCost.

  • name

    Unique name is required.

  • label

    Label for display. Default is same value as label.

  • relative

    Boolean defaults to 0. If true then amount is relative to Cart subtotal. If false then amount is an absolute cost.

  • inclusive

    Boolean defaults to 0. If true signifies that the cost is already included in Product price for example to calculate the tax component for gross prices.

  • amount

    Required amount of the cost. This is the absolute cost unless relative is true in which case it realtive to the Cart subtotal. For example for a tax of 8% amount should be set to 0.08

PRIVATE METHODS

_build_label

If label is not supplied then set it to the value of name.