From ebe968535fba21de9371147af419c940cbece335 Mon Sep 17 00:00:00 2001 From: Boris van Katwijk Date: Fri, 27 Oct 2023 14:49:30 +0200 Subject: [PATCH] [FEATURE][IN23-253] Update module to be compatible with Magento 2.4.6-p3 and PHP 8.2 --- Block/Checkout/LayoutProcessor.php | 181 ++++---- CHANGELOG.md | 99 +++++ COPYING.txt | 6 + Helper/Data.php | 143 ++++--- README.md | 4 +- composer.json | 40 +- etc/adminhtml/system.xml | 10 +- etc/config.xml | 8 +- etc/frontend/di.xml | 2 +- etc/module.xml | 7 +- i18n/en_US.csv | 5 - i18n/nl_NL.csv | 5 - registration.php | 13 +- .../layout/customer_account_create.xml | 4 +- .../frontend/layout/customer_address_form.xml | 4 +- .../experius/customer/address/edit.phtml | 283 ++++++++----- .../experius/customer/form/register.phtml | 391 +++++++++++++----- view/frontend/web/template/group/group.html | 2 +- 18 files changed, 812 insertions(+), 395 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 COPYING.txt delete mode 100644 i18n/en_US.csv delete mode 100644 i18n/nl_NL.csv diff --git a/Block/Checkout/LayoutProcessor.php b/Block/Checkout/LayoutProcessor.php index 2b246de..8a54d98 100644 --- a/Block/Checkout/LayoutProcessor.php +++ b/Block/Checkout/LayoutProcessor.php @@ -1,122 +1,167 @@ scopeConfig = $scopeConfig; - $this->logger = $logger; - $this->addressLineHelper = $addressLineHelper; + protected ScopeConfigInterface $scopeConfig, + protected LoggerInterface $logger, + protected Data $addressLineHelper + ) { } - public function process($result){ - - if(!$this->addressLineHelper->getModuleConfig('enabled')) { - return $result; + /** + * @inheritdoc + */ + public function process($jsLayout) + { + if (!$this->addressLineHelper->getModuleConfig('enabled')) { + return $jsLayout; } - if(isset($result['components']['checkout']['children']['steps']['children'] - ['shipping-step']['children']['shippingAddress']['children'] - ['shipping-address-fieldset'])) { - - $shippingFields = $result['components']['checkout']['children']['steps']['children'] - ['shipping-step']['children']['shippingAddress']['children'] - ['shipping-address-fieldset']['children']; + if (isset($jsLayout['components']['checkout'] + ['children']['steps'] + ['children']['shipping-step'] + ['children']['shippingAddress'] + ['children']['shipping-address-fieldset']) + ) { + $shippingFields = $jsLayout['components']['checkout'] + ['children']['steps'] + ['children']['shipping-step'] + ['children']['shippingAddress'] + ['children']['shipping-address-fieldset'] + ['children']; $shippingFields = $this->modifyStreetUiComponents($shippingFields); - $result['components']['checkout']['children']['steps']['children'] - ['shipping-step']['children']['shippingAddress']['children'] - ['shipping-address-fieldset']['children'] = $shippingFields; + $jsLayout['components']['checkout'] + ['children']['steps'] + ['children']['shipping-step'] + ['children']['shippingAddress'] + ['children']['shipping-address-fieldset'] + ['children'] = $shippingFields; } - $result = $this->getBillingFormFields($result); + $jsLayout = $this->getBillingFormFields($jsLayout); - return $result; + return $jsLayout; } - - public function getBillingFormFields($result){ - - if(isset($result['components']['checkout']['children']['steps']['children'] - ['billing-step']['children']['payment']['children'] - ['payments-list'])) { - - $paymentForms = $result['components']['checkout']['children']['steps']['children'] - ['billing-step']['children']['payment']['children'] - ['payments-list']['children']; - - foreach ($paymentForms as $paymentMethodForm => $paymentMethodValue) { - + /** + * @param $jsLayout + * @return array + */ + public function getBillingFormFields($jsLayout) + { + if (isset($jsLayout['components']['checkout'] + ['children']['steps'] + ['children']['billing-step'] + ['children']['payment'] + ['children']['payments-list']) + ) { + $paymentForms = $jsLayout['components']['checkout'] + ['children']['steps'] + ['children']['billing-step'] + ['children']['payment'] + ['children']['payments-list'] + ['children']; + + foreach (array_keys($paymentForms) as $paymentMethodForm) { $paymentMethodCode = str_replace('-form', '', $paymentMethodForm); - if (!isset($result['components']['checkout']['children']['steps']['children']['billing-step']['children']['payment']['children']['payments-list']['children'][$paymentMethodCode . '-form'])) { + if (!isset($jsLayout['components']['checkout'] + ['children']['steps'] + ['children']['billing-step'] + ['children']['payment'] + ['children']['payments-list'] + ['children'][$paymentMethodCode . '-form']) + ) { continue; } - $billingFields = $result['components']['checkout']['children']['steps']['children'] - ['billing-step']['children']['payment']['children'] - ['payments-list']['children'][$paymentMethodCode . '-form']['children']['form-fields']['children']; + $billingFields = $jsLayout['components']['checkout'] + ['children']['steps'] + ['children']['billing-step'] + ['children']['payment'] + ['children']['payments-list'] + ['children'][$paymentMethodCode . '-form'] + ['children']['form-fields'] + ['children']; $billingFields = $this->modifyStreetUiComponents($billingFields); - $result['components']['checkout']['children']['steps']['children'] - ['billing-step']['children']['payment']['children'] - ['payments-list']['children'][$paymentMethodCode . '-form']['children']['form-fields']['children'] = $billingFields; - + $jsLayout['components']['checkout'] + ['children']['steps'] + ['children']['billing-step'] + ['children']['payment'] + ['children']['payments-list'] + ['children'][$paymentMethodCode . '-form'] + ['children']['form-fields'] + ['children'] = $billingFields; } } - return $result; - + return $jsLayout; } + /** + * @param $addressResult + * @return array + */ public function modifyStreetUiComponents($addressResult) { - if(isset($addressResult['street']['label'])){ + if (isset($addressResult['street']['label'])) { unset($addressResult['street']['label']); unset($addressResult['street']['required']); } - if(isset($addressResult['street'])){ + if (isset($addressResult['street'])) { unset($addressResult['street']['children'][1]['validation']); unset($addressResult['street']['children'][2]['validation']); } - if(isset($addressResult['street']['config']['template'])) { + if (isset($addressResult['street']['config']['template'])) { $addressResult['street']['config']['template'] = 'Experius_AddressLines/group/group'; } - if(isset($addressResult['street']['config']['additionalClasses'])) { - $addressResult['street']['config']['additionalClasses'] = $addressResult['street']['config']['additionalClasses'] . ' experius-address-lines'; + if (isset($addressResult['street']['config']['additionalClasses'])) { + $addressResult['street']['config']['additionalClasses'] = + $addressResult['street']['config']['additionalClasses'] . ' experius-address-lines'; } $lineCount = 0; - while($lineCount < 4){ - - $lineNumber = $lineCount+1; + while ($lineCount < 4) { - if(isset($addressResult['street']['children'][$lineCount])){ + $lineNumber = $lineCount + 1; + + if (isset($addressResult['street']['children'][$lineCount])) { $label = $this->addressLineHelper->getLineLabel($lineNumber); - - if ( $this->addressLineHelper->isLineEnabled($lineNumber)) { + + if ($this->addressLineHelper->isLineEnabled($lineNumber)) { $addressResult['street']['children'][$lineCount]['label'] = $label; $addressResult['street']['children'][$lineCount]['additionalClasses'] = 'experius-address-line-one'; - $addressResult['street']['children'][$lineCount]['validation'] = $this->addressLineHelper->getValidationClassesAsArrayForLine($lineNumber); - $addressResult['street']['children'][$lineCount]['required'] = ($this->addressLineHelper->isLineRequired($lineNumber)) ? True : False; + $addressResult['street']['children'][$lineCount]['validation'] = + $this->addressLineHelper->getValidationClassesAsArrayForLine($lineNumber); + $addressResult['street']['children'][$lineCount]['required'] = + (bool)$this->addressLineHelper->isLineRequired($lineNumber); } } @@ -125,6 +170,4 @@ public function modifyStreetUiComponents($addressResult) return $addressResult; } - - } diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..6e77341 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,99 @@ +## 1.3.0 (2023-10-27) + +[View Release](git@github.com:experius/Magento-2-Module-Experius-Address-Lines.git/commits/tag/1.3.0) + +* [FEATURE][IN23-253] Update module to be compatible with Magento 2.4.6-p3 and PHP 8.2 *(Boris van Katwijk)* + + +## 1.2.8 (2023-04-24) + +[View Release](git@github.com:experius/Magento-2-Module-Experius-Address-Lines.git/commits/tag/1.2.8) + +* Fix for PHP 8.1 *(Peter Jaap Blaakmeer)* + + +## 1.2.7 (2017-11-30) + +[View Release](git@github.com:experius/Magento-2-Module-Experius-Address-Lines.git/commits/tag/1.2.7) + +* Added form_key to create account form *(Experius)* + + +## 1.2.6 (2017-09-04) + +[View Release](git@github.com:experius/Magento-2-Module-Experius-Address-Lines.git/commits/tag/1.2.6) + +* [BUGFIX] Solved error that occurred if config validation was left empty *(bartlubbersen)* + + +## 1.2.5 (2017-07-04) + +[View Release](git@github.com:experius/Magento-2-Module-Experius-Address-Lines.git/commits/tag/1.2.5) + +* [TASK] Added required validation and check if isUsedInForm for the Customer Address Edit Form *(Lewis Voncken)* + + +## 1.2.4 (2017-07-04) + +[View Release](git@github.com:experius/Magento-2-Module-Experius-Address-Lines.git/commits/tag/1.2.4) + +* [TASK] Added Required Label based on attribute is required-entry class *(Lewis Voncken)* + + +## 1.2.3 (2017-07-03) + +[View Release](git@github.com:experius/Magento-2-Module-Experius-Address-Lines.git/commits/tag/1.2.3) + +* [TASK] Added isUsedInForm to check if Address Fields telephone and company is used in Registration form *(Lewis Voncken)* +* [BUGFIX] custom street group.html template to fix layout issues on blank. Fixed issued where current additional classes where replaced instead of added *(Derrick Heesbeen)* + + +## 1.2.2 (2017-05-05) + +[View Release](git@github.com:experius/Magento-2-Module-Experius-Address-Lines.git/commits/tag/1.2.2) + +* [BUGFIX] Solved problem with check of enabled and required function *(Lewis Voncken)* +* [BUGFIX] added missing character *(Lewis Voncken)* + + +## 1.2.1 (2017-05-02) + +[View Release](git@github.com:experius/Magento-2-Module-Experius-Address-Lines.git/commits/tag/1.2.1) + +* [FEATURE] Added AddressLine Support to the Registration and AddressEdit form *(Lewis Voncken)* + + +## 1.0.1 (2017-01-26) + +[View Release](git@github.com:experius/Magento-2-Module-Experius-Address-Lines.git/commits/tag/1.0.1) + + + +## 1.1.0 (2017-01-26) + +[View Release](git@github.com:experius/Magento-2-Module-Experius-Address-Lines.git/commits/tag/1.1.0) + + + +## 1.2.0 (2017-01-26) + +[View Release](git@github.com:experius/Magento-2-Module-Experius-Address-Lines.git/commits/tag/1.2.0) + +* added license *(Derrick Heesbeen)* +* changed module name *(Derrick Heesbeen)* +* Add files via upload *(robbertstevens)* +* Correct composer.json according to Magento standards *(bartlubbersen)* +* Resolved error when compiling *(Tjitse-E)* + + +## 1.0.0 (2016-11-09) + +[View Release](git@github.com:experius/Magento-2-Module-Experius-Address-Lines.git/commits/tag/1.0.0) + +* First Commit *(Derrick Heesbeen)* +* Added configuration *(Derrick Heesbeen)* +* screenshots for readme *(Derrick Heesbeen)* +* Update README.md *(Derrick Heesbeen)* +* Update README.md *(Derrick Heesbeen)* + + diff --git a/COPYING.txt b/COPYING.txt new file mode 100644 index 0000000..9580858 --- /dev/null +++ b/COPYING.txt @@ -0,0 +1,6 @@ +Copyright © 2023-present Happy Horizon Utrecht Development & Technology B.V. + +This file included in Experius/AddressLines is licensed under OSL 3.0 + +http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +Please see LICENSE.txt for the full text of the OSL 3.0 license \ No newline at end of file diff --git a/Helper/Data.php b/Helper/Data.php index 553104d..23a262a 100644 --- a/Helper/Data.php +++ b/Helper/Data.php @@ -1,127 +1,144 @@ resource = $resourceConnection; - $this->eavAttribute = $eavAttribute; - parent::__construct($context); + /** + * @param $field + * @param $group + * @param $section + * @return mixed|string + */ + public function getModuleConfig($field = null, $group = null, $section = null) + { + $section = $section ?: 'customer'; + $group = $group ?: 'experius_address_lines'; + $field = $field ?: 'enabled'; + return $this->scopeConfig->getValue("{$section}/{$group}/{$field}", ScopeInterface::SCOPE_STORE) ?? ''; } - public function getModuleConfig($field = false, $group = false, $section = false) + + /** + * @param $field + * @param $group + * @param $section + * @return bool + */ + public function isSetFlag($field = null, $group = null, $section = null): bool { - $section = ($section) ? $section : 'customer'; - $group = ($group) ? $group : 'experius_address_lines'; - $field = ($field) ? $field : 'enabled'; - //var_dump("{$section}/{$group}/{$field}"); exit();die(); - return $this->scopeConfig->getValue("{$section}/{$group}/{$field}", \Magento\Store\Model\ScopeInterface::SCOPE_STORE) ?? ''; + $section = $section ?: 'customer'; + $group = $group ?: 'experius_address_lines'; + $field = $field ?: 'enabled'; + return $this->scopeConfig->isSetFlag("{$section}/{$group}/{$field}", ScopeInterface::SCOPE_STORE); } - public function isLineEnabled($lineNumber) + /** + * @param $lineNumber + * @return bool + */ + public function isLineEnabled($lineNumber): bool { $group = "experius_address_lines/experius_address_line{$lineNumber}"; - return $this->getModuleConfig("line_enabled", $group); + return $this->isSetFlag('line_enabled', $group); } + /** + * @param $lineNumber + * @return \Magento\Framework\Phrase|mixed|string + */ public function getLineLabel($lineNumber) { $group = "experius_address_lines/experius_address_line{$lineNumber}"; - $label = ($this->getModuleConfig("line_label", $group)) - ? $this->getModuleConfig("line_label", $group) + $label = ($this->getModuleConfig('line_label', $group)) + ? $this->getModuleConfig('line_label', $group) : __('Address Line'); return $label; } + /** + * @param $lineNumber + * @return false|mixed|string + */ public function getValidationMaxLength($lineNumber) { $group = "experius_address_lines/experius_address_line{$lineNumber}"; - $maxLength = ($this->getModuleConfig("line_max_length", $group)) - ? $this->getModuleConfig("line_max_length", $group) + $maxLength = ($this->getModuleConfig('line_max_length', $group)) + ? $this->getModuleConfig('line_max_length', $group) : false; return $maxLength; } + /** + * @param $lineNumber + * @return false|mixed|string + */ public function getValidationMinLength($lineNumber) { $group = "experius_address_lines/experius_address_line{$lineNumber}"; - $maxLength = ($this->getModuleConfig("line_min_length", $group)) - ? $this->getModuleConfig("line_min_length", $group) + $maxLength = ($this->getModuleConfig('line_min_length', $group)) + ? $this->getModuleConfig('line_min_length', $group) : false; return $maxLength; } - public function isLineRequired($lineNumber) + /** + * @param $lineNumber + * @return bool + */ + public function isLineRequired($lineNumber): bool { $group = "experius_address_lines/experius_address_line{$lineNumber}"; - return $this->getModuleConfig("line_required", $group); + return $this->isSetFlag('line_required', $group); } - public function getValidationClassesForLine($lineNumber) + /** + * @param $lineNumber + * @return string + */ + public function getValidationClassesForLine($lineNumber): string { if (!$this->getValidationClassesAsArrayForLine($lineNumber)) { - return; + return ''; } $validationArray = $this->getValidationClassesAsArrayForLine($lineNumber); - if (key_exists('validate-number',$validationArray)) { + if (key_exists('validate-number', $validationArray)) { $validationArray['validate-digits'] = 1; unset($validationArray['validate-number']); } - $validationClassesString = ' ' . implode(' ', array_keys($validationArray)); - return $validationClassesString; + return ' ' . implode(' ', array_keys($validationArray)); } - public function getValidationClassesAsArrayForLine($lineNumber) + /** + * @param $lineNumber + * @return array + */ + public function getValidationClassesAsArrayForLine($lineNumber): array { $group = "experius_address_lines/experius_address_line{$lineNumber}"; - $validationClassesString = $this->getModuleConfig("line_validation_classes", $group); - //var_dump($validationClassesString); + $validationClassesString = $this->getModuleConfig('line_validation_classes', $group); $validationParts = explode(',', $validationClassesString); - //var_dump($validationParts); die(); $validationClassesArray = []; - foreach($validationParts as $validationPart) { + foreach ($validationParts as $validationPart) { if (!$validationPart) { continue; } $validationPartArray = explode(':', $validationPart); if (!empty($validationPartArray)) { - $validationClassesArray[$validationPartArray[0]] = (int) $validationPartArray[1]; + $validationClassesArray[$validationPartArray[0]] = (int)$validationPartArray[1]; } } - if($this->isLineRequired($lineNumber)){ + if ($this->isLineRequired($lineNumber)) { $validationClassesArray['required-entry'] = 1; } return $validationClassesArray; } - - /** - * Return form attribute IDs by form code - * - * @param string $formCode - * @return array - */ - public function isUsedInForm($attributeCode, $formCode = 'customer_register_address', $entityType = \Magento\Customer\Api\AddressMetadataInterface::ENTITY_TYPE_ADDRESS) - { - $attributeId = $this->eavAttribute->getIdByCode( $entityType, $attributeCode); - $bind = ['attribute_id' => $attributeId, 'form_code' => $formCode]; - $select = $this->resource->getConnection()->select()->from( - $this->resource->getTableName('customer_form_attribute'), - 'attribute_id' - )->where( - 'attribute_id = :attribute_id AND form_code = :form_code' - ); - return $this->resource->getConnection()->fetchRow($select, $bind); - } - } diff --git a/README.md b/README.md index da1a816..529149e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -**Experius Address Lines,** +# Experius Address Lines -Adds labels to address lines and adds configuration per address line. +Add labels to address lines and configuration for each address line. Configuration Per Line diff --git a/composer.json b/composer.json index 3265cce..a45871d 100644 --- a/composer.json +++ b/composer.json @@ -1,20 +1,28 @@ { - "name": "experius/module-addresslines", - "description": "", - "authors": [ - { - "name": "Mage2Gen", - "email": "info@mage2gen.com" - } - ], - "minimum-stability": "dev", - "require": {}, - "autoload": { - "files": [ - "registration.php" + "name": "experius/module-addresslines", + "description": "Add labels to address lines and configuration for each address line.", + "type": "magento2-module", + "license": "OSL-3.0", + "authors": [ + { + "name": "Mage2Gen", + "email": "info@mage2gen.com" + }, + { + "name": "Boris van Katwijk", + "email": "borisvankatwijk@happyhorizon.com" + } ], - "psr-4": { - "Experius\\AddressLines\\": "" + "minimum-stability": "dev", + "require": { + "php": ">=8.1" + }, + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Experius\\AddressLines\\": "" + } } - } } diff --git a/etc/adminhtml/system.xml b/etc/adminhtml/system.xml index 0b717d7..56e345b 100755 --- a/etc/adminhtml/system.xml +++ b/etc/adminhtml/system.xml @@ -6,7 +6,7 @@ - + Magento\Config\Model\Config\Source\Yesno @@ -33,7 +33,7 @@ - + Magento\Config\Model\Config\Source\Yesno @@ -58,7 +58,7 @@ - + Magento\Config\Model\Config\Source\Yesno @@ -83,7 +83,7 @@ - + Magento\Config\Model\Config\Source\Yesno @@ -108,4 +108,4 @@ - \ No newline at end of file + diff --git a/etc/config.xml b/etc/config.xml index 6018499..4dae637 100755 --- a/etc/config.xml +++ b/etc/config.xml @@ -27,11 +27,11 @@ 0 - - - + + + - \ No newline at end of file + diff --git a/etc/frontend/di.xml b/etc/frontend/di.xml index cd48629..13a52b5 100644 --- a/etc/frontend/di.xml +++ b/etc/frontend/di.xml @@ -7,4 +7,4 @@ - \ No newline at end of file + diff --git a/etc/module.xml b/etc/module.xml index a65de37..ae7465b 100755 --- a/etc/module.xml +++ b/etc/module.xml @@ -1,10 +1,13 @@ - + + - + + + diff --git a/i18n/en_US.csv b/i18n/en_US.csv deleted file mode 100644 index ab9521c..0000000 --- a/i18n/en_US.csv +++ /dev/null @@ -1,5 +0,0 @@ -Street,Street -Housenumber,Housenumber -Addition,Addition -"Address Lines","Address Lines" -enabled,enabled diff --git a/i18n/nl_NL.csv b/i18n/nl_NL.csv deleted file mode 100644 index ab9521c..0000000 --- a/i18n/nl_NL.csv +++ /dev/null @@ -1,5 +0,0 @@ -Street,Street -Housenumber,Housenumber -Addition,Addition -"Address Lines","Address Lines" -enabled,enabled diff --git a/registration.php b/registration.php index 2e14acf..bc60ce4 100644 --- a/registration.php +++ b/registration.php @@ -1,6 +1,9 @@ @@ -10,7 +10,7 @@ - Experius_AddressLines::/experius/customer/form/register.phtml + Experius_AddressLines::experius/customer/form/register.phtml diff --git a/view/frontend/layout/customer_address_form.xml b/view/frontend/layout/customer_address_form.xml index d0a06c1..1679a71 100755 --- a/view/frontend/layout/customer_address_form.xml +++ b/view/frontend/layout/customer_address_form.xml @@ -1,7 +1,7 @@ @@ -10,7 +10,7 @@ - Experius_AddressLines::/experius/customer/address/edit.phtml + Experius_AddressLines::experius/customer/address/edit.phtml diff --git a/view/frontend/templates/experius/customer/address/edit.phtml b/view/frontend/templates/experius/customer/address/edit.phtml index 8a7d5be..a132b6f 100644 --- a/view/frontend/templates/experius/customer/address/edit.phtml +++ b/view/frontend/templates/experius/customer/address/edit.phtml @@ -1,78 +1,109 @@ getViewModel(); +$regionProvider = $block->getRegionProvider(); +/** @var \Experius\AddressLines\Helper\Data $experiusAddressLinesHelper */ +$experiusAddressLinesHelper = $this->helper('Experius\AddressLines\Helper\Data'); ?> -getLayout()->createBlock(\Magento\Customer\Block\Widget\Company::class) ?> +getLayout()->createBlock(\Magento\Customer\Block\Widget\Telephone::class) ?> +getLayout()->createBlock(\Magento\Customer\Block\Widget\Fax::class) ?> +getAttributeData()->getFrontendLabel('country_id'); ?> +getAttributeData()->getFrontendLabel('street'); ?> +getAttributeData()->getFrontendLabel('city'); ?> +getAttributeData()->getFrontendLabel('region'); ?> + +getConfig('general/region/display_all'); ?> + +addressGetAttributeValidationClass('vat_id'); ?> +addressGetAttributeValidationClass('city'); ?> +addressGetAttributeValidationClass('postcode'); ?> + +addressGetAttributeValidationClass('street'); ?> +getValidationClassesForLine(1); +$maxLength = $experiusAddressLinesHelper->getValidationMaxLength(1); +$minLength = $experiusAddressLinesHelper->getValidationMinLength(1); ?> -
+addressGetAttributeValidationClass('region'); ?> +
-
- getBlockHtml('formkey')?> - - - getNameBlockHtml() ?> - helper('Experius\AddressLines\Helper\Data')->isUsedInForm('company')): ?> - helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('company'); ?> -
- -
- -
-
- - helper('Experius\AddressLines\Helper\Data')->isUsedInForm('telephone')): ?> - helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('telephone'); ?> -
- -
- -
-
- -
- -
- -
-
+ escapeHtml(__('Contact Information')) ?>
+ getBlockHtml('formkey') ?> + + + getNameBlockHtml() ?> + + isEnabled()): ?> + setCompany($block->getAddress()->getCompany())->toHtml() ?> + + + isEnabled()): ?> + setTelephone($block->getAddress()->getTelephone())->toHtml() ?> + + + isEnabled()): ?> + setFax($block->getAddress()->getFax())->toHtml() ?> + +
-
- helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('street'); ?> - - helper('Experius\AddressLines\Helper\Data')->getValidationClassesForLine($_i)): ?> - helper('Experius\AddressLines\Helper\Data')->getValidationClassesForLine($_i); ?> - + escapeHtml(__('Address')) ?>
- +
- - +
+ +
+ + + >
- helper('Magento\Customer\Helper\Address')->getStreetLines(); $_i <= $_n; $_i++): ?> - helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('street'); ?> - - helper('Experius\AddressLines\Helper\Data')->getValidationClassesForLine($_i)): ?> - helper('Experius\AddressLines\Helper\Data')->getValidationClassesForLine($_i); ?> - -
-
- helper('Magento\Customer\Helper\Address')->isVatAttributeVisible()) : ?> -
- -
- + addressIsVatAttributeVisible()): ?> +
+ +
+ +
-
-
- +
+
- + getCountryHtmlSelect() ?>
- +
- > + - getConfig('general/region/display_all')) ? ' disabled="disabled"' : '';?>/> + >
-
- +
+
- +
-
- +
+
- getCountryHtmlSelect() ?> + + + renderStyleAsTag("display: none;", 'div.message.warning') ?>
- getLayout()->getBlock('customer_form_address_user_attributes'); ?> - - setShowContainer(false)->toHtml(); ?> - isDefaultBilling()): ?>
- + escapeHtml(__("It's a default billing address.")) ?>
canSetAsDefaultBilling()): ?> -
- - -
+
+ + +
- + isDefaultShipping()): ?>
- + escapeHtml(__("It's a default shipping address.")) ?>
canSetAsDefaultShipping()): ?>
- - + +
- +
-
@@ -162,18 +237,20 @@ +script; +?> +renderTag('script', [], $scriptString, false) ?> getShowAddressFields()): ?> + getRegionJson(); + $regionId = (int) $formData->getRegionId(); + $countriesWithOptionalZip = /* @noEscape */ $directoryHelper->getCountriesWithOptionalZip(true); + ?> + + + diff --git a/view/frontend/web/template/group/group.html b/view/frontend/web/template/group/group.html index bfd3fc5..316c935 100644 --- a/view/frontend/web/template/group/group.html +++ b/view/frontend/web/template/group/group.html @@ -1,6 +1,6 @@