/** * Get modifier personal template * * @param \XLite\Module\CDev\ProductOptions\Model\OptionSurcharge $surcharge Modifier * * @return string */ public function getModifierTemplate(\XLite\Module\CDev\ProductOptions\Model\OptionSurcharge $surcharge) { if ('price' == $surcharge->getType()) { $tpl = 'modules/CDev/VAT/product_option_modifier_price.tpl'; } else { $tpl = parent::getModifierTemplate($surcharge); } return $tpl; }
/** * Get surcharge absolute value * * @return float */ public function getDisplaySurchargePrice() { $value = parent::getAbsoluteValue(); $product = $this->getOption()->getGroup()->getProduct(); $value = \XLite\Module\CDev\VAT\Logic\Product\Tax::getInstance()->deductTaxFromPrice($product, $value); if (\XLite\Core\Config::getInstance()->CDev->VAT->display_prices_including_vat) { $value += \XLite\Module\CDev\VAT\Logic\Product\Tax::getInstance()->getVATValue($product, $value); } return $value; }
/** * Get modifier personal template * * @param \XLite\Module\CDev\ProductOptions\Model\OptionSurcharge $surcharge Modifier * * @return string */ public function getModifierTemplate(\XLite\Module\CDev\ProductOptions\Model\OptionSurcharge $surcharge) { return 'modules/CDev/ProductOptions/display/modifier/' . $surcharge->getType() . '.tpl'; }