Sunnysideup\Ecommerce\Interfaces\BuyableModel
describes the buyable classes CONTENT: //GROUPS AND SIBLINGS //IMAGES //VERSIONING //ORDER ITEM //LINKS //TEMPLATE STUFF //CRUD SETTINGS.
Synopsis
interface BuyableModel
{
- // methods
- public void MainParentGroup()
- public DataList Siblings()
- public Image BestAvailableImage()
- public string CMSThumbnail()
- public string DefaultImageLink()
- public DataObject getVersionOfBuyable()
- public OrderItem OrderItem()
- public string classNameForOrderItem()
- public void setAlternativeClassNameForOrderItem()
- public int QuantityDecimals()
- public void HasBeenSold()
- public string AddLink()
- public string IncrementLink()
- public string DecrementLink()
- public string RemoveLink()
- public string RemoveAllLink()
- public string RemoveAllAndEditLink()
- public string SetSpecificQuantityItemLink()
- public string AddToCartAndGoToCheckoutLink()
- public bool IsInCart()
- public EcomQuantityField EcomQuantityField()
- public EcommerceConfigAjax AJAXDefinitions()
- public bool IsProductVariation()
- public string AllowPurchaseNice()
- public float CalculatedPrice()
- public void getCalculatedPrice()
- public DBMoney CalculatedPriceAsMoney()
- public void getCalculatedPriceAsMoney()
- public bool canPurchase()
Methods
public
- AJAXDefinitions() — returns the instance of EcommerceConfigAjax for use in templates.
- AddLink() — passing on shopping cart links ...is this necessary?? ...why not just pass the cart?
- AddToCartAndGoToCheckoutLink()
- AllowPurchaseNice() — Turn AllowPurchase into Yes or no.
- BestAvailableImage() — returns a "BestAvailable" image if the current one is not available In some cases this is appropriate and in some cases this is not.
- CMSThumbnail() — Little hack to show thumbnail in summary fields in modeladmin in CMS.
- CalculatedPrice() — Products have a standard price, but for specific situations they have a calculated price.
- CalculatedPriceAsMoney() — How do we display the price?
- DecrementLink() — Link used to remove one from cart we can do this, because by default remove link removes one.
- DefaultImageLink() — returns a link to the standard image.
- EcomQuantityField()
- HasBeenSold() — Has it been sold?
- IncrementLink() — link use to add (one) to cart.
- IsInCart()
- IsProductVariation() — Is it a variation?
- MainParentGroup() — Returns the direct parent (group) for the product.
- OrderItem() — returns the order item associated with the buyable.
- QuantityDecimals() — This is used when you add a product to your cart if you set it to 1 then you can add 0.1 product to cart.
- RemoveAllAndEditLink() — remove all of this buyable's orderitem from cart and go through to this buyble to add alternative selection.
- RemoveAllLink() — remove all of this buyable's orderitem from cart.
- RemoveLink() — remove one buyable's orderitem from cart.
- SetSpecificQuantityItemLink() — set new specific new quantity for buyable's orderitem.
- Siblings() — Returns Buybales in the same group.
- canPurchase() — Is the product for sale?
- classNameForOrderItem() — you can overwrite this function in your buyable items (such as Product).
- getCalculatedPrice()
- getCalculatedPriceAsMoney()
- getVersionOfBuyable() — Action to return specific version of a product.
- setAlternativeClassNameForOrderItem() — You can set an alternative class name for order item using this method.