Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2010
    Posts
    142
    Plugin Contributions
    0

    Default Can I remove the login link? Just have Shopping Cart only?

    I see that it's not possible to completely DISABLE the login. However, I'm wondering if there's a way to not show it as a menu option. Basically, I just want a 'Shopping Cart' menu option. Then, once people click on it- if the cart is empty, it will say so. If there's an item in the cart, it will display the item(s). When they click 'Check out', then it will ask them to create an account, or login.

    Is this possible to do- easily? I'm using the Default Template.
    Thanks!

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Can I remove the login link? Just have Shopping Cart only?

    By "default template" do you mean the Classic template that comes with Zen Cart?

    You will need to edit /includes/templates/your_template/common/tpl_header.php. About line 55 find this
    PHP Code:
    <?php
          
    } else {
            if (
    STORE_STATUS == '0') {
    ?>
        <li><a href="<?php echo zen_href_link(FILENAME_LOGIN'''SSL'); ?>"><?php echo HEADER_TITLE_LOGIN?></a></li>
    <?php } } ?>
    and add comment tags to get
    PHP Code:
        <!-- <li><a href="<?php //echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php //echo HEADER_TITLE_LOGIN; ?></a></li> -->

  3. #3
    Join Date
    Jan 2010
    Posts
    142
    Plugin Contributions
    0

    Default Re: Can I remove the login link? Just have Shopping Cart only?

    Glenn-
    Thanks for the replay (again). Question for you-

    I'd like the 'My Cart' link to be in the EZ Pages menu bar. The links at the top of the header (Home, Login, etc) would be disabled. I already disabled the search box at the top of the header...

    Will making your changes you suggest give me that result?

    I apologize, I know I didn't specify EXACTLY what I was looking to do here. I really appreciate your help... based on our last discussion, I am starting over on a new template ;)

    Thanks!

  4. #4
    Join Date
    Jan 2010
    Posts
    142
    Plugin Contributions
    0

    Default Re: Can I remove the login link? Just have Shopping Cart only?

    and yes- I am working with a copy of the 'Classic' template that ships w/ ZenCart...

  5. #5
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Can I remove the login link? Just have Shopping Cart only?

    That was only to disable the login link in navMainHeader. If you are removing that whole menu bar, the one link becomes irrelevant.

    You can make an internal link to the shopping cart page in ez-pages, and specify it to show in the ez-pages header menu. The link will read whatever title you use, so naming it Shopping Cart will get that link in the menu.

    If you disable the header nav, you should probably replicate its logic somewhere else, as that dynamically shows My Account and Logout if logged in (you don't want those if not logged in).

  6. #6
    Join Date
    Jan 2010
    Posts
    142
    Plugin Contributions
    0

    Default Re: Can I remove the login link? Just have Shopping Cart only?

    Glenn-
    Thanks again. So, if I disable that header bar completely- but add in the Shopping Cart Link, and keep the My Account Link active in the EZ Pages- you think that should cover it all?

    2nd question- how do I remove that header bar, without messing anything up in the header? It'd be nice if I could keep the code there, just in case I ever want to change it back in the future. I'm surprised there's no option for it in the Admin pages- or am I just missing it?

    Thanks again!

  7. #7
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Can I remove the login link? Just have Shopping Cart only?

    You can wrap HTML comment tags around the whole section, and individually comment the PHP echo and require statements.
    PHP Code:
    <!--bof-navigation display-->
    <!-- <div id="navMainWrapper">
    <div id="navMain">
        <ul class="back">
        <li><?php //echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php //echo HEADER_TITLE_CATALOG; ?></a></li>
    <?php if ($_SESSION['customer_id']) { ?>
        <li><a href="<?php //echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php //echo HEADER_TITLE_LOGOFF; ?></a></li>
        <li><a href="<?php //echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php //echo HEADER_TITLE_MY_ACCOUNT; ?></a></li>
    <?php
          
    } else {
            if (
    STORE_STATUS == '0') {
    ?>
        <li><a href="<?php //echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php //echo HEADER_TITLE_LOGIN; ?></a></li>
    <?php } } ?>

    <?php if ($_SESSION['cart']->count_contents() != 0) { ?>
        <li><a href="<?php //echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php //echo HEADER_TITLE_CART_CONTENTS; ?></a></li>
        <li><a href="<?php //echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php //echo HEADER_TITLE_CHECKOUT; ?></a></li>
    <?php }?>
    </ul>
    </div>
    <div id="navMainSearch"><?php //require(DIR_WS_MODULES . 'sideboxes/search_header.php'); ?></div>
    <br class="clearBoth" />
    </div> -->
    <!--eof-navigation display-->

  8. #8
    Join Date
    Jan 2010
    Posts
    142
    Plugin Contributions
    0

    Default Re: Can I remove the login link? Just have Shopping Cart only?

    Gotcha- I'll give that a shot!
    Thanks!

 

 

Similar Threads

  1. Can I use just the shopping cart function on my site?
    By xengvang in forum General Questions
    Replies: 1
    Last Post: 5 Feb 2009, 04:17 AM
  2. How can I remove the total weight from the shopping cart?
    By weber in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 3 Jun 2007, 04:41 PM
  3. Can I have each attribute separately in the shopping cart?
    By vatel in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 7 May 2007, 05:45 PM

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