Calling Developers!
We are reenergizing our code contribution process! Learn More

How to create custom Shipping Method using script not with Manually by admin.

anandthakkar
anandthakkar Sr Software Engineer Posts: 4 πŸ§‘πŸ»β€πŸš€ - Cadet

Hi Team,

I want to create custom Shipping Method using script not with Manually by admin. Please tell me how to do that.

Thanks in advance.

Best Answer

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,005 βš–οΈ - Guardians (admin)
    edited August 2023 Answer βœ“

    Heyhey,

    Then, it seems to be rather simple:

    Have a look at the files shipment.csv, shipment_method_store.csv and shipment_price.csv in the data/import folder.

    Adjustments there and a re-import should likely be what you are looking for :)

    If this will solve your problem, I would be happy if you could mark this answer as "resolved my question" 🀘

    All the best,

    Florian

Answers

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,005 βš–οΈ - Guardians (admin)

    Heyhey,

    have you already looked into the code of the Back Office or in the data import, how it is done there?

    When you talk about "using script" it is not clear for me how you want to trigger the creation. By custom console command? Via data-import? Via api-call?

    All the best,

    Florian

  • anandthakkar
    anandthakkar Sr Software Engineer Posts: 4 πŸ§‘πŸ»β€πŸš€ - Cadet

    Hello @fsmeier

    Thanks for your response.

    I need to create Custom shipiing method vai "custom module" or vai "data import". So we do not need to create it manually from Admin every time when we move the project to new instance or new server.



  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,005 βš–οΈ - Guardians (admin)
    edited August 2023 Answer βœ“

    Heyhey,

    Then, it seems to be rather simple:

    Have a look at the files shipment.csv, shipment_method_store.csv and shipment_price.csv in the data/import folder.

    Adjustments there and a re-import should likely be what you are looking for :)

    If this will solve your problem, I would be happy if you could mark this answer as "resolved my question" 🀘

    All the best,

    Florian

  • anandthakkar
    anandthakkar Sr Software Engineer Posts: 4 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited August 2023

    Hello @fsmeier

    Thanks for the response.

    It has resolved my question.


    Thanks,
    Anand Thakkar