vholik / medusa-custom-attributes

Plugin that extends MedusaJs with custom attributes API
70 stars 17 forks source link

CSV Export / Import support? #11

Open hmmhmmhm opened 7 months ago

hmmhmmhm commented 7 months ago

Do the additional fields created by this plugin support CSV import/export? And if not, would it be best to create my own custom import/exporter?

vholik commented 7 months ago

No it doesn't support CSV import/export, If you want to contribute and create this functionality I will verify it and if everything will be great it would be released in a next version.

hmmhmmhm commented 7 months ago

@vholik Fuuu.... To be honest, I really need this feature. However, I'm not sure if this is something that can be done in the plugin at the moment, as I don't have a lot of time on my hands right now, so I'll probably end up creating a separate extraction page or script rather than modifying this plugin.

I'm also looking to see if there are any ideas or breakthroughs that could solve this at the plugin level, but my knowledge of Medusa plugins is still pretty shallow. I'll give it a shot though.

vholik commented 7 months ago

You can create migration script that parse from csv and on every attribute it would make POST request to add it.

TrinhQuangvo commented 6 months ago

You can create migration script that parse from csv and on every attribute it would make POST request to add it.

how can i add the thumbnail for each of attributes ?

vholik commented 6 months ago

You can create migration script that parse from csv and on every attribute it would make POST request to add it.

how can i add the thumbnail for each of attributes ?

You can use metadata field in attribute model to add your thumbnail or store whatever data you like, also you can add metadata to every attribute value. https://github.com/vholik/medusa-custom-attributes/blob/main/src/models/attribute.ts