To integrate with Magento, most of the functionality should work out-of-the box if Magento exposes a working GraphQL API.
Some additional configuration may be required, which is documented below.
Currently, the GraphQL API also has some bugs and limitations which in some cases requires a patch to work around, please see Known issues
Configure the Base Link Url's to match your GraphCommerce frontend URL per
storeview with the locale included. e.g. https://graphcommerce.vercel.app/nl/
Unsecure:
Stores -> Configuration -> General -> Web -> Base URLs -> Base Link Url
Secure:
Stores -> Configuration -> General -> Web -> Base URLs (secure) -> Base Link Url
If you are including the store code in the URL you can configure the above on the website scope without the locale added.
To properly redirect to the actual URL used in the fontend add redirects to next.config.js:
/** @type {import('next').NextConfig} */
const config = {
async redirects() {
return [
{ source: '/b2b_nl/:path*', destination: '/nl/:path*', permanent: false },
{ source: '/b2b_en/:path*', destination: '/en/:path*', permanent: false },
]
},
}
Set the number of address lines to 3. (default is 2)
For Magento Open Source:
Stores -> Configuration -> Customers -> Customer Configuration -> Name and address options
For Adobe Commerce:
Stores -> Attributes -> Customer Address -> street -> Lines Count
GraphCommerce does not support URL suffixes, because Next.js can not handle urls
ending in .html
. When migrating from an existing shop, GraphCommerce will
automatically redirect to the suffix-less URL. However, GraphCommerce will need
to do an additional query to Magento to find the route.
If you are starting out from a new project, we recommend to remove the URL suffixes from products and categories.
Remove the URL suffixes from products and categories. (default is .html
)
Stores -> Configuration -> Catalog -> Catalog -> Search Engine Optimization -> Product URL Suffix
Stores -> Configuration -> Catalog -> Catalog -> Search Engine Optimization -> Category URL Suffix