|
| 1 | +<?php |
| 2 | +/** |
| 3 | + * |
| 4 | + * ShipperHQ |
| 5 | + * |
| 6 | + * NOTICE OF LICENSE |
| 7 | + * |
| 8 | + * This source file is subject to the Open Software License (OSL 3.0) |
| 9 | + * that is bundled with this package in the file LICENSE.txt. |
| 10 | + * It is also available through the world-wide-web at this URL: |
| 11 | + * http://opensource.org/licenses/osl-3.0.php |
| 12 | + * If you did not receive a copy of the license and are unable to |
| 13 | + * obtain it through the world-wide-web, please send an email |
| 14 | + * to [email protected] so we can send you a copy immediately. |
| 15 | + * |
| 16 | + * DISCLAIMER |
| 17 | + * |
| 18 | + * Do not edit or add to this file if you wish to upgrade Magento to newer |
| 19 | + * versions in the future. If you wish to customize Magento for your |
| 20 | + * needs please refer to http://www.magentocommerce.com for more information. |
| 21 | + * |
| 22 | + * Shipper HQ Shipping |
| 23 | + * |
| 24 | + * @category ShipperHQ |
| 25 | + * @package ShipperHQ_Address_Autocomplete |
| 26 | + * @copyright Copyright (c) 2021 Zowta LLC (http://www.ShipperHQ.com) |
| 27 | + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
| 28 | + * @author ShipperHQ Team [email protected] |
| 29 | + */ |
| 30 | +/** |
| 31 | + * Copyright © 2015 Magento. All rights reserved. |
| 32 | + * See COPYING.txt for license details. |
| 33 | + * |
| 34 | +*/ |
| 35 | + |
| 36 | +namespace ShipperHQ\AddressAutocomplete\Helper; |
| 37 | + |
| 38 | + |
| 39 | +/** |
| 40 | + * Shipping data helper |
| 41 | + */ |
| 42 | +class Data extends \Magento\Framework\App\Helper\AbstractHelper |
| 43 | +{ |
| 44 | + |
| 45 | + private $storeId; |
| 46 | + /** |
| 47 | + * @var Mage_Sales_Model_Quote |
| 48 | + */ |
| 49 | + |
| 50 | + |
| 51 | + public function __construct( |
| 52 | + \Magento\Framework\App\Helper\Context $context |
| 53 | + ) { |
| 54 | + parent::__construct($context); |
| 55 | + } |
| 56 | + |
| 57 | + |
| 58 | + /** |
| 59 | + * Gets a config flag |
| 60 | + * |
| 61 | + * @param $configField |
| 62 | + * @return mixed |
| 63 | + */ |
| 64 | + public function getConfigFlag($configField) |
| 65 | + { |
| 66 | + return $this->scopeConfig->isSetFlag($configField, \Magento\Store\Model\ScopeInterface::SCOPE_STORE); |
| 67 | + } |
| 68 | + |
| 69 | + /** |
| 70 | + * Get Config Value |
| 71 | + * |
| 72 | + * @param $configField |
| 73 | + * @return mixed |
| 74 | + */ |
| 75 | + public function getConfigValue($configField, $store = null) |
| 76 | + { |
| 77 | + return $this->scopeConfig->getValue( |
| 78 | + $configField, |
| 79 | + \Magento\Store\Model\ScopeInterface::SCOPE_STORE, |
| 80 | + $store |
| 81 | + ); |
| 82 | + } |
| 83 | + |
| 84 | +} |
0 commit comments