Results 1 to 5 of 5
  1. #1
    Join Date
    May 2010
    Location
    Texas
    Posts
    393
    Plugin Contributions
    0

    Default Different layout behaviour - Shopping cart empty versus not

    For the most part I find myself disabling all the features of Zen-Cart to deliver a very simple basic page to the customer.

    To that end I have turned off the "featured", "Monthly specials", "New Products" listings.

    However, when I have an empty shopping cart, the shopping cart page displays all these listings. If I add an item to the cart, all these listings go away.

    How can I eliminate these from an empty shopping cart too?

  2. #2
    Join Date
    Sep 2006
    Posts
    542
    Plugin Contributions
    0

    Default Re: Different layout behaviour - Shopping cart empty versus not

    I am going to tell you how to remove the code and as soon as I post this you will get a post to turn it off in admin. I ho.wever remove code that I will never use

    Open includes/templates/your template/templates/tpl_shopping_cart_default.php

    Around line 193 remove this code.


    /**
    * display the Featured Products Center Box
    */
    ?>
    <?php require($template->get_template_dir('tpl_modules_featured_products.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_featured_products.php'); ?>
    <?php } ?>

    <?php
    if ($show_display_shopping_cart_empty->fields['configuration_key'] == 'SHOW_SHOPPING_CART_EMPTY_SPECIALS_PRODUCTS') { ?>
    <?php
    /**
    * display the Special Products Center Box
    */
    ?>
    <?php require($template->get_template_dir('tpl_modules_specials_default.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_specials_default.php'); ?>
    <?php } ?>

    <?php
    if ($show_display_shopping_cart_empty->fields['configuration_key'] == 'SHOW_SHOPPING_CART_EMPTY_NEW_PRODUCTS') { ?>
    <?php
    /**
    * display the New Products Center Box
    */
    ?>
    <?php require($template->get_template_dir('tpl_modules_whats_new.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_whats_new.php'); ?>

  3. #3
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: Different layout behaviour - Shopping cart empty versus not

    And I'll be the guy who suggests that hacking the code should come after turning things on and off in admin:

    Admin - Configuration - Stock

  4. #4
    Join Date
    Apr 2010
    Posts
    5
    Plugin Contributions
    0

    Default Re: Different layout behaviour - Shopping cart empty versus not

    Thank you all!

  5. #5
    Join Date
    Nov 2006
    Posts
    24
    Plugin Contributions
    0

    Default Re: Different layout behaviour - Shopping cart empty versus not

    Thank you for asking this question so I could search on it and find the answer.

    That said, before coming to the forums here (A Funny Thing Happened on the Way to the Forum) I checked the FAQs and behold, an entry titled "I want to enable/disable the "New Products for [insert month]" or Featured/Special/Upcoming Products sections."

    https://www.zen-cart.com/tutorials/index.php?article=4

    Since this FAQ specifically mentions "...(empty)Shopping Cart page, etc." I wonder if the maintainer could also mention that if you want to modify the empty shopping cart behavior, you have to go to Admin->Configuration->Stock.

    This would make that FAQ entry complete.

 

 

Similar Threads

  1. Replies: 5
    Last Post: 21 Apr 2013, 11:37 PM
  2. forgetting shopping cart contacts 'your shopping cart is empty'
    By vandiermen in forum Installing on a Linux/Unix Server
    Replies: 15
    Last Post: 28 Apr 2009, 11:13 AM
  3. Shopping Cart is Empty - but it's not
    By Sueter in forum Installing on a Linux/Unix Server
    Replies: 2
    Last Post: 3 Nov 2007, 12:47 AM
  4. Icon to show if cart is empty/not empty
    By karl19 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 9 Oct 2007, 10:23 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR