Shipping Addons
This document describes all necessary steps to implement an addon providing a new shipping method. Such a shipping method can be very flexible in offering delivery options and calculating price.
!! The functionality is not fully implemented and both code and documentation might be subject of change !!
Shipping registry
A new shipping addon must be agreed with API team. There will be a code (identifier) registered for the addon (usually two – one for development purposes and one for production). The following has to be provided:
- Addon must be created and its ID or URL from Shoptet administration provided
- Addon name (Czech, Slovak, English, Hungarian, German, Polish, Vietnamese and Romanian translations)
Shipping addon options
In the API Partner section, Addon details screen, there is a tab dedicated to shipping settings (visible after API team approval):
- URL of a JavaScript file implementing frontend functionality (see below)
- Price calculation – either Shoptet calculates (prices are defined in the Shoptet administration, screen Shipping Methods) or the addon itself does (because the price depends on options not available in the Shoptet). In the later case, the price is calculated on-the-fly during the ordering process.
- Delivery address handling – there are three options:
- is not needed at all (digital delivery, pickup points)
- standard Shoptet form is used (in case price and delivery options are independent of delivery address, because address is specified one step later in the order process)
- addon provides own fields for delivery address to be able to offer shipping options and price based on the address (these will be later provided via API to be stored in the order and Shoptet will suppress the standard address fields in the next step of ordering process)
- Tracking URL (placeholder
#PACKAGE_NUMBER#
will be expanded for particular orders later on)
- Link label to open a popup for shipping details selection (such as “Pickup point selection”) for the first time
- Link label to open a popup to change shipping details selection (such as “Change timeframe for delivery”) in case the popup is opened again.