![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/Ecombricks/InventoryMultishipping/Block/Checkout/Shipping/ |
<?php /** * Copyright © eComBricks. All rights reserved. * See LICENSE.txt for license details. */ namespace Ecombricks\InventoryMultishipping\Block\Checkout\Shipping; /** * Multishipping checkout shipping block source trait */ trait SourceTrait { /** * Get source code * * @param string $sourceCode * @return string */ public function getSourceName($sourceCode) { return $this->sourceManagement->getSourceName($sourceCode); } /** * Get source carrier name * * @param string $sourceCode * @param string $carrierCode * @return string */ public function getSourceCarrierName($sourceCode, $carrierCode) { $configSourceCode = $this->_scopeConfig->getSourceCode(); $this->_scopeConfig->setSourceCode($sourceCode); $carrierTitle = $this->_scopeConfig->getValue('carriers/'.$carrierCode.'/title', \Magento\Store\Model\ScopeInterface::SCOPE_STORE); $this->_scopeConfig->setSourceCode($configSourceCode); if ($carrierTitle) { return $carrierTitle; } return $carrierCode; } }