PluginProbe
Packeta / 2.3.2
Packeta v2.3.2
2.3.2 2.3.1 trunk 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.3.0 1.3.1 1.3.2 1.4 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 All 56 releases
← All changes | src/Packetery/Module/Order/Attribute.php +62 -17 1.5.22.3.2 View file →
@@ -23,8 +23,9 @@
23 23 public const POINT_STREET = 'packetery_point_street';
24 24 public const POINT_PLACE = 'packetery_point_place'; // Business name of pickup point.
25 25 public const CARRIER_ID = 'packetery_carrier_id';
26 26 public const POINT_URL = 'packetery_point_url';
27 + public const POINT_TYPE = 'packetery_point_type';
27 28
28 29 public const ADDRESS_IS_VALIDATED = 'packetery_address_isValidated';
29 30 public const ADDRESS_HOUSE_NUMBER = 'packetery_address_houseNumber';
30 31 public const ADDRESS_STREET = 'packetery_address_street';
@@ -34,53 +35,62 @@
34 35 public const ADDRESS_COUNTRY = 'packetery_address_country';
35 36 public const ADDRESS_LATITUDE = 'packetery_address_latitude';
36 37 public const ADDRESS_LONGITUDE = 'packetery_address_longitude';
37 38
39 + public const CAR_DELIVERY_ID = 'packetery_car_delivery_id';
40 + public const EXPECTED_DELIVERY_FROM = 'packetery_car_delivery_from';
41 + public const EXPECTED_DELIVERY_TO = 'packetery_car_delivery_to';
42 +
38 43 /**
39 44 * Pickup point attributes configuration.
40 45 *
41 - * @var array[]
46 + * @var array<string, array<string, string|bool>>
42 47 */
43 - public static $pickupPointAttrs = [
44 - 'id' => [
48 + public static $pickupPointAttributes = [
49 + 'id' => [
45 50 'name' => self::POINT_ID,
46 51 'required' => true,
47 52 ],
48 - 'name' => [
53 + 'name' => [
49 54 'name' => self::POINT_NAME,
50 - 'required' => true,
55 + 'required' => false,
51 56 ],
52 - 'city' => [
57 + 'city' => [
53 58 'name' => self::POINT_CITY,
54 - 'required' => true,
59 + 'required' => false,
55 60 ],
56 - 'zip' => [
61 + 'zip' => [
57 62 'name' => self::POINT_ZIP,
58 - 'required' => true,
63 + 'required' => false,
59 64 ],
60 - 'street' => [
65 + 'street' => [
61 66 'name' => self::POINT_STREET,
62 - 'required' => true,
67 + 'required' => false,
63 68 ],
64 - 'place' => [
69 + 'place' => [
65 70 'name' => self::POINT_PLACE,
66 71 'required' => false,
67 72 ],
68 - 'carrierId' => [
73 + 'carrierId' => [
69 74 'name' => self::CARRIER_ID,
70 75 'required' => false,
71 76 ],
72 - 'url' => [
77 + 'url' => [
73 78 'name' => self::POINT_URL,
74 79 'required' => false,
75 80 ],
81 + 'pickupPointType' => [
82 + 'name' => self::POINT_TYPE,
83 + 'required' => false,
84 + ],
76 85 ];
86 +
77 87 /**
78 88 * Home delivery attributes configuration.
79 89 *
80 - * @var array[]
90 + * @var array<string, array<string, string|bool>>
81 91 */
82 - public static $homeDeliveryAttrs = [
92 + public static $homeDeliveryAttributes = [
83 93 'isValidated' => [
84 94 'name' => self::ADDRESS_IS_VALIDATED,
85 95 // Name of checkout hidden form field. Must be unique in entire form.
86 96 'isWidgetResultField' => false,
@@ -85,9 +95,9 @@
85 95 // Name of checkout hidden form field. Must be unique in entire form.
86 96 'isWidgetResultField' => false,
87 97 // Is attribute included in widget result address? By default, it is.
88 98 ],
89 - 'houseNumber' => [ // post type address field called 'houseNumber'.
99 + 'houseNumber' => [
90 100 'name' => self::ADDRESS_HOUSE_NUMBER,
91 101 ],
92 102 'street' => [
93 103 'name' => self::ADDRESS_STREET,
@@ -110,7 +120,42 @@
110 120 'name' => self::ADDRESS_LATITUDE,
111 121 ],
112 122 'longitude' => [
113 123 'name' => self::ADDRESS_LONGITUDE,
124 + ],
125 + ];
126 +
127 + /**
128 + * Car delivery attributes configuration.
129 + *
130 + * @var array<string, array<string, string|bool>>
131 + */
132 + public static $carDeliveryAttributes = [
133 + 'carDeliveryId' => [
134 + 'name' => self::CAR_DELIVERY_ID,
135 + 'isWidgetResultField' => false,
136 + ],
137 + 'street' => [
138 + 'name' => self::ADDRESS_STREET,
139 + ],
140 + 'houseNumber' => [
141 + 'name' => self::ADDRESS_HOUSE_NUMBER,
142 + ],
143 + 'city' => [
144 + 'name' => self::ADDRESS_CITY,
145 + ],
146 + 'postalCode' => [
147 + 'name' => self::ADDRESS_POST_CODE,
148 + ],
149 + 'country' => [
150 + 'name' => self::ADDRESS_COUNTRY,
151 + ],
152 + 'expectedDeliveryDayFrom' => [
153 + 'name' => self::EXPECTED_DELIVERY_FROM,
154 + 'isWidgetResultField' => false,
155 + ],
156 + 'expectedDeliveryDayTo' => [
157 + 'name' => self::EXPECTED_DELIVERY_TO,
158 + 'isWidgetResultField' => false,
114 159 ],
115 160 ];
116 161 }