What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hi I want to insert data in glossary module with the help of CSV file Can some one suggest me the be

Posts: 26 πŸ§‘πŸ»β€πŸš€ - Cadet

Hi
I want to insert data in glossary module with the help of CSV file
Can some one suggest me the best way to do it ..?

Welcome!

It looks like you're new here. Sign in or register to get started.

Comments

  • Lead Spryker Solution Architect / Technical Director Posts: 690 πŸͺ - Explorer

    Adapt the data/import/common/common/glossary.csv and run docker/sdk console data:import:glossary

  • Posts: 26 πŸ§‘πŸ»β€πŸš€ - Cadet

    I want to upload from back office button click
    as we have one button which will take CSV data and once we upload CSV file it should insert data into database

  • Lead Spryker Solution Architect / Technical Director Posts: 690 πŸͺ - Explorer

    There is no out of the box functionality to upload a glossary csv.
    But you can follow \Pyz\Zed\DataImport\Business\Model\Glossary\GlossaryWriterStep::execute to implement these functionality

  • Posts: 26 πŸ§‘πŸ»β€πŸš€ - Cadet

    @UL6DGRULR
    Hi
    How do read CSV file from our Custom Controller
    Is there any best way to do it ?

  • Lead Spryker Solution Architect / Technical Director Posts: 690 πŸͺ - Explorer

    https://www.php.net/manual/en/function.fgetcsv.php#refsect1-function.fgetcsv-examples or you use the \Pyz\Zed\DataImport\Business\Reader\CsvReader that should be part of the B2C/B2B demoshop.
    I would just upload the glossary.csv to either a temporary storage (e.g.: /tmp) or if you have a shared file system available, like S3, to this one and pass the import task itself to DataImport module, which already provides all the necessary functionality to import a glossary.csv (use \Spryker\Zed\DataImport\Business\DataImportFacade::importByAction)

Welcome!

It looks like you're new here. Sign in or register to get started.