Class: CartDrop

Inherits:
Liquid::Simplero::Drop show all
Defined in:
app/drops/cart_drop.rb

Overview

CartDrop represents a shopping cart on an account for a particular user or session. It is available as cart on site pages.

Instance Method Summary collapse

Methods inherited from Liquid::Simplero::Drop

#dom_id

Instance Method Details

#base_path ⇒ Object

The base path for this cart.

@return [String]

#can_have_discount? ⇒ Boolean

Returns true if the items in this cart can have a discount applied.

Returns:

  • (Boolean)

#contains_items? ⇒ Boolean

Returns true if the cart has anything in it

Returns:

  • (Boolean)

#currency ⇒ Object

The selected currency for the cart

@return [CurrencyDrop]

#discounts ⇒ Object

Returns CartDiscountDrops. Each CartItem with a discount applied will get a separate entry.

#donations ⇒ Object

Returns CartDonationDrops for any donations.

#empty? ⇒ Boolean

Returns true if the cart is empty

Returns:

  • (Boolean)

#errors ⇒ CollectionDrop

Errors encountered when submitting a step during checkout.

Returns:

#include_order_bump_items ⇒ Object

Adds order bumps to the items collection.

#information_form ⇒ String

The form for the Information step of checkout. This will only work within cart pages.

Returns:

  • (String)

#information_path ⇒ String

Path of the information page (the first step of checkout)

Returns:

  • (String)

#items ⇒ CollectionDrop

Returns:

#items_including_order_bumps ⇒ Object

#payment_by_credits? ⇒ Boolean

Returns true if the items in this cart are paid for by credits.

Returns:

  • (Boolean)

#payment_form ⇒ String

The form for the Payment step of checkout. This will only work within cart pages.

Returns:

  • (String)

#possible_currencies ⇒ Object

Returns a collection of all currencies that all items in the cart can be purchased in.

@return [CollectionDrop] of [CurrencyDrop]

#product_ids ⇒ CollectionDrop

The product IDs the cart contains.

Returns:

#products ⇒ CollectionDrop

The products the cart contains.

Returns:

#schedule_of_payments ⇒ Object

Returns HTML for a schedule of payments for future charges.

#show_schedule_of_payments? ⇒ Boolean

Returns true if the cart items should show a schedule of payments for future charges. Returns false if not (there are no future charges).

Returns:

  • (Boolean)

#single_product? ⇒ Boolean

Returns true if this is a single-product cart. Note that a multi-product cart can have a single product in it, in which case this still returns false.

@return [Boolean]

Returns:

  • (Boolean)

#subtotal ⇒ Object

Returns a MoneyDrop for the subtotal of all items (before taxes or coupons).

#taxes ⇒ Object

Returns CartTaxDrops for all items in the cart. Items with the same kind of tax will be combined.

#total ⇒ Object

Returns a MoneyDrop for the total of all items (after taxes and coupons).