BigCommerce make “Add to Cart” & “Choose Options” text an image
BigCommerce doesn’t let us touch any of the PHP or HTML that spits out the Add to Cart or Choose Options links. In their support guide, they say to add a background image, but this still means that we need to keep the text, which often times just won’t do. I wrote a quick bit of javascript that goes and finds those Add to Cart and Choose Options instances, and replaces them with an actual image.
<script type="text/javascript">
$(document).ready(function() {
$(".ProductActionAdd a").each(function() {
if( $(this).text() == 'Choose Options' ){
$(this).html('<img src="/templates/__custom/images/options.png" alt="Choose Options" />');
}
if( $(this).text() == 'Add To Cart' ){
$(this).html('<img src="/templates/_custom/images/add.png" alt="Add to Cart" />');
}
});
});
</script>
Hope this helps! If you need further BigCommerce customization (especially with displaying categories the way you want) let me know.





