コード例 #1
0
 /**
  * Retrieve Wee tax attribute codes
  *
  * @param  null|string|bool|int|Store $store
  * @param  bool $forceEnabled
  * @return array
  */
 public function getWeeeTaxAttributeCodes($store = null, $forceEnabled = false)
 {
     if (!$forceEnabled && !$this->weeeConfig->isEnabled($store)) {
         return [];
     }
     if ($this->_allAttributes === null) {
         $this->_allAttributes = $this->_attributeFactory->create()->getAttributeCodesByFrontendType('weee');
     }
     return $this->_allAttributes;
 }
コード例 #2
0
ファイル: Tax.php プロジェクト: pavelnovitsky/magento2
 /**
  * Retrieve Wee tax attribute codes
  *
  * @param bool $forceEnabled
  * @return array
  */
 public function getWeeeTaxAttributeCodes($forceEnabled = false)
 {
     if (!$forceEnabled && !$this->weeeConfig->isEnabled()) {
         return array();
     }
     if (is_null($this->_allAttributes)) {
         $this->_allAttributes = $this->_attributeFactory->create()->getAttributeCodesByFrontendType('weee');
     }
     return $this->_allAttributes;
 }
コード例 #3
0
ファイル: Data.php プロジェクト: nblair/magescotch
 /**
  * Check if fixed taxes are used in system
  *
  * @param   null|string|bool|int|Store $store
  * @return  bool
  */
 public function isEnabled($store = null)
 {
     return $this->_weeeConfig->isEnabled($store);
 }
コード例 #4
0
 /**
  * Display FPT row in subtotal or not
  *
  * @return bool
  */
 public function isIncludedInSubtotal()
 {
     return $this->weeeConfig->isEnabled() && $this->weeeConfig->includeInSubtotal();
 }