customerSession = $customerSession; } protected function isShowPrice(): bool { $customerSession = $this->customerSession; if ($customerSession->isLoggedIn()) { $customer = $customerSession->getCustomer(); $dataCustomer = $customer->getDataModel(); $netsuiteStatus = $dataCustomer->getExtensionAttributes()?->getNetsuiteStatus(); $netsuiteStatus = $netsuiteStatus? strtolower($netsuiteStatus):$customer->getNetsuiteStatus(); var_dump($netsuiteStatus); if (!$netsuiteStatus) { return false; } if ($netsuiteStatus!==null) { $netsuiteStatus = strtolower($netsuiteStatus); } if (in_array($netsuiteStatus, Status::getApprovedStatuses())) { return true; } } return false; } protected function _toHtml() { if (!$this->isShowPrice()) { return ''; } return parent::_toHtml(); } }