Skip to main content
All CollectionsHow-to
Change Shopify "Add to shopping cart" button text
Change Shopify "Add to shopping cart" button text
Aleks avatar
Written by Aleks
Updated over a week ago

If you want to get a custom text on your BUY-button, you may add the following script to your page:

<script type="text/javascript">
    (function() {
        var nodes = document.querySelectorAll(".ddr-widget__shopify-product .ddr-shopify-product__button a div"),
            text = 'YOUROWNTEXT';
   
        for (var i = 0; i < nodes.length; i++) {
            nodes[i].innerHTML = text;
        }
    })();
</script>

Change the text = 'YOUROWNTEXT'; string to what is needed and that's it. You'll have whatever you want on your BUY-button.


Did this answer your question?