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_pathObject

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)

#currencyObject

The selected currency for the cart

@return [CurrencyDrop]

#discountsObject

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

#donationsObject

Returns CartDonationDrops for any donations.

#empty?Boolean

Returns true if the cart is empty

Returns:

  • (Boolean)

#errorsCollectionDrop

Errors encountered when submitting a step during checkout.

Returns:

#include_order_bump_itemsObject

Adds order bumps to the items collection.

#information_formString

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

Returns:

  • (String)

#information_pathString

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

Returns:

  • (String)

#itemsCollectionDrop

Returns:

#items_including_order_bumpsObject

#payment_by_credits?Boolean

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

Returns:

  • (Boolean)

#payment_formString

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

Returns:

  • (String)

#possible_currenciesObject

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

@return [CollectionDrop] of [CurrencyDrop]

#product_idsCollectionDrop

The product IDs the cart contains.

Returns:

#productsCollectionDrop

The products the cart contains.

Returns:

#schedule_of_paymentsObject

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)

#subtotalObject

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

#taxesObject

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

#totalObject

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