Shipping outside Europe
# Shipping outside Europe (optional)
This plugin supports Sendcloud Customs documents generation for shipping outside the EU. Use the field mapping in plugin settings to map your existing product fields to the fields needed to generate the Customs documents.
To make it work, make sure you have custom fields containing HS Code and Country Of Origin configured for product or variant in Craft. After that you can select corresponding fields in the Sendcloud plugin settings:
Please make sure that the Country Of Origin field contains only ISO2 Country code (for example, “NL”) and the HS Code plugin contains a valid HS Code of the product (for example, “6403919600”).
When the order is pushed to Sendcloud, the plugin will first search for the fields on the variant level, then on the product level. If any of the fields are empty or missing, the Sendcloud plugin will simply ignore them and push the order without the international shipping information.
# Customize the Address data
# v3.x
Since version 3 of the plugin the address data is now mapped with the corresponding Craft fields. If you are still using addressLine2 for the houseNumber, you have to manipulate the data via the custom event in your module:
Event::on(JouwWebSendcloudAdapter::class,
JouwWebSendcloudAdapter::EVENT_AFTER_CREATE_ADDRESS,
static function (AddressEvent $event): void {
$address = $event->address;
$shippingAddress = $event->shippingAddress;
$address->setHouseNumber($shippingAddress->addressLine2);
$address->setAddressLine2();
}
);
# v4.x
Since version 4 of the plugin the address data is now mapped with the corresponding Craft fields. If you are still using addressLine2 for the houseNumber, you have to manipulate the data via the custom event in your module:
Event::on(SendcloudClient::class,
SendcloudClient::EVENT_AFTER_CREATE_ADDRESS,
static function (AddressEvent $event): void {
$address = $event->address;
$shippingAddress = $event->shippingAddress;
$address->setHouseNumber($shippingAddress->addressLine2);
$address->setAddressLine2(null);
}
);
# Display Sendcloud order information on the frontend (optional)
The Sendcloud plugin provides additional Twig API that can be used on your frontend to:
- Display order’s Sendcloud status and service point information.
- Display Tracking number and Tracking URL.
- Display Return portal URL.
See the variables/SendcloudVariable.php
file for more information.