Description Usage Arguments Value
Main function of the package. It takes three files as input patameters. Files should contain
a list of available products with their regular and special prices (productsFile),
a list of discounts for buying a bundle of two different products (discountsFile)
and a list of items which a user wants to purchase (purchaseFile. Function reads all
the input files and calculates the final cost vaue including discounts from special prices
and from bundles of two different products.
| 1 2 | mainCheckoutComponent(productsFile = "products.csv",
  purchaseFile = "purchaseItems.csv", discountsFile = "discounts.csv")
 | 
| productsFile | path to a file with a list of products. File should have 3 columns: 'Item', 'Price' and 'SpecialPrice' | 
| purchaseFile | path to a file with a list of items to be urchased. File should have 2 columns: 'Item' and 'Count' | 
| discountsFile | path to a file with a list of discounts for purchasing two different products together. File should have 3 columns: 'Item1', 'Item2' and 'Discount' | 
Function returns a data.frame with 4 columns: "Item", "Count", "Discount" and "Cost". Each row represents either a seperate product from the list of purchased items with its regular or special price or an additional discount from purchasing a bundle of two products .
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.