Cashier JavaScript Code Documentation

Create Order Item

Creates a new order item based on the provided item and adds it to the order list.

Parameter: item (type: HTMLElement) - The item to be added to the order list.


function createOrderItem(item) {
    // Function code for createOrderItem
    // ...
}
        

Change Category

Changes the category of displayed items in the item list based on the provided category.

Parameter: category (type: string) - The category to filter the item list by.


function changeCategory(category) {
    // Function code for changeCategory
    // ...
}
        

Get Options

Retrieves and displays options for a given item.

Parameter: item (type: HTMLElement) - The item for which options are to be displayed.


function getOptions(item) {
    // Function code for getOptions
    // ...
}
        

Show Options

Shows the options for a given item.

Parameters: item (type: HTMLElement) - The item for which options are to be shown. options_clone (type: HTMLElement) - The cloned options element to be displayed.


function showOptions(item, options_clone) {
    // Function code for showOptions
    // ...
}