TryNow JavaScript SDK
Cart
The public TryNowCart interface. This is stored as a singleton on the window.trynow
object.
This class exposes public methods for cart-related interactions with the TryNow Shopify Integration.
Kind: global class
- Cart
- .isTryNowCartLimitMet() ⇒
Promise.<boolean>
- .getAmountDueToday() ⇒
Promise.<number>
- .getTryNowItemCount() ⇒
Promise.<number>
- .getIsCurrencyEligible() ⇒
Promise.<boolean>
- .getCartLimitUpperBound() ⇒
Promise.<number>
- .getSuggestedTryNowCartSize() ⇒
Promise.<number>
- .isTryNowCartLimitMet() ⇒
Cart.isTryNowCartLimitMet() ⇒ Promise.<boolean>
Promise.<boolean>
Kind: static method of Cart
Returns: Promise.<boolean>
- The boolean indicating if the TryNow cart limit has been met.
Cart.getAmountDueToday() ⇒ Promise.<number>
Promise.<number>
Kind: static method of Cart
Returns: Promise.<number>
- The amount due today as a string.
Cart.getTryNowItemCount() ⇒ Promise.<number>
Promise.<number>
Kind: static method of Cart
Returns: Promise.<number>
- The number of items in the cart that are Try Now items.
Cart.getIsCurrencyEligible() ⇒ Promise.<boolean>
Promise.<boolean>
Kind: static method of Cart
Returns: Promise.<boolean>
- The boolean indicating if the cart is eligible for TryNow.
Cart.getCartLimitUpperBound() ⇒ Promise.<number>
Promise.<number>
Kind: static method of Cart
Returns: Promise.<number>
- The upper bound of the cart limit as a number.
Cart.getSuggestedTryNowCartSize() ⇒ Promise.<number>
Promise.<number>
Kind: static method of Cart
Returns: Promise.<number>
- The suggested TryNow cart size as a number.