/** * @return array */ public function getConfig() { $customFeeConfig = []; $enabled = $this->dataHelper->isModuleEnabled(); $minimumOrderAmount = $this->dataHelper->getMinimumOrderAmount(); $customFeeConfig['fee_label'] = $this->dataHelper->getFeeLabel(); $quote = $this->checkoutSession->getQuote(); $subtotal = $quote->getSubtotal(); $customFeeConfig['custom_fee_amount'] = $this->dataHelper->getCustomFee(); $customFeeConfig['show_hide_customfee_block'] = $enabled && $minimumOrderAmount <= $subtotal && $quote->getFee() ? true : false; $customFeeConfig['show_hide_customfee_shipblock'] = $enabled && $minimumOrderAmount <= $subtotal ? true : false; return $customFeeConfig; }