public function getTaxString()
    {
        $string = "";
        $rate = $this->getTaxFromCategory();
        $config = SiteConfig::current_site_config();

        if ($config->ShowPriceTaxString) {
            if ($rate && $this->IncludesTax) {
                $string = _t(
                    "CatalogueFrontend.TaxIncludes",
                    "inc. {title}",
                    ["title" => $rate->Title]
                );
            } elseif ($rate && !$this->IncludesTax) {
                $string = _t(
                    "CatalogueFrontend.TaxExcludes",
                    "ex. {title}",
                    ["title" => $rate->Title]
                );
            }
        }

        $this->extend("updateTaxString", $string);

        return $string;
    }
public function getTaxString()
    {
        $string = "";
        $rate = $this->getTaxFromCategory();
        $config = SiteConfig::current_site_config();

        if ($config->ShowPriceTaxString) {
            if ($rate && $this->IncludesTax) {
                $string = _t(
                    "CatalogueFrontend.TaxIncludes",
                    "inc. {title}",
                    ["title" => $rate->Title]
                );
            } elseif ($rate && !$this->IncludesTax) {
                $string = _t(
                    "CatalogueFrontend.TaxExcludes",
                    "ex. {title}",
                    ["title" => $rate->Title]
                );
            }
        }

        $this->extend("updateTaxString", $string);

        return $string;
    }
public function getTaxString ( ) { $ string = "" ; $ rate = $ this -> getTaxFromCategory ( ) ; $ config = SiteConfig :: current_site_config ( ) ; if ( $ config -> ShowPriceTaxString ) { if ( $ rate && $ this -> IncludesTax ) { $ string = _t ( "CatalogueFrontend.TaxIncludes" , "inc. {title}" , [ "title" => $ rate -> Title ] ) ; } elseif ( $ rate && ! $ this -> IncludesTax ) { $ string = _t ( "CatalogueFrontend.TaxExcludes" , "ex. {title}" , [ "title" => $ rate -> Title ] ) ; } } $ this -> extend ( "updateTaxString" , $ string ) ; return $ string ; }
Generate a string to go with the the product price. We can
overwrite the wording of this by using Silverstripes language
files

@return String
Generate a string to go with the the product price . We can overwrite the wording of this by using Silverstripes language files