-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged in update-old-version (pull request #6)
update-old-version: update code
- Loading branch information
Showing
6 changed files
with
151 additions
and
355 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
/** | ||
* @author JaJuMa GmbH <info@jajuma.de> | ||
* @copyright Copyright (c) 2022-present JaJuMa GmbH <https://www.jajuma.de>. All rights reserved. | ||
* @license http://opensource.org/licenses/mit-license.php MIT License | ||
*/ | ||
|
||
namespace Jajuma\DynamicShippingTax\Helper; | ||
|
||
use Magento\Framework\App\Helper\AbstractHelper; | ||
use Magento\Store\Model\ScopeInterface; | ||
|
||
class Config extends AbstractHelper | ||
{ | ||
public const CONFIG_PATH_DYNAMIC_SHIPPING_TAX_CLASS = 'tax/classes/dynamic_shipping_tax_class'; | ||
|
||
/** | ||
* Get dynamic shipping tax class type | ||
* | ||
* @return mixed | ||
*/ | ||
public function getDynamicShippingTaxType() | ||
{ | ||
return $this->scopeConfig->getValue(self::CONFIG_PATH_DYNAMIC_SHIPPING_TAX_CLASS); | ||
} | ||
|
||
/** | ||
* Get default tax class | ||
* | ||
* @param mixed $store | ||
* @return int | ||
*/ | ||
public function getDefaultTaxClass($store): int | ||
{ | ||
return (int)$this->scopeConfig->getValue( | ||
\Magento\Tax\Model\Config::CONFIG_XML_PATH_SHIPPING_TAX_CLASS, | ||
ScopeInterface::SCOPE_STORE, | ||
$store | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.