https://github.com/crystallizeapi/crystallize-magento-import
Importing magento catalogue in Crystallize
https://github.com/crystallizeapi/crystallize-magento-import
Last synced: 2 months ago
JSON representation
Importing magento catalogue in Crystallize
- Host: GitHub
- URL: https://github.com/crystallizeapi/crystallize-magento-import
- Owner: CrystallizeAPI
- License: mit
- Created: 2020-03-31T10:43:43.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-03-04T09:30:59.000Z (almost 3 years ago)
- Last Synced: 2025-01-20T17:24:10.004Z (11 months ago)
- Language: JavaScript
- Size: 118 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# crystallize-magento-import
## Exporting Magento catalogue and importing/migrating to Crystallize
This script allows easier transition from Magento to [Crystallize](https://crystallize.com). It handles importing of product and folder structure, while respecting product association to multiple folders. You can use this script to import the product catalogue from Magento to Crystallize periodically or use it to migrate to Crystallize.
Crystallize is a fast GraphQL based [PIM](https://crystallize.com/product/product-information-management) to build [headless eCommerce](https://crystallize.com/product) solutions. If you are migrating from Magento to Crystallize you should check out the [Open Source React eCommerce Boilerplate](https://crystallize.com/learn/open-source/boilerplates/react-nextjs).
If you stumbled upon this script check out the concepts of how to build [fast React eCommerce](https://crystallize.com/developers) using Crystallize.
### Set up the Configuration
The import script requires a number of environment variables to set up before running, like your Magento integration and Crystallize keys. These can be passed as arguments when running the script or be setup in the lib/config.js file.
### Two import modes
Since importing a catalogue might be a very time consuming process, we have set up a single SKU import script command. This gives you the ability to test things like, creating a product shape that fits your information architecture, and start building bottom to top.
Import a single product by running:
```
SKU=*your_sku* yarn run single
```
Import the entire catalogue by running:
```
yarn run import
```
### Shape it to your needs
From SKUs to content, every case can vary in structure and logic and you can tweak the script to fit these needs. The core logic of the script is focused around:
- lib/helpers/map-product.js
- lib/helpers/map-folder.js
- lib/crystallize/mutations
- lib/crystallize/index.js
### Clean information Architecture
The import script follows Crystallize’s modern topic-based approach. Multiple categories can be associated to products by creating them as topics. Starting from top to bottom, the script will create a tree topic-structure and tag products with topics based on naming.
These can be specified as arguments in index.js file. The script behaviour can be altered in these files:
- lib/helpers/category-filter
- lib/crystallize/index.js (createTopics)
\* Notice that by default the topics generated by the categories passed as arguments will not be included in the catalogue structure.