Skip to content

Commit 84aaae1

Browse files
feat: small package belgium (#859)
1 parent 38dd95a commit 84aaae1

File tree

4 files changed

+22
-9
lines changed

4 files changed

+22
-9
lines changed

Model/Sales/Repository/PackageRepository.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,7 @@ public function setPackageSmallSettings(string $carrierPath = self::XML_PATH_POS
324324
*/
325325
private function fitInPackageSmall(): bool
326326
{
327-
return AbstractConsignment::CC_BE !== $this->getCurrentCountry()
328-
&& $this->isPackageSmallActive()
327+
return $this->isPackageSmallActive()
329328
&& $this->getWeight() <= $this->getMaxPackageSmallWeight();
330329
}
331330

Ui/Component/Listing/Column/TrackActions.php

+19-7
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function prepareDataSource(array $dataSource)
8989
'hidden' => ! $orderManagementActivated,
9090
];
9191
} else {
92-
$item[$this->getData('name')]['action-download_package_label'] = [
92+
$item[$this->getData('name')]['action-download_package_label'] = [
9393
'href' => $this->urlBuilder->getUrl(
9494
'myparcel/order/CreateAndPrintMyParcelTrack',
9595
[
@@ -101,6 +101,18 @@ public function prepareDataSource(array $dataSource)
101101
'label' => __('Download package label'),
102102
'hidden' => $orderManagementActivated,
103103
];
104+
$item[$this->getData('name')]['action-download_small_package_label'] = [
105+
'href' => $this->urlBuilder->getUrl(
106+
'myparcel/order/CreateAndPrintMyParcelTrack',
107+
[
108+
'selected_ids' => $item['entity_id'],
109+
'mypa_package_type' => 6,
110+
'mypa_request_type' => 'download',
111+
]
112+
),
113+
'label' => __('Download small package label'),
114+
'hidden' => $orderManagementActivated,
115+
];
104116
$item[$this->getData('name')]['action-download_digital_stamp_label'] = [
105117
'href' => $this->urlBuilder->getUrl(
106118
'myparcel/order/CreateAndPrintMyParcelTrack',
@@ -113,7 +125,7 @@ public function prepareDataSource(array $dataSource)
113125
'label' => __('Download digital stamp label'),
114126
'hidden' => $orderManagementActivated,
115127
];
116-
$item[$this->getData('name')]['action-download_mailbox_label'] = [
128+
$item[$this->getData('name')]['action-download_mailbox_label'] = [
117129
'href' => $this->urlBuilder->getUrl(
118130
'myparcel/order/CreateAndPrintMyParcelTrack',
119131
[
@@ -125,7 +137,7 @@ public function prepareDataSource(array $dataSource)
125137
'label' => __('Download mailbox label'),
126138
'hidden' => $orderManagementActivated,
127139
];
128-
$item[$this->getData('name')]['action-download_letter_label'] = [
140+
$item[$this->getData('name')]['action-download_letter_label'] = [
129141
'href' => $this->urlBuilder->getUrl(
130142
'myparcel/order/CreateAndPrintMyParcelTrack',
131143
[
@@ -137,7 +149,7 @@ public function prepareDataSource(array $dataSource)
137149
'label' => __('Download letter label'),
138150
'hidden' => $orderManagementActivated,
139151
];
140-
$item[$this->getData('name')]['action-create_concept'] = [
152+
$item[$this->getData('name')]['action-create_concept'] = [
141153
'href' => $this->urlBuilder->getUrl(
142154
'myparcel/order/CreateAndPrintMyParcelTrack',
143155
[
@@ -148,7 +160,7 @@ public function prepareDataSource(array $dataSource)
148160
'label' => __('Create new concept'),
149161
'hidden' => $orderManagementActivated,
150162
];
151-
$item[$this->getData('name')]['action-ship_direct'] = [
163+
$item[$this->getData('name')]['action-ship_direct'] = [
152164
'href' => $this->urlBuilder->getUrl(
153165
'adminhtml/order_shipment/start',
154166
[
@@ -162,7 +174,7 @@ public function prepareDataSource(array $dataSource)
162174
}
163175

164176
if (isset($item[ShippingStatus::NAME])) {
165-
$item[$this->getData('name')]['action-create_concept'] = [
177+
$item[$this->getData('name')]['action-create_concept'] = [
166178
'href' => $this->urlBuilder->getUrl(
167179
'myparcel/order/CreateAndPrintMyParcelTrack',
168180
[
@@ -173,7 +185,7 @@ public function prepareDataSource(array $dataSource)
173185
'label' => __('Already exported'),
174186
'hidden' => ! $orderManagementActivated,
175187
];
176-
$item[$this->getData('name')]['action-download_package_label'] = [
188+
$item[$this->getData('name')]['action-download_package_label'] = [
177189
'href' => $this->urlBuilder->getUrl(
178190
'myparcel/order/CreateAndPrintMyParcelTrack',
179191
[

i18n/fr_FR.csv

+1
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ Home address only,Livraison à domicile uniquement
8989
Hide sender title,Titre de masquer l'expéditeur
9090
Insured up to:,Assuré jusqu'à :
9191
Download package label,Télécharger l'étiquette du colis
92+
Download small package label,Télécharger l'étiquette du petit colis
9293
Create new concept,Créer une nouveau concept
9394
Create shipment,Créer un envoi
9495
Please select an item from the list,Sélectionnez une commande dans la liste

i18n/nl_NL.csv

+1
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ MyParcel options,MyParcel opties
144144
Package,Pakket
145145
Insured up to:,Verzekeren tot:
146146
Download package label,Download pakket label
147+
Download small package label,Download klein pakket label
147148
Download digital stamp label,Download digitalepostzegel label
148149
Download mailbox label,Download brievenbuspakje label
149150
Download letter label,Download ongefrankeerd label

0 commit comments

Comments
 (0)