2
November 7, 2011

BigCommerce Customize Compare Products Page

We can’t tweak the snippet used to print out the info on the compare products page. My client wanted to get rid of the “Availability” and “Brand” rows on the compare page of his BigCommerce shop. Since BigComemrce doesn’t even give relevant IDs or class names to their elements, I wrote another snippet of javascript that searches the page for the rows, and hides them. This goes at the end of the HTMLHead panel.

To hide the Availability row:

<script type="text/javascript">
    $(document).ready(function() {
        $("td.CompareFieldName").each(function() {
            if( $(this).text() == 'Availability' ){
            $(this).parent().hide();
            }        
        });
    });
</script>

To remove the Brand row:

<script type="text/javascript">
    $(document).ready(function() {
        $("td.CompareFieldName a").each(function() {
            if( $(this).text() == 'Brand' ){
               $(this).parent().parent().hide();
            }        
        });
    });
</script>

If you need help with customizing any other part of BigCommerce, please reach out, I’m available for hire.

  • http://www.shopping-cart-migration.com/blog/55-bigcommerce-useful-articles/5104-make-bigcommerce-work-for-your-benefit bigcommerce benefits review

    Well I am happy I got this thanks.

  • Tyler Clark

    If you have access to the design/theme files, you should be able to access the snippets that make up the comparison table. There are snippets for rows (tr) and cells (td).