Ability to work with Slovak parcel service with soap API
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist matejch/yii2-parcel "dev-main"
or add
"matejch/yii2-parcel": "dev-main"
to the require section of your composer.json
file.
./yii migrate --migrationPath=@vendor/matejch/yii2-parcel/src/migrations
'parcel' => [
'class' => \matejch\parcel\Parcel::class,
/* change if you use rbac rules, and want to have specific rule */
'controllerAccessRules' => ['@'],
/* soap ulr for slovak parcel service */
'wsdlurl' => 'https://webship.sps-sro.sk/services/WebshipWebService?wsdl',
/* xml containing all available drop off points */
'placeurl' => 'https://balikomat.sps-sro.sk/alternativneMiesta.xml',
/* random key for saving parcel account information in database, file can be also used */
'key' => '',
/* array of models that are allowed for creating model maps and packages */
'models' => ['app\models\Order','app\models\Complaint'],
'pickUpAddressModel' => '\app\models\Address'
]
{key_of_module_you_use_in_web.php}/parcel/index
/* FOR EXMAPLE */
/** parcel/parcel-account/index */
/** parcel/parcel-shop/index */
/** parcel/parcel-shipment/index */
/** parcel/parcel-model-map/index */
parcel/parcel-account/index
Your accounts
parcel/parcel-shop/index
Command for loading parcel delivery places exists
./yii parcel/parcel-shop/init
For creating model map you need set 'pickUpAddressModel' in your module setting and at least one model in 'models'