CartItem Object

class shoppingCart.cart.CartItem(cart, product, price, quantity, taxes=[], options={})[source]

Collection of Product and it’s quantity, taxes and options.

update_quantity(quantity)[source]

To update existing quantity related to Product object.

Parameters:quantity – Product quantity.
get_options()[source]
Returns:Dict of product’s option.
get_taxes()[source]
Returns:List of applied taxes.
sub_total()[source]
Returns:Total amount by multiplying product price and quantity(without discount deduction).
discount_amount()[source]
Returns:Discount amount.
untaxed_amount()[source]
Returns:Untaxed amount(after deducating discount amount).
tax_amount()[source]
Returns:Tax amount.
total()[source]
Returns:Total amount(tax excluded or tax included) by adding untaxed and taxed amount.
has_options
Returns:True if product has an option else False.
has_taxes
Returns:True if product has tax else False.
price
Returns:Price by multiplying currency rate.