The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Interchange6::Cart::Product - Cart product class for Interchange6 Shop Machine

DESCRIPTION

Cart product class for Interchange6.

ITEM ATTRIBUTES

Each cart product has the following attributes:

cart_products_id

Can be used by subclasses to tie cart products to Interchange6::Schema::Result::CartProduct.

sku

Unique product identifier is required.

name

Product name is required.

quantity

Product quantity is optional and has to be a natural number greater than zero. Default for quantity is 1.

price

Product price is required and a positive number.

Price is required, because you want to maintain the price that was valid at the time of adding to the cart. Should the price in the shop change in the meantime, it will maintain this price. If you would like to update the pages, you have to do it before loading the cart page on your shop.

uri

Product uri

METHODS

subtotal

Returns subtotal for this cart product. The subtotal is calculated by the multiplication of price and quantity.