$30 off During Our Annual Pro Sale. View Details »

Shopware 6: plugins and migration

Shopware 6: plugins and migration

Michael Telgmann

May 23, 2019
Tweet

Other Decks in Programming

Transcript

  1. The new platform: Plugins & Migration

    View Slide

  2. @holger_tk @mitelg
    Holger-Thomas Kaßner Michael Telgmann
    Squad Leader Shopware Services Developer Core & Services

    View Slide

  3. What to expect?
    Plugin basics
    Extending Shopware 6
    All about Migration

    View Slide

  4. Plugins

    View Slide

  5. View Slide

  6. Community

    View Slide

  7. Let´s talk about plugins in

    View Slide

  8. View Slide

  9. View Slide

  10. View Slide

  11. Plugin Manager

    View Slide

  12. Shopware 6 Plugin Manager

    View Slide

  13. View Slide

  14. Connecting to your account

    View Slide

  15. The basic structure

    View Slide

  16. Shopware 6 plugin structure

    View Slide

  17. composer.json
    composer.json is required!
    type „shopware-platform-plugin“
    „shopware-plugin-class“ is required
    Label is required
    you must use psr-0 or psr-4

    View Slide

  18. Plugin base class

    View Slide

  19. Resources directory

    View Slide

  20. Extending Shopware 6

    View Slide

  21. Events

    View Slide

  22. Types of events
    loading the product
    detail page
    product page loader DAL*
    *data abstraction layer
    CRUD events for all entities
    page loaded events for the storefront

    View Slide

  23. Business events
    order created send confirmation mail
    customer registers receive voucher

    View Slide

  24. Business events
    order created send confirmation mail
    customer registers receive voucher

    View Slide

  25. Controllers

    View Slide

  26. Defining controllers

    View Slide

  27. Entities

    View Slide

  28. Creating entities

    View Slide

  29. Creating entities

    View Slide

  30. Creating entities

    View Slide

  31. Creating entities
    http://shopware.local/api/v1/swag-bundle/4a30f0a83cae4a26b82848e303be3614

    View Slide

  32. Extending entities
    attributes custom fields
    json format
    used for simple additional data

    View Slide

  33. Extending entities

    View Slide

  34. Extending entities

    View Slide

  35. Creating a custom admin module

    View Slide

  36. Creating a custom admin module

    View Slide

  37. Creating a custom
    admin module

    View Slide

  38. Extending the storefront

    View Slide

  39. Extending the storefront

    View Slide

  40. Extending the storefront

    View Slide

  41. Custom line items

    View Slide

  42. Custom line items

    View Slide

  43. Custom line items

    View Slide

  44. Custom line items

    View Slide

  45. Custom line items

    View Slide

  46. Custom line items

    View Slide

  47. Cart

    View Slide

  48. Cart calculation

    View Slide

  49. Price rounding

    View Slide

  50. Calculated cart

    View Slide

  51. View Slide

  52. View Slide

  53. Preparing your plugin for Shopware 6

    View Slide

  54. Migration

    View Slide

  55. Migration as holistic topic
    content- /
    data migration
    environment- /
    plugin migration

    View Slide

  56. Connector
    Plugin
    Migration
    (Account)
    Migration
    Assistant

    View Slide

  57. Plugin Migration
    Assistant
    License migration to Shopware 6

    View Slide

  58. Plugin successors?

    View Slide

  59. Shop overview

    View Slide

  60. Plugin Migration Assistant (Account)

    View Slide

  61. Plugin Migration Assistant (Account)

    View Slide

  62. Plugin Migration Assistant (Account)

    View Slide

  63. Plugin Migration Assistant (Account)

    View Slide

  64. Plugin Migration Assistant (Account)

    View Slide

  65. When?

    View Slide

  66. Data Migration

    View Slide

  67. Community Day 2019
    Data Migration history
    SW3 SW4 „migration scripts“
    Shopware one-click update
    Shopware 5 migration plugin

    View Slide

  68. Shopware 5 Migration Plugin

    View Slide

  69. Shopware 5 Migration Plugin

    View Slide

  70. Migration Assistant
    Data migration to Shopware 6

    View Slide

  71. Creating a connection

    View Slide

  72. View Slide

  73. View Slide

  74. Checking data & pre-mapping

    View Slide

  75. View Slide

  76. Start migrating

    View Slide

  77. View Slide

  78. … that’s all

    View Slide

  79. Migration process
    Fetch Convert Mapping
    Write
    Process media & documents

    View Slide

  80. complete migration
    support for big data amounts
    simple operation for the user
    partial / repeated updates
    as automated as possible
    extensibility
    What we want to achieve
    performance
    stability
    extensibility

    View Slide

  81. Technical concepts
    connection
    profiles
    gateways
    data selections
    converter
    writer
    media handlers

    View Slide

  82. Shopware Migration
    Assistant plugin
    structure

    View Slide

  83. We like the concept of
    working with profiles from the
    Shopware 5 migration tool

    View Slide

  84. Profiles acting as an entry point into migration
    Profiles contain the gateways - i.e. the types of
    connection to the source
    Profiles can be added or extended
    Extensibility through profiles

    View Slide

  85. View Slide

  86. Tagged Services
    using the Dependency Injection Container of
    Symfony
    get collected on initialization
    way to integrate your services into other system

    View Slide

  87. Gateways
    Shopware 6 platform
    Shopware migration tool (Plugin)
    Gateways

    View Slide

  88. SCD 2019
    Api Plugin („api gateway“)
    new API endpoints in Shopware 5
    read-only interface
    high performance - no ORM
    extensibility

    View Slide

  89. SCD 2019
    Local migration („local gateway“)
    Installation of 5 & 6 on one server
    Connection to local database
    Migration of media from the local installation folder

    View Slide

  90. Gateway classes

    View Slide

  91. Data selections

    View Slide

  92. View Slide

  93. Dataset

    View Slide

  94. Premapping

    View Slide

  95. View Slide

  96. Converters

    View Slide

  97. Converter classes

    View Slide

  98. Data writer

    View Slide

  99. Processing media
    solution for downloading media via api plugin
    solution for local migration
    resolving paths for different strategies

    View Slide

  100. Migration in a nutshell

    View Slide

  101. Shopware Migration
    Connector
    Migration via fast API

    View Slide

  102. View Slide

  103. View Slide

  104. Functionality Migration Connector
    information about compatibility
    of your environment with
    Shopware 6
    new api endpoints for fast read
    actions
    dynamic endpoint to request 3rd
    party tables

    View Slide

  105. Now available!

    View Slide

  106. Finally

    View Slide

  107. Get in touch with the new tools
    docs.shopware.com
    academy.shopware.com
    github.com/shopware

    View Slide

  108. Thank your for your patience!
    Time for Q&A

    View Slide