Streaming live at 10am (PST)

Ecommerce: Change "Country Taxes" text

I’ve built a Webshop in Webflow. The only thing, I can’t seem to change is the text “Country taxes” during checkout (see attached image)

. I need to change this into the danish wording “Heraf moms”. Does anyone know about a hack to change this?

We had the same problem…Apparently you can’t, which is a shame. We also couldn’t change our country tax rate to the required in Finland 14%. If you had similar problems and possibly even a work around, please let us know! Thanks!

I had to do something similar on a regular Webflow site (not e-commerce) using custom code. I imagine this should still work for you.

  • Apply a class to the element you want to change (Country Tax)
  • Go to the custom code section of the page the element is on
  • Paste the below code between script tags

If you have embedded jQuery then you can use this:

$(".country-tax").text("Heraf moms");

Otherwise, this would work too:

var x=document.getElementsByClassName("country-tax";
x.innerText="Heraf moms";

Let me know how you get on!

@sarwech would be a nice opportunity, but unfortunately this won’t work because you can’t address the country taxes field neither with a class nor with an ID. Or am I wrong? It’s simply invisible in the Designer. Are there any other solutions for this? It’s a bit unprofessional to have everything in One language and then some small thing in English which you can’t change…

One way is to inspect the page using Chrome Dev Tools and see if there is a unique class already on that element. I can check for you if you have a link I can use.

Hi everyone, and thanks for your answers. I’m kinda caught in Corona-lockdown, so I havn’t had the chance to look into your solutions, but I’ll look into it as soon as I get a chance. Thanks again.

Come on webflow! This needs to be addresses asap. It’s crazy that it’s not an option.

Could potentially cause cart abandonments from twitchy clients who don’t like the terminology ‘Country Taxes’

This needs to be an editable field.

It doesn’t look like the text has it’s own Class applied to it. Or am I missing something? @sarwech, here’s the link: https://www.agrainproducts.com/checkout . Thanks!

I totally agree @Golden28!

You can target it by searching for a div containing the text “Country Taxes” — or by targeting the first div child of the parent which has a webflow class.
The problem is, webflow refreshes this div each time a user fills the checkout form, chooses a shipping method or changes his cart.
So you’d need your script to run each time this happens…

Here’s an old thread about the same thing : How can we edit tax text in ecommerce checkout?

1 Like

If anybody is wondering going forward, it seems like WebFlow are actively removing comments that give you actual useful tips. If you want to remove this annoying feature, or edit the contents of it, you can use mutation observers. You can stick the following code in the section that says before </body> in the checkout page settings.

<script type="text/javascript">
// This script is used to remove the absolutely stupid "Country Taxes" feature that webflow are neglecting

// We need to monitor the list for the "Country Taxes" stuff they add in
var target = $(".w-commerce-commercecheckoutordersummaryextraitemslist")[0];

var observer = new MutationObserver(function( mutations ) {
  mutations.forEach(function( mutation ) {
    var newNodes = mutation.addedNodes;
    
    if( newNodes !== null ) {
    	var $nodes = $( newNodes );
    	$nodes.each(function() {
    		let $node = $( this );
    		let isUseless = $node.children(":contains(Country Taxes)").length > 0;
        
            // You can either remove it
            // if (isUseless) { $node.remove(); }

            // or edit it
            if (isUseless) { $node.children(":contains(Country Taxes)")[0].text("Heraf moms"); }
    	});
    }
  });    
});

// Configuration of the observer:
var config = { 
	attributes: false, 
	childList: true, 
	characterData: false 
};
 
// Pass in the target node, as well as the observer options
observer.observe(target, config);

</script>
2 Likes

That did the trick! Perfect! Thanks a lot!!!

If I want to edit the “Country taxes” text instead of removing it entirely, how do I edit the script?

I can see it’s something around this, but don’t know how to edit it:

// You can either remove it or edit here.
        if (isUseless) { $node.remove(); }

Bravo!!! Well done, that is fantastic.

Hey, not at my computer ATM but have edited the post. It should work, if not let me know and will fix for you.

@JoeyClover, The last edit with the “Heraf moms” text, doesn’t seem to work. The whole line of text (the Country Taxes line) is just gone - not being replaced by the text in the script.

PS. Big thanks for your help on this!