To integrate with Magento, most of the functionality should work out-of-the box if Magento exposes a working GraphQL API.
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
During customer login, GraphCommerce queries Magento to determine whether the
customer account already exists. To do this the following setting must be set to
Yes:
Stores -> Configuration -> Sales -> Checkout -> Checkout Options -> Enable Guest Checkout Login
If this is not set correctly, customers will not be able to log in, since they will always be prompted to create a new account.