bigcommerce / storefront-data-hooks

Hooks for React Storefront UI Components
MIT License
166 stars 36 forks source link

Support query params in cart hooks #68

Closed jorgemasta closed 3 years ago

jorgemasta commented 3 years ago

Allow to define at hook level the parameter include, to be able to include more elements in the cart response. This allows, for example, to receive the different options of the products added to the cart.

const { data } = useCart({ include: ['line_items.physical_items.options']})

Based on: https://developer.bigcommerce.com/api-reference/store-management/carts/cart/getacart

magicspon commented 3 years ago

aaaawesome! thanks @jorgemasta

magicspon commented 3 years ago

Any idea when this will be merged/released?

jorgemasta commented 3 years ago

Probably next week we will release our latest changes, including this. Sorry for the delay @magicspon