BLOG

web design html interactive web designer css3 responsive design front-end javascript SEO friendly design web marketing

How to change the message "Shopping cart is empty" across the entire website on Business Catalyst using jQuery

Fabrizio Michels - Monday, October 10, 2011

To customize the "Shopping cart is empty" message on the { module_shoppingcartsummary} you will need to add the following script to all your templates.

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script type="text/javascript">
    $.noConflict();
    jQuery(document).ready(function($) {
        var msg = $('td.cartSummaryItem').html();
        if(msg == "Shopping cart is empty." ) {
            jQuery('td.cartSummaryItem').replaceWith('Shopping Bag: 0 Items');    //replace with your own message
        }                            
    });
</script>
Comments
Post has no comments.