Zen Cart Disable The Shopping Cart Sidebox on Select Pages

One of the highest priorities of any zen cart store owner should be the experience that greets visitors to their online ecommerce shop. If your website provides a good user experience, you will see higher conversion rates, and your store will likely come more highly recommended. You may even garner more repeat customers than otherwise. There are a lot of things you can do to improve your visitor’s time on your site. In this tutorial, we will show you how to disable the shopping cart sidebox on select pages. This can help to declutter your website, making it more visually appealing to customers. This sidebox can also be confusing at times, for example, when it is shown on pages that already display the shopping cart contents.

Zen Cart comes with a built in feature that you can use to turn off the shopping cart sidebox on the shopping cart page if you so desire. To do this, open your zen cart admin area and navigate to Configuration-> Layout Settings-> Shopping Cart Box Status. Set this value to 2.

There is not, however, any built-in way for you to turn off this sidebox on other pages. To do this, you will need to work with a little php code. In your favorite plain text editor, open the includes/modules/sideboxes/YOUR_TEMPLATE/shopping_cart.php file. You may find that you do not have this file. If this is the case, simply make a copy of the file includes/modules/sideboxes/shopping_cart.php, and move it to the override directory.

Find this line of code:

   if ($show_shopping_cart_box == true) {

And just above it, add this:

     if ($show_shopping_cart_box == true) { 
        if (($current_page_base == "shopping_cart") || 
            ($current_page_base  == "account_history_info") ||
            ($current_page_base  == "checkout") ||
            ($current_page_base  == "checkout_payment") ||
            ($current_page_base  == "checkout_confirmation") 
           ) { 
              $show_shopping_cart_box = false;

And edit it to indicate the pages on which you wish to disable the shopping cart sidebox.

If you need help with your zen cart web site please contact us for a quote.

zen cart plus picaflt sor azul equals success

div class=”addthis_sharing_toolbox”>