Add file attachment to the order details page in Shopware 5

Add file attachment to the order details page in Shopware 5

Add file attachment to the order details page in Shopware 5

How to add a upload function for Shopware order detail page?

  1. Create a table in the database.    
  2. Add and edit some files in shopware:/engine/Shopware/Models/Order/OrderFiles.php (新建)
    /engine/Shopware/Controllers/Backend/Order.php (edit)
    /themes/Backend/ExtJs/backend/order/view/detail/uploads.js (create new file)
    /themes/Backend/ExtJs/backend/order/view/detail/window.js (edit)
    /themes/Backend/ExtJs/backend/order/app.js (edit)
    /media/order_files/ (create new folder)
  3. Setup the file permission.
  4. Clear cache and refresh the page, now you can see an extra tab Uploads.
  5. Files format can be limited to JPG or PDF.

What's Your Reaction?

like

dislike

love

funny

angry

sad

wow