Catalog (Category) Import via Script
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Catalog (Category) Import via Script
Laravel: 5.6
Aimeos: 2018.04
PHP: 7.1.18
Hi guys,
I need to import product categories from old website into this new Laravel Aimeos setup. So, can you guide me how to do it using a PHP Script. Or is there any Laravel (Aimeos) Package that could help me?
In "mshop_catalog" table, I see all catalog items (categories). I can write a PHP script that will insert new categories in this table but I noticed that "mshop_catalog" table is using Nested Set Model, which is something new for me. So, can you help me understand, how I write a script that help me with adjusting Nested Set Model also.
Thanks!
Aimeos: 2018.04
PHP: 7.1.18
Hi guys,
I need to import product categories from old website into this new Laravel Aimeos setup. So, can you guide me how to do it using a PHP Script. Or is there any Laravel (Aimeos) Package that could help me?
In "mshop_catalog" table, I see all catalog items (categories). I can write a PHP script that will insert new categories in this table but I noticed that "mshop_catalog" table is using Nested Set Model, which is something new for me. So, can you help me understand, how I write a script that help me with adjusting Nested Set Model also.
Thanks!
Re: Catalog (Category) Import via Script
You can use the catalog CSV importer if you can export your old categories in that format:
https://aimeos.org/docs/Developers/Cont ... g_from_CSV
The alternative is to create a job controller that uses the catalog manager to import an arbitrary format:
- https://aimeos.org/docs/Developers/Cont ... controller
- https://aimeos.org/api/latest/class-Aim ... ndard.html
https://aimeos.org/docs/Developers/Cont ... g_from_CSV
The alternative is to create a job controller that uses the catalog manager to import an arbitrary format:
- https://aimeos.org/docs/Developers/Cont ... controller
- https://aimeos.org/api/latest/class-Aim ... ndard.html
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Catalog (Category) Import via Script
Hi,aimeos wrote:You can use the catalog CSV importer if you can export your old categories in that format:
https://aimeos.org/docs/Developers/Cont ... g_from_CSV
The alternative is to create a job controller that uses the catalog manager to import an arbitrary format:
- https://aimeos.org/docs/Developers/Cont ... controller
- https://aimeos.org/api/latest/class-Aim ... ndard.html
Thanks for the help. I shall look into both of these solutions. Do we have similar solutions for Products, Customers, and Orders?
Please, reply!
Thanks!
Re: Catalog (Category) Import via Script
For products, there's a CSV importer too. If you want to migrate from an existing foreign system (Magento, whatever), then the best way is to write setup tasks for migrating the data if you have access to both databases simultaniously: https://aimeos.org/docs/Developers/Library/Setup_tasks
There you have the possibility to use the Aimeos managers to migrate complex data like the category tree ($this->additional is the context item) but also have to possibility to use hand written SQL statements where needed.
There you have the possibility to use the Aimeos managers to migrate complex data like the category tree ($this->additional is the context item) but also have to possibility to use hand written SQL statements where needed.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Catalog (Category) Import via Script
Hi,aimeos wrote:You can use the catalog CSV importer if you can export your old categories in that format:
https://aimeos.org/docs/Developers/Cont ... g_from_CSV
The alternative is to create a job controller that uses the catalog manager to import an arbitrary format:
- https://aimeos.org/docs/Developers/Cont ... controller
- https://aimeos.org/api/latest/class-Aim ... ndard.html
I have placed CSV file in "./public/csv" directory and changed configuration in "./config/shop.php" file like this:
Code: Select all
'controller' => [
'jobs' => array(
'catalog' => array(
'import' => array(
'csv' => array(
'location' => 'public/csv/catalog.csv'
)
)
)
)
],
Thanks!
Re: Catalog (Category) Import via Script
Execute the "catalog/import/csv" job: https://aimeos.org/docs/Laravel/Configure_cronjobs
Your location has to be a directory by default as long as you don't configure this otherwise.
Your location has to be a directory by default as long as you don't configure this otherwise.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Catalog (Category) Import via Script
Hi,aimeos wrote:Execute the "catalog/import/csv" job: https://aimeos.org/docs/Laravel/Configure_cronjobs
Your location has to be a directory by default as long as you don't configure this otherwise.
Thank you very much for your help! I successfully imported Categories. Now the next difficult task is to import products. Any helpful material on that?
Thanks!
Re: Catalog (Category) Import via Script
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Catalog (Category) Import via Script
Hi,aimeos wrote:Please read https://aimeos.org/docs/Developers/Cont ... s_from_CSV
I have very different data in JSON format. Is there any alternative method of importing product data? I want to conditionally import catalog code.
Thanks!
Re: Catalog (Category) Import via Script
Like said, create a job controller that uses the managers to import an arbitrary format directly:
- https://aimeos.org/docs/Developers/Cont ... controller
- https://aimeos.org/api/latest/namespace ... MShop.html
- https://aimeos.org/docs/Developers/Cont ... controller
- https://aimeos.org/api/latest/namespace ... MShop.html
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star