1.1.1 • Published 7 months ago

gatsby-theme-thepuzzlers-cart v1.1.1

Weekly downloads
-
License
-
Repository
-
Last release
7 months ago

Gatsby Theme ThePuzzlers Cart

Adds the shopping cart & checkout process for a Boxenstop site.

Getting Started

  1. Download from npm: yarn add gatsby-theme-thepuzzlers-cart.
  2. Add plugin to your gatsby-config.js file with the required theme options.
  3. Add GATSBY_STRIPE_PUBLISHABLE_KEY=pk_test_*** as an environment variable.

Theme Options

ThePuzzlers Theme Options

OptionValueDescriptionRequired
urlStringSpecify the boxenstop api urlYes
stripeReturnUrlStringSpecify the url, that stripe should return to a successful payment. In development that woul be: http://localhost:8000/checkoutYes
business_idStringSpecify the id of the businessYes
stripeAccountIdStringSpecify the id of the business's stripe accountYes
orderTypesStringList all provided orderTypes in an array. Possible types: "POSTAL", "DELIVERY", "PICKUP"Yes
acceptsCashPaymentBooleanSet to true if you accept cash payments for delivery and pickup orders. Defaults to false.No
intlThemeOptionsIntlThemeConfigThe configuration you would usually pass to the gatsby-theme-thepuzzlers-intl plugin. You don't have to add the intl theme separately when you have the cart theme installed.Yes
cacheConfigObjectAny additional configuration that you want to pass to the InMemoryCache of @apollo/client.No

Shopping Cart Context

ValueTypeDescription
itemsArray of Order ItemsReturns all items in the cart
pickupItemsArray of Order ItemsReturns all items in the cart with the selected order type of pickup
shippingItemsArray of Order ItemsReturns all items in the cart with the selected order type of pickup
deliveryItemsArray of Order ItemsReturns all items in the cart with the selected order type of pickup
clearCartFnEmpties all items in shopping cart
addItemFnAdds the specified cart item
removeItemFnRemoves the specified cart item
incrementItemFnIncreases the quantity of the specified cart item
decrementItemFnDecreases the quantity of the specified cart item
totalItemsNumberReturns the number of items currently in the cart/
totalAmountNumberReturns the total price of all the items in the cart
lastSelectedOrderTypeOrderTypeThe orderType of the item that was last added to the cart

Theme Pages

/cart

/checkout

Theme Components

  • Shopping Cart

Custom Hooks

Business Hooks

  • useBusinessProfile
  • useBusinessSettings
  • useBusinessLegalDetails
  • useSocialLinks
  • useShippingFee
  • useBusinessId
  • useCurrency

Opening Hours Hooks

  • useOpeningHours
  • useDeliveryHours
  • useDayOff
  • useDaysOff

Product Hooks

  • useProduct
  • useProducts

Box Hooks

  • useBox
  • useBoxes

Utility Hooks

  • useNextAvailablePickupTime when passed a pickupLocationId this hook returns the next possible pickupTime of that location. Otherwise it returns the next possible pickupTime out of all pickupLocations of the business.
  • useNextAvailableDeliveryTime
  • useProductSelection
  • useFormatPrice (Returns a function that can be used to format any number to a price). It takes the locale of the page and the currency set in boxenstop into account.
1.1.1

7 months ago

1.1.0

7 months ago

1.0.0

1 year ago

0.13.1

2 years ago

0.13.2

2 years ago

0.13.3

2 years ago

0.13.4

2 years ago

0.11.0

2 years ago

0.12.0

2 years ago

0.12.1

2 years ago

0.12.2

2 years ago

0.12.3

2 years ago

0.12.4

2 years ago

0.12.5

2 years ago

0.10.12

2 years ago

0.10.13

2 years ago

0.10.9

2 years ago

0.10.1

2 years ago

0.10.2

2 years ago

0.10.3

2 years ago

0.10.4

2 years ago

0.10.5

2 years ago

0.10.6

2 years ago

0.10.7

2 years ago

0.10.8

2 years ago

0.10.0

2 years ago

0.9.0

2 years ago

0.7.1

2 years ago

0.7.0

2 years ago

0.9.8

2 years ago

0.9.7

2 years ago

0.9.4

2 years ago

0.9.6

2 years ago

0.5.10

2 years ago

0.5.11

2 years ago

0.6.7

2 years ago

0.6.6

2 years ago

0.6.9

2 years ago

0.6.8

2 years ago

0.5.16

2 years ago

0.5.15

2 years ago

0.5.4

2 years ago

0.5.3

2 years ago

0.5.6

2 years ago

0.5.5

2 years ago

0.5.2

2 years ago

0.5.1

2 years ago

0.5.8

2 years ago

0.5.7

2 years ago

0.5.9

2 years ago

0.6.3

2 years ago

0.6.2

2 years ago

0.6.5

2 years ago

0.6.4

2 years ago

0.6.1

2 years ago

0.6.0

2 years ago

0.4.9

2 years ago

0.4.8

2 years ago

0.5.0

2 years ago

0.4.10

2 years ago

0.4.15

2 years ago

0.4.16

2 years ago

0.4.5

2 years ago

0.4.4

2 years ago

0.4.7

2 years ago

0.4.6

2 years ago

0.3.30

3 years ago

0.3.29

3 years ago

0.3.20

3 years ago

0.3.28

3 years ago

0.3.27

3 years ago

0.3.26

3 years ago

0.3.25

3 years ago

0.3.24

3 years ago

0.3.23

3 years ago

0.3.22

3 years ago

0.3.21

3 years ago

0.3.19

3 years ago

0.3.18

3 years ago

0.3.17

3 years ago

0.3.16

3 years ago

0.3.15

3 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.4.2

2 years ago

0.3.9

3 years ago

0.3.14

3 years ago

0.3.13

3 years ago

0.3.12

3 years ago

0.3.11

3 years ago

0.3.10

3 years ago

0.3.6

3 years ago

0.3.5

3 years ago

0.3.8

3 years ago

0.3.7

3 years ago

0.3.2

3 years ago

0.3.1

3 years ago

0.3.4

3 years ago

0.3.3

3 years ago

0.2.20

3 years ago

0.2.7

3 years ago

0.2.6

3 years ago

0.2.5

3 years ago

0.1.60

3 years ago

0.2.0

3 years ago

0.1.44

3 years ago

0.1.20

3 years ago

0.1.21

3 years ago

0.1.22

3 years ago

0.1.23

3 years ago

0.1.24

3 years ago

0.1.25

3 years ago

0.1.26

3 years ago

0.1.27

3 years ago

0.1.28

3 years ago

0.1.4

3 years ago