| @@ -34,14 +34,18 @@ | ||
| 34 | 34 | public const ADDRESS_COUNTRY = 'packetery_address_country'; |
| 35 | 35 | public const ADDRESS_LATITUDE = 'packetery_address_latitude'; |
| 36 | 36 | public const ADDRESS_LONGITUDE = 'packetery_address_longitude'; |
| 37 | 37 | |
| 38 | + public const CAR_DELIVERY_ID = 'packetery_car_delivery_id'; | |
| 39 | + public const EXPECTED_DELIVERY_FROM = 'packetery_car_delivery_from'; | |
| 40 | + public const EXPECTED_DELIVERY_TO = 'packetery_car_delivery_to'; | |
| 41 | + | |
| 38 | 42 | /** |
| 39 | 43 | * Pickup point attributes configuration. |
| 40 | 44 | * |
| 41 | - * @var array[] | |
| 45 | + * @var array<string, array<string, string|bool>> | |
| 42 | 46 | */ |
| 43 | - public static $pickupPointAttrs = [ | |
| 47 | + public static $pickupPointAttributes = [ | |
| 44 | 48 | 'id' => [ |
| 45 | 49 | 'name' => self::POINT_ID, |
| 46 | 50 | 'required' => true, |
| 47 | 51 | ], |
| @@ -73,14 +77,15 @@ | ||
| 73 | 77 | 'name' => self::POINT_URL, |
| 74 | 78 | 'required' => false, |
| 75 | 79 | ], |
| 76 | 80 | ]; |
| 81 | + | |
| 77 | 82 | /** |
| 78 | 83 | * Home delivery attributes configuration. |
| 79 | 84 | * |
| 80 | - * @var array[] | |
| 85 | + * @var array<string, array<string, string|bool>> | |
| 81 | 86 | */ |
| 82 | - public static $homeDeliveryAttrs = [ | |
| 87 | + public static $homeDeliveryAttributes = [ | |
| 83 | 88 | 'isValidated' => [ |
| 84 | 89 | 'name' => self::ADDRESS_IS_VALIDATED, |
| 85 | 90 | // Name of checkout hidden form field. Must be unique in entire form. |
| 86 | 91 | 'isWidgetResultField' => false, |
| @@ -85,9 +90,9 @@ | ||
| 85 | 90 | // Name of checkout hidden form field. Must be unique in entire form. |
| 86 | 91 | 'isWidgetResultField' => false, |
| 87 | 92 | // Is attribute included in widget result address? By default, it is. |
| 88 | 93 | ], |
| 89 | - 'houseNumber' => [ // post type address field called 'houseNumber'. | |
| 94 | + 'houseNumber' => [ | |
| 90 | 95 | 'name' => self::ADDRESS_HOUSE_NUMBER, |
| 91 | 96 | ], |
| 92 | 97 | 'street' => [ |
| 93 | 98 | 'name' => self::ADDRESS_STREET, |
| @@ -110,7 +115,42 @@ | ||
| 110 | 115 | 'name' => self::ADDRESS_LATITUDE, |
| 111 | 116 | ], |
| 112 | 117 | 'longitude' => [ |
| 113 | 118 | 'name' => self::ADDRESS_LONGITUDE, |
| 119 | + ], | |
| 120 | + ]; | |
| 121 | + | |
| 122 | + /** | |
| 123 | + * Car delivery attributes configuration. | |
| 124 | + * | |
| 125 | + * @var array<string, array<string, string|bool>> | |
| 126 | + */ | |
| 127 | + public static $carDeliveryAttributes = [ | |
| 128 | + 'carDeliveryId' => [ | |
| 129 | + 'name' => self::CAR_DELIVERY_ID, | |
| 130 | + 'isWidgetResultField' => false, | |
| 131 | + ], | |
| 132 | + 'street' => [ | |
| 133 | + 'name' => self::ADDRESS_STREET, | |
| 134 | + ], | |
| 135 | + 'houseNumber' => [ | |
| 136 | + 'name' => self::ADDRESS_HOUSE_NUMBER, | |
| 137 | + ], | |
| 138 | + 'city' => [ | |
| 139 | + 'name' => self::ADDRESS_CITY, | |
| 140 | + ], | |
| 141 | + 'postalCode' => [ | |
| 142 | + 'name' => self::ADDRESS_POST_CODE, | |
| 143 | + ], | |
| 144 | + 'country' => [ | |
| 145 | + 'name' => self::ADDRESS_COUNTRY, | |
| 146 | + ], | |
| 147 | + 'expectedDeliveryDayFrom' => [ | |
| 148 | + 'name' => self::EXPECTED_DELIVERY_FROM, | |
| 149 | + 'isWidgetResultField' => false, | |
| 150 | + ], | |
| 151 | + 'expectedDeliveryDayTo' => [ | |
| 152 | + 'name' => self::EXPECTED_DELIVERY_TO, | |
| 153 | + 'isWidgetResultField' => false, | |
| 114 | 154 | ], |
| 115 | 155 | ]; |
| 116 | 156 | } |