SilverShop\Model\Variation\OrderItem
Product Variation - Order Item Connects a variation to an order, as a line in the order specifying the particular variation.
Synopsis
class OrderItem
extends OrderItem
{
- // members
- private static array $db = ;
- private static array $has_one = ;
- private static string $buyable_relationship = 'ProductVariation';
- private static string $table_name = 'SilverShop_Variation_OrderItem';
- // methods
- public Variation ProductVariation()
- public void onPlacement()
- public void SubTitle()
- public void Image()
- public void Width()
- public void Height()
- public void Depth()
- public void Weight()
- // Inherited methods from OrderItem
- public Product Product()
- public void onPlacement()
- public void getTableTitle()
- public void Link()
- // Inherited methods from OrderItem
- public void Buyable()
- public void UnitPrice()
- public void setUnitPrice()
- public void setQuantity()
- public void Total()
- protected void calculatetotal()
- public void uniquedata()
- public void onBeforeWrite()
- public void onPayment()
- public void onPlacement()
- public void Image()
- public ShopQuantityField QuantityField()
- public string addLink()
- public string removeLink()
- public string removeallLink()
- public string setquantityLink()
- // Inherited methods from OrderAttribute
- public void canCreate()
- public void canDelete()
- public void isLive()
- public string getTableTitle()
- public void getCartTitle()
- public void ShowInTable()
Hierarchy
Tasks
Line | Task |
---|---|
43 | this might need some unit testing to make sure it compliles with comment description |
146 | also combine with all ancestors of this->class |
Members
private
- $buyable_relationship
- $db
- $has_one
- $table_name
Methods
public
- Depth()
- Height()
- Image()
- ProductVariation() — Overloaded relationship, for getting versioned variations
- SubTitle()
- Weight()
- Width()
- onPlacement()
Inherited from SilverShop\Model\Product\OrderItem
public
- Link()
- Product() — Get related product - live version if in cart, or - historical version if order is placed
- getTableTitle()
- onPlacement()
Inherited from SilverShop\Model\OrderItem
protected
- calculatetotal() — Calculates the total for this item.
public
- Buyable() — Get the buyable object related to this item.
- Image() — Get the buyable image.
- QuantityField()
- Total() — Get calculated total, or stored total depending on whether the order is in cart
- UnitPrice() — Get unit price for this item.
- addLink()
- onBeforeWrite() — Recalculate total before saving to database.
- onPayment()
- onPlacement() — Event handlier called for last time saving/processing, before item permanently stored in database.
- removeLink()
- removeallLink()
- setQuantity() — Prevent quantity being below 1.
- setUnitPrice() — Prevent unit price ever being below 0
- setquantityLink()
- uniquedata() — Intersects this item's required_fields with the data record.
Inherited from SilverShop\Model\OrderAttribute
public
- ShowInTable()
- canCreate()
- canDelete()
- getCartTitle()
- getTableTitle() — Produces a title for use in templates.
- isLive()