Skip to content

madetech/solidus_wms

Repository files navigation

SolidusWms

Build Status Code Climate Test Coverage

Adds additional API endpoints, and state machine events to the Spree::Shipment to provide an integration with your WMS of choice.

Installation

Add solidus_wms to your Gemfile:

gem 'solidus_wms'

Bundle your dependencies and run the installation generator:

bundle
bundle exec rails g solidus_wms:install

Testing

First bundle your dependencies, then run rake. rake will default to building the dummy app if it does not exist, then it will run specs, and Rubocop static code analysis. The dummy app can be regenerated by using rake test_app.

bundle
bundle exec rake

When testing your applications integration with this extension you may use it's factories. Simply add this require statement to your spec_helper:

require 'solidus_wms/factories'

Endpoints

/api/shipments/:id/receive Moves a Shipment from ready to recieved /api/shipments/:id/pick Moves a Shipment from received to picked

/api/orders/:id/export Marks an order as exported, by touching the exported_at /api/order/to_export Lists all orders ready to export before a provided timestamp

/xlsx-export/orders Basic auth protected endpoint to export orders to .xlsx

Excel Order export

In your host application, create the following configuration:

Spree::WmsConfig.order_xls_export_class = Exporter::Xlsx::Order

This class needs to provide the custom application specific data to the Axlsx exporter An example of this data structure is:

   [
      {
        name: 'Worksheet 1',
        headers: [
          'Create Date',
          'Status',
        ],
        orders: [
          [order_1.created_at, 'complete'],
          [order_2.created_at, 'complete'],
        ]
      }
    ]

There is an #on_success callback that can be used for custom functionality in the host application. In our case we use it to exclude already exported orders.

Copyright (c) 2016 Seb Ashton and Made Tech released under the New BSD License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published