0

I am working on the checkout a lot currently, but I cannot figure out how to exclude Country and Postal code from the Estimate Shipping and Tax.

enter image description here

There are a lot of other suggestions and solutions like this one:

Magento 2 remove "Estimate shipping costs and tax" from cart

These solutions are unsatisfying though. The delivery cost within our country of service will be the same everywhere. This fix excludes the Shipping cost from the totals calculation and I think customers want to see the total cost of their order before they checkout.

I found out that if you leave shopping-estimation.html completely empty it will do exactly what I want, however I find this fix to be very dirty and it will only work when I leave it empty within the vendor/magento/module-checkout/view/frontend/web/template/cart directory.

I believe I need to overwrite the file that calls shopping-estimation.html, however I am unable to locate it. I know it has to be within the module-checkout directory.

Here is shipping-estimation.html from vendor/magento/module-checkout/view/frontend/web/template/cart

<form method="post" id="shipping-zip-form">
    <fieldset class="fieldset estimate">
        <legend class="legend">
            <span data-bind="text: isVirtual ? $t('Estimate Tax') : $t('Estimate Shipping and Tax') "></span>
        </legend><br>
        <p class="field note" data-bind="text: isVirtual ? $t('Enter your billing address to get a tax estimate.') : $t('Enter your destination to get a shipping estimate.')"></p>
        <!-- ko foreach: getRegion('address-fieldsets') -->
        <!-- ko template: getTemplate() --><!-- /ko -->
        <!--/ko-->
    </fieldset>
</form>

1 Answer 1

0

I seem to have made a mistake, Country and Region can be removed by placing a file called shipping-estimation.html

into:

/app/design/frontend/vendor-name/theme-name/Magento_Checkout/web/template/cart

for it to work shipping-estimation.html has to be completely empty.

Hope this can help someone!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.