Forum

The forum is a free service supported by community members. Please consider opening a support ticket if you need timely help.

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 06 Dec 2019 09:52 AM by  Ton Hermes
Sales tax to zero and not display in templates
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages


Basic Member


Posts:281
Basic Member


--
04 Dec 2019 09:16 AM

    Hi Stephen,

    Regulations are changed in my country.

    I have changed the tax to 0.00
    In configuration taxes
    = rate type- custom
    = rate rule-none zero amount

    In the templates there is displayed
    tax 0.00

    Is there a way or setting that if there is not tax then there is nothing displayed?

    Like below.

    Regards, Ton




    0


    Veteran Member


    Posts:2957
    Veteran Member


    --
    05 Dec 2019 04:18 AM

    Hi Ton

    For the Cart and Checkout, you can create/edit a custom display template and a data-bind="..." with a visible condition like this shown in red:

    <div class="form-group rvdsf-label-totaltaxamount" data-bind="visible: SalesOrderSet.TotalTaxAmount() > 0" >
    <label class="control-label col-xs-7">@Html.LocalizeString("TotalTaxLabel")</label>
    <div class="col-xs-5">
    <p class="form-control-static" data-bind="text: SalesOrderSet.FormattedTotalTaxAmount"></p>
    </div>
    </div>

    For the Confirmation page, you can create/edit the custom display template and wrap the area with a Razor if condition:

    @if (Model.SalesOrderSet.TotalTaxAmount > 0)
    {

    <div class="form-group rvdsf-label-totaltaxamount">
    <label class="control-label col-xs-7">@Html.LocalizeString("TotalTaxLabel")</label>
    <div class="col-xs-5">
    <p class="form-control-static">@Model.SalesOrderSet.FormattedTotalTaxAmount</p>
    </div>
    </div>
    }

    Take a backup of your template first if you're not comfortable making changes. I hope this helps.

    0


    Basic Member


    Posts:281
    Basic Member


    --
    06 Dec 2019 09:52 AM

    Hi Stephen,

    This works perfect.

    Thanks Ton

    0
    You are not authorized to post a reply.