Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-customer
Controller
Adminhtml
System
Config
Validatevat
ValidateAdvanced.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Customer\Controller\Adminhtml\System\Config\Validatevat
;
8
9
class
ValidateAdvanced
extends
\Magento\Customer\Controller\Adminhtml\System\Config\Validatevat
10
{
14
protected
$resultJsonFactory
;
15
20
public
function
__construct
(
21
\
Magento
\Backend\
App
\
Action
\
Context
$context,
22
\
Magento
\Framework\Controller\Result\
JsonFactory
$resultJsonFactory
23
) {
24
parent::__construct($context);
25
$this->resultJsonFactory =
$resultJsonFactory
;
26
}
27
33
public
function
execute
()
34
{
35
$result
= $this->
_validate
();
36
$valid =
$result
->getIsValid();
37
$success =
$result
->getRequestSuccess();
38
// ID of the store where order is placed
39
$storeId
= $this->
getRequest
()->getParam(
'store_id'
);
40
// Sanitize value if needed
41
if
(
$storeId
!==
null
) {
42
$storeId
= (int)
$storeId
;
43
}
44
45
$groupId
= $this->_objectManager->get(\
Magento
\Customer\Model\Vat::class)
46
->getCustomerGroupIdBasedOnVatNumber(
47
$this->
getRequest
()->getParam(
'country'
),
48
$result
,
49
$storeId
50
);
51
53
$resultJson = $this->resultJsonFactory->create();
54
return
$resultJson->setData([
'valid'
=> $valid,
'group'
=>
$groupId
,
'success'
=> $success]);
55
}
56
}
$result
$result
Definition:
product_configurable_not_available_rollback.php:26
Magento\Framework\App
$storeId
$storeId
Definition:
customer_review_with_rating.php:14
Magento\Customer\Controller\Adminhtml\System\Config\Validatevat\_validate
_validate()
Definition:
Validatevat.php:27
Magento\Customer\Controller\Adminhtml\System\Config\Validatevat
Definition:
Validatevat.php:13
Magento\Customer\Controller\Adminhtml\System\Config\Validatevat
Definition:
Validate.php:6
Magento\Framework\Controller\Result\JsonFactory
Definition:
JsonFactory.php:12
Magento\Customer\Controller\Adminhtml\System\Config\Validatevat\ValidateAdvanced
Definition:
ValidateAdvanced.php:9
Magento\Framework\App\Action\AbstractAction\getRequest
getRequest()
Definition:
AbstractAction.php:60
Magento\Framework\App\ActionInterface\execute
execute()
Magento\Customer\Controller\Adminhtml\System\Config\Validatevat\ValidateAdvanced\__construct
__construct(\Magento\Backend\App\Action\Context $context, \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory)
Definition:
ValidateAdvanced.php:20
$groupId
$groupId
Definition:
filterable_attributes.php:14
Magento
Magento\Customer\Controller\Adminhtml\System\Config\Validatevat\ValidateAdvanced\$resultJsonFactory
$resultJsonFactory
Definition:
ValidateAdvanced.php:14
Magento\Framework\App\Action\Context
Definition:
Context.php:24
Magento\Framework\App\Action\Action
Definition:
Action.php:25