Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extend ProductProcessor to import products with variants #265

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

olimination
Copy link
Contributor

@olimination olimination commented Jul 21, 2021

Q A
Bug fix? no
New feature? yes
BC breaks? no
Fixed tickets #200

Add support for importing Product variants with their related Product options.

Current solution notes:

  • Product options need to be prefixed in the csv file with "Product_Option_<OPTION_CODE_NAME>"
  • The Product options need to exist already in Sylius
  • To create different Product variants, you set the same "Code" for each product row, so the relationship between the Product and Product variants can be managed without any additional "Parent Code" column for example. (Did not work, because you also want to set some Code for the variant itself)

Still open todo:

  • Tests
  • Export logic (use separate task for it)
  • Docs update ✔️

@olimination olimination force-pushed the import-export-product-options-and-variants branch 3 times, most recently from 668bb88 to e4f1fe6 Compare October 14, 2021 14:15
@olimination olimination force-pushed the import-export-product-options-and-variants branch from 1591c85 to 99c416f Compare November 16, 2021 20:50
@vasilvestre
Copy link
Contributor

There's a lot left to do ? I will need this :)

@olimination
Copy link
Contributor Author

Hi @vasilvestre
not so much anymore I think :)
The core logic is here, we use it already for some customer, till now we haven't discovered any bigger issues, so I assume it works so far :)

What I see what's still missing is:

  • Resync with main/master, resolving conflicts, retest
  • Update/Write some tests
  • Docs
  • Export logic -> but here I would rather go for handling this in a separate issue

Unfortunately currently my time is very restricted, not sure when I can finalize the open stuff...sorry for that...

@Lovnish
Copy link

Lovnish commented Jan 25, 2023

I need to import products with variations. Can you provide me csv file sample with variations

@Lovnish
Copy link

Lovnish commented Jan 25, 2023

And one more thing these two files in need to replpace in vendor

@olimination olimination force-pushed the import-export-product-options-and-variants branch from 99c416f to e9cb746 Compare February 23, 2023 10:28
@vasilvestre
Copy link
Contributor

You are done with the new commit ? I will ask @oallain for a workflow approval :)

@oallain
Copy link
Member

oallain commented Feb 23, 2023

Workflow is running

@olimination olimination force-pushed the import-export-product-options-and-variants branch from e9cb746 to 2ee663f Compare February 23, 2023 16:56
@olimination olimination changed the title extend ProductProcessor to import product options and variants extend ProductProcessor to import products with variants Feb 23, 2023
@olimination
Copy link
Contributor Author

I have rebased the new changes from master to this branch and I have also added a sample csv file in tests/Behat/Resources/fixtures/products_and_variants.csv (@Lovnish what you have asked for) and added some doc notes in the README file to explain the behaviour a bit.

I still could not manage to write some automated tests. This is my first time using Behat&Co. (I usually code in Java/Kotlin/Scala :)) so I still need some more time.

@vasilvestre: If you like, you could use the dev dependency and add the repository to your composer.json and use it/test it already for your use case: "friendsofsylius/sylius-import-export-plugin": "dev-import-export-product-options-and-variants" till the tests are done. The core logic should be fine so far...but I was just the only tester :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants