Deprecated since version 0.1.5: Projects that wish to continue using this integration should vendor the
lorikeet.extras.starshipit package within their own projects; it will be removed from Lorikeet before version 1.0 is released.
This integration posts orders to StarShipIT, a cloud-based fulfilment software provider.
- Make sure Lorikeet is installed with the
starshipitextra, by running
pip install https://gitlab.com/abre/lorikeet.git[starshipit].
- Set the
settings.pyto your StarShipIT API key.
- Configure your site to call
lorikeet.extras.starshipit.submit.submit_orders()periodically (using e.g. a management command, django-cron or Celery Beat). If you’re using Celery, there’s a task at
lorikeet.extras.starshipit.tasks.submit_ordersthat you can add to your
To work with StarShipIT, all of your cart item and delivery address models should implement a
.starshipit_repr() method. These methods should return a dictionary with keys expected by StarShipIT’s Create Order API endpoint: the ShipmentItem parameters for a cart item, and DestinationDetails for a delivery address.
If you can’t do this (for instance, you have cart items or delivery addresses provided by a third-party package), create a
STARSHIPIT_REPR setting in your
settings.py. This setting should be a dictionary where the keys are cart item or delivery address model names, and the values are functions that take an instance of that model and return the appropriate value.