File tree Expand file tree Collapse file tree 5 files changed +43
-0
lines changed
install/class_source/optional
Newsletter/ProviderHandler Expand file tree Collapse file tree 5 files changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ Following options to prepare the customer class are available:
5050 * ` zip ` : input field
5151 * ` city ` : input field
5252 * ` countryCode ` : country selection
53+ * ` customerLanguage ` : language selection
5354 * ` email ` : email field
5455 * ` phone ` : input field
5556 * ` manualSegments ` : objects relation to ` CustomerSegments ` or objects with metadata to ` CustomerSegments ` with
Original file line number Diff line number Diff line change 215215 "visibleGridView" : false ,
216216 "visibleSearch" : false ,
217217 "defaultValueGenerator" : " "
218+ },
219+ {
220+ "fieldtype" : " language" ,
221+ "onlySystemLanguages" : false ,
222+ "options" : null ,
223+ "width" : " " ,
224+ "defaultValue" : null ,
225+ "optionsProviderClass" : null ,
226+ "optionsProviderData" : null ,
227+ "queryColumnType" : " varchar" ,
228+ "columnType" : " varchar" ,
229+ "columnLength" : 190 ,
230+ "phpdocType" : " string" ,
231+ "dynamicOptions" : false ,
232+ "name" : " customerLanguage" ,
233+ "title" : " Customer Language" ,
234+ "tooltip" : " " ,
235+ "mandatory" : false ,
236+ "noteditable" : false ,
237+ "index" : false ,
238+ "locked" : false ,
239+ "style" : " " ,
240+ "permissions" : null ,
241+ "datatype" : " data" ,
242+ "relationType" : false ,
243+ "invisible" : false ,
244+ "visibleGridView" : false ,
245+ "visibleSearch" : false ,
246+ "defaultValueGenerator" : " "
218247 }
219248 ],
220249 "locked" : false
Original file line number Diff line number Diff line change @@ -164,6 +164,11 @@ public function getPhone(): ?string;
164164 */
165165 public function setPhone (?string $ phone );
166166
167+ /**
168+ * @return string|null
169+ */
170+ public function getCustomerLanguage ();
171+
167172 /**
168173 * @return CustomerSegmentInterface[]|ObjectMetadata[]
169174 */
Original file line number Diff line number Diff line change @@ -116,4 +116,8 @@ public function needsExportByNewsletterProviderHandler(NewsletterProviderHandler
116116 {
117117 return $ this ->getPublished () && $ this ->getActive ();
118118 }
119+
120+ public function getCustomerLanguage () {
121+ return null ;
122+ }
119123}
Original file line number Diff line number Diff line change @@ -566,6 +566,10 @@ public function buildEntry(MailchimpAwareCustomerInterface $customer)
566566 'merge_fields ' => $ mergeFields
567567 ];
568568
569+ if ($ language = $ customer ->getCustomerLanguage ()) {
570+ $ entry ['language ' ] = $ language ;
571+ }
572+
569573 if ($ interests = $ this ->buildCustomerSegmentData ($ customer )) {
570574 $ result ['interests ' ] = $ interests ;
571575 }
You can’t perform that action at this time.
0 commit comments