* new SFCC provider
* add search
* normalization + search
* categories as search results
* adress PR feedback
* Update README.md
* get all paths for SSG
* product variants and options
* Apply suggestions from code review
Co-authored-by: Luis Alvarez D. <luis@vercel.com>
* remove console log
* prettier
* clean console log
* ran prettier
* Updated readme
* remove static data and revert config changes
* set default site
Co-authored-by: Luis Alvarez D. <luis@vercel.com>
* Add lodash.debounce to package.json dependencies
Shopify provider requires `lodash.debounce` package. This package is installed in BigCommerce provider, but not in Shopify provider. After BigCommerce is removed, Shopfify provider can't be installed.
This PR fixes this error
* Install lodash debounce and its @types to providers that use this package
fix(site): prevent click-outside to close children ref
* feat: Add forwardRef for compatibility
* fix(site): remove asChild for dropdown Fragment
Co-authored-by: Dom Sip <dom@vercel.com>
* Adding Dropdown Component
* Styling Issues
* Wishlist Fix
* Fixes for Wishlist View
* Hearts now work again
* Rollback ts
* Removing extra config to disable BigCommerce
* Fixes for Wishlist View
* Remove transition/animation for mobile
* New Updates.
* New Updates.
* Dropdown fix
* Polish
* export
* export
* revert tsconfig
Co-authored-by: Luis Alvarez D. <luis@vercel.com>
Co-authored-by: Dom Sip <dom@vercel.com>
Co-authored-by: Luis Alvarez D. <luis@vercel.com>
* Updated turbo version
* Added taskr to packages/local
* Move json files
* Include missing extension
* Fixed prettierignore
* Updated swc plugin
* Moved swc plugin to its own package
* Added note
* Removed unused package
* Added watch for file changes
* Added taskr deps to every package
* Added taskfile to every package
* Updated scripts in every package
* Added 2 utiity scripts
* Fix turbo dev script
* Update swc plugin to include jsx import
* Updated build script in main package.json
* Moved everything
* Figuring out how to make imports work
* Updated exports
* Added missing exports
* Added @vercel/commerce-local to `site`
* Updated commerce config
* Updated exports and commerce config
* Updated commerce hoc
* Fixed exports in local
* Added publish config
* Updated imports in site
* It's actually working
* Don't use debugger in dev for better speeds
* Improved DX when editing packages
* Set up eslint with husky
* Updated prettier config
* Added prettier setup to every package
* Moved bigcommerce
* Moved Bigcommerce to src and package updates
* Updated setup of bigcommerce
* Moved definitions script
* Moved commercejs
* Move to src
* Fixed types in commercejs
* Moved kibocommerce
* Moved kibocommerce to src
* Added package/tsconfig to kibocommerce
* Fixed imports and other things
* Moved ordercloud
* Moved ordercloud to src
* Fixed imports
* Added missing prettier files
* Moved Saleor
* Moved Saleor to src
* Fixed imports
* Replaced all imports to @commerce
* Added prettierignore/rc to all providers
* Moved shopify to src
* Build shopify in packages
* Moved Spree
* Moved spree to src
* Updated spree
* Moved swell
* Moved swell to src
* Fixed type imports in swell
* Moved Vendure to packages
* Moved vendure to src
* Fixed imports in vendure
* Added codegen to saleor
* Updated codegen setup for shopify
* Added codegen to vendure
* Added codegen to kibocommerce
* Added all packages to site's deps
* Updated codegen setup in bigcommerce
* Minor fixes
* Updated providers' names in site
* Updated packages based on Bel's changes
* Updated turbo to latest
* Fixed ts complains
* Set npm engine in root
* New lockfile install
* remove engines
* Regen lockfile
* Switched from npm to yarn
* Updated typesVersions in all packages
* Moved dep
* Updated SWR to the just released 1.2.0
* Removed "isolatedModules" from packages
* Updated list of providers and default
* Updated swell declaration
* Removed next import from kibocommerce
* Added COMMERCE_PROVIDER log
* Added another log
* Updated turbo config
* Updated docs
* Removed test logs
Co-authored-by: Jared Palmer <jared@jaredpalmer.com>
Testing locally it seems that `local` is what's used when there aren't any environment variables configured.
I'm making this change because `live` doesn't currently support `fs` functions and therefore cannot update the `paths[@framework]` in next.config.js. This means deploying the commerce template from `vercel.com/live` generates an error instead of displaying the commerce page as would be displayed when running `npm run dev` locally.
* commercejs: Initial commit with basic product list
* ui: Handle no variants on product
* commercejs: Support individual product pages
* commercejs: Use separate sdkFetch function
* commercejs: Show option hex colors based on option name
* commercejs: Support product search and filter
* commercejs: Enable carts feature
* commercejs: Remove unused API endpoints
* commercejs: Fix adding variants to cart
* commercejs: Fix types for update cart hook
* commercejs: Update README
* commercejs: Add sorting to product search
* commercejs: Add generic types to cart actions
* commercejs: Better cart normalization
* commercejs: Provide typing for sdkFetch function
* commercejs: Refactor product search logic
* commercejs: Update commercejs types package and export types from local directory
* commercejs: Remove unused checkout hooks
* commercejs: Enhance fetcher to allow custom API routes
* commercejs: Fix product types
* commercejs: Add checkout functionality
* commercejs: Add commercejs to README list of providers
* commercejs: Add login/logout auth hooks
* commercejs: Adds comment to sdkFetch function
* commercejs: Bring back empty useSignup hook to fix build
* commercejs: Refactor useCheckout hook logic
* commercejs: Add errors to fetcher function if using invalid resource/method
* commercejs: Remove use of hex colors for color variants
* ui: Fix undefined error when no variants
* commercejs: Handle add to cart when no variants
* commercejs: Enable customer auth feature
* commercejs: Rename public key env variable as commercejs
* commercejs: Remove duplicate customer fields
* commercejs: Use variants API to generate product variants
* commercejs: Fetch all products using sort order
* commercejs: Fix use of normalizeProduct function
* commercejs: Disable customer auth
* commercejs: Show selected variant details in cart view
* commercejs: Update to latest commercejs types
* commercejs: Fix login email
* commercejs: Remove unnecessary ts-ignore
* api: Allow parameter to be passed to login API
* api: Allow login handler to accept GET requests
* commercejs: Add login API for login callback email link
* commercejs: Remove unused argument to API
* commercejs: Add hook to fetch logged in customer
* commercejs: Rename token to match SDK name
* commercejs: Enable logout
* commercejs: Fix VERCEL_URL env variable
* commercejs: Fix using vercel deployment url
* commercejs: Add deployment url env vars to templates
* Replace yarn with npm
* commercejs: Allow checkout submit even without card/address details
* ui: Add loading and cart refresh to checkout
* commercejs: Leave link to issue on TODO comment
* Update docs/README/env.template for commercejs provider
* ui: Prevent toggle loading after component unmount
* commercejs: Handle product without images
* ui: Explicity set loading to false after checkout
* Revert "api: Allow parameter to be passed to login API"
This reverts commit c3713ec6e23f1b423a071a31221069995d419486.
* commercejs: Handle login using API redirect
* commercejs: Adds shipping and billing details to checkout data
* commercejs: Fix types for fetcher and submit checkout
* commercejs: Update README with demo url
* commercejs: Update checkout hooks to use checkout context
* commercejs: Update checkout logic to use customer fields
* ui: Clear checkout fields context after checkout
* commercejs: Remove unused clear checkout function
* commercejs: Import constants directly
* Include @spree/storefront-api-v2-sdk
* Add basic Spree framework structure
* Add Spree as allowed Framework
* Fetch product images, standardize API fetch using Spree SDK
* Include slug and path in products
* Fetch single product during build time
* PLP with searching by category
* Fetch Spree Categories and Brands
* Sort PLP
* Search products by name
* Fix option values collection
* Fix hasNonMasterVariants
* Sort Categories and Brands
* Add configuration to show product options when there's one variant available
* Enable text search for the Spree Framework
* Allow removing line items
* Allow updating line item quantity
* Add __typename to variant options to allow adding the selected variant to the cart
* Use fetch and Request from node-fetch in Spree SDK
* Update Spree SDK fetcher
* Show placeholder message for /chechout and adjust api fetcher type
* Use kebab case instead of camel case
* Remove outdated comments
* Remove outdated comment
* Resolve isColorProductOption duplication
* Type Spree variants and line items and temporarily remove height, width and depth
* Remove outdated comment
* Update comments about cart discounts
* Remove 'spree' prefix from isomorphicConfig and add lastUpdatedProductsPrerenderCount
* Implement getAllProductPaths to prerender some products during build time
* Adjust fetchers to the latest Spree SDK interface
* Add types to Spree taxons mapping
* Revert port change in package.json scripts
* Add basic README describing Spree installation
* Expand README's installation section
* Upgrade Spree SDK to 4.7.0 and add node-fetch to dependencies
* Order providers alphanumerically
Co-authored-by: Damian Legawiec <damian@sparksolutions.co>
* Sort products by available_on when using the Trending sorting in useSearch
* Change the default Spree port to 4000 and update README in sync with Spree Starter changes
* Save primary variant's SKU when normalizing a product from Spree
* Create a new cart if Spree can't find the current using a token
* Add separator to README
* Add missing Error subclass
* Allow placeholder images for products and line items without images
* Add image
* Reset tsconfig.json paths to originla values
* Search taxonomies by permalinks instead of IDs
* Upgrade Spree SDK to version 4.7.1
* Remove references to @framework and use relative paths instead
* Generalize TypeScript and add typings to getPage
* Update fetcher to avoid parsing non-JSON responses
* Use original product image by default instead of resized
* Link to an online demo of the Spree integration in the README
* Flatten fetcher responses
* Include Spree in the list of supported ecommerce backends in README
* Update README.md
* Format Spree's README
* Add link to the Spree demo site in the main README
* Update README.md
* Update README.md
* Allow setting a taxon id for getAllProducts
* Use Spree SDK's JSON:API helpers
* Sort getAllProducts by -updated_at when using a taxonomy
* Remove slash '/' from line item's paths
* Allow filtering variant images by option type
* Upgrade checkout behavior in line with core NextJS Commerce changes
* Remove dummy submitCheckout function
* [NX-24] Display PDP option types sorted by position from Spree
* Supply Spree primary variant if a product has no option variants
* Do not throw an error if a product doesn't have NEXT_PUBLIC_SPREE_IMAGES_OPTION_FILTER
* [NX-43] Uses image transformations when fetching products images
* Use bind to properly call Spree SDK methods and update SDK fetcher in line with SDK 4.12.0
* Fix ESLint issues in useHook
* Support account sign up, login and logout
Also
- Converts the guest cart to a persisted cart tied to the logged in user after log in.
- Fixes issues with use-remove-item. The cart will now properly refresh after an item is removed.
- Uses the logged in user's token to adjust the cart and make other authenticated requests.
- Transparently refreshed the access token of the logged in user with a refresh token. Replays requests to Spree which fail with a 401 error after refreshing the access token.
* Fetch logged in user's cart after login or signup but associate guest cart only after signup
* Support Spree default wishlist show, add and remove wished items operations
* Fetch Spree CMS Pages
* Fix login, handle critical token errors and fix WishlistCard
Fix to WishlistCard changes its props to be consistent with WishlistButton when calling useRemoveItem
* Fix variable name (#574)
Variable name should be `ChevronRight`
* Update get-cart.ts (#474)
include digital items
Co-authored-by: Gonzalo Pozzo <gonzalo.pozzo4@gmail.com>
* Update normalize.ts (#475)
add missing options property to `normalizeLineItem`
Co-authored-by: Gonzalo Pozzo <gonzalo.pozzo4@gmail.com>
* Update add-item.ts (#473)
* Update add-item.ts
include digital items
* Update add-item.ts
include digital items
Co-authored-by: Gonzalo Pozzo <gonzalo.pozzo4@gmail.com>
* fix typo (#572)
Co-authored-by: Gonzalo Pozzo <gonzalo.pozzo4@gmail.com>
* Fix authentication.refreshToken arguments
* Remove redundant comments and logs
* Fix createEmptyCart request to Spree and add option to disable auto login
* Fix formatting issues
* Apply image transformation when fetching images for products in cart
* Replace call to qs with Spree SDK built-in helper
* Upgrade Spree SDK to 5.0.1
* Rename zeitFetch import to vercelFetch
* Abstract fetcher JSON Content-Type checking into separate function
* Rename imageUrl to url
getMediaGallery already provides context for the constant
* Remove return type for getProductPath
The return type can be trivially determined from the returned value.
* Change URL to Spree demo store in root README
Co-authored-by: Gonzalo Pozzo <gonzalo.pozzo4@gmail.com>
* Change label for link to Spree demo store in Spree's README
Co-authored-by: Gonzalo Pozzo <gonzalo.pozzo4@gmail.com>
* Change URL to Spree demo store in Spree's README
Co-authored-by: Gonzalo Pozzo <gonzalo.pozzo4@gmail.com>
* Use only relative paths to /framework/spree from itself
Co-authored-by: tniezg <tomek.niezgoda@mail.com>
Co-authored-by: Damian Legawiec <damian@sparksolutions.co>
Co-authored-by: Robert Nowakowski <aplegatt@gmail.com>
Co-authored-by: Grey <57859708+greyhere@users.noreply.github.com>
Co-authored-by: pfcodes <phil@auroradigit.al>
Co-authored-by: Gonzalo Pozzo <gonzalo.pozzo4@gmail.com>
Co-authored-by: Konrad Kruk <github@konradk.pl>