Class: CartDrop
- Inherits:
-
Liquid::Simplero::Drop
- Object
- Liquid::Drop
- Liquid::Simplero::Drop
- CartDrop
- 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
-
#base_path ⇒ Object
The base path for this cart.
-
#can_have_discount? ⇒ Boolean
Returns true if the items in this cart can have a discount applied.
-
#contains_items? ⇒ Boolean
Returns true if the cart has anything in it.
-
#currency ⇒ Object
The selected currency for the cart @return [CurrencyDrop].
-
#discounts ⇒ Object
Returns CartDiscountDrops.
-
#donations ⇒ Object
Returns CartDonationDrops for any donations.
-
#empty? ⇒ Boolean
Returns true if the cart is empty.
-
#errors ⇒ CollectionDrop
Errors encountered when submitting a step during checkout.
-
#include_order_bump_items ⇒ Object
Adds order bumps to the items collection.
-
#information_form ⇒ String
The form for the Information step of checkout.
-
#information_path ⇒ String
Path of the information page (the first step of checkout).
- #items ⇒ CollectionDrop
- #items_including_order_bumps ⇒ Object
-
#payment_by_credits? ⇒ Boolean
Returns true if the items in this cart are paid for by credits.
-
#payment_form ⇒ String
The form for the Payment step of checkout.
-
#possible_currencies ⇒ Object
Returns a collection of all currencies that all items in the cart can be purchased in.
-
#product_ids ⇒ CollectionDrop
The product IDs the cart contains.
-
#products ⇒ CollectionDrop
The products the cart contains.
-
#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.
-
#single_product? ⇒ Boolean
Returns true if this is a single-product cart.
-
#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.
-
#total ⇒ Object
Returns a MoneyDrop for the total of all items (after taxes and coupons).
Methods inherited from Liquid::Simplero::Drop
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.
#contains_items? ⇒ Boolean
Returns true if the cart has anything in it
#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
#errors ⇒ CollectionDrop
Errors encountered when submitting a step during checkout.
#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.
#information_path ⇒ String
Path of the information page (the first step of checkout)
#items ⇒ CollectionDrop
#items_including_order_bumps ⇒ Object
#payment_by_credits? ⇒ Boolean
Returns true if the items in this cart are paid for by credits.
#payment_form ⇒ String
The form for the Payment step of checkout. This will only work within cart pages.
#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.
#products ⇒ CollectionDrop
The products the cart contains.
#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).
#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]
#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).