简体   繁体   中英

Import picture in gallery PIMCORE

I am using a PIMCORE version 6.5, and I would like to import product images via csv.

But the class of my product is of type "gallery" and not simple images.

When I export a test to CSV it gives me a serialized code to encrypt in Base64.

My question is that I only have the local path of my photos, and I would like to import them into my gallery. How do I proceed?

There are various solutions to this problem. What I would do is to write a little PHP Script (eg in a controller or a service) for the import.

1) Copy all your local images into some asset folder path within your Pimcore project

2) Create the assets via the PHP API: https://pimcore.com/docs/6.x/Development_Documentation/Assets/Working_with_PHP_API.html

3) Create/update the galleries via the PHP API: https://pimcore.com/docs/6.x/Development_Documentation/Objects/Object_Classes/Data_Types/Image_Types.html

Not sure why you need a .csv for this import but if you have important information or metadata there just upload it in the controller and use the information within the script in order to create the correct objects.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM