Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / Can I remove the login link? Just have Shopping Cart only?

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

Locked

Started by eyal8r on 28 Jan 2010, 1:08 AM · Views: 1,631

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
28 Jan 2010, 1:08 AM
#1
eyal8r avatar

eyal8r

Zen Follower

Join Date:
Jan 2010
Posts:
142
Plugin Contributions:
0

Post #1 by eyal8r

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!

28 Jan 2010, 1:33 AM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Post #2 by gjh42

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

<?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 getphp
<!-- <li><a href="<?php //echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php //echo HEADER_TITLE_LOGIN; ?></a></li> -->

28 Jan 2010, 1:40 AM
#3
eyal8r avatar

eyal8r

Zen Follower

Join Date:
Jan 2010
Posts:
142
Plugin Contributions:
0

Post #3 by eyal8r

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 ;) :oops:

Thanks!

28 Jan 2010, 1:41 AM
#4
eyal8r avatar

eyal8r

Zen Follower

Join Date:
Jan 2010
Posts:
142
Plugin Contributions:
0

Post #4 by eyal8r

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

28 Jan 2010, 1:48 AM
#5
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Post #5 by gjh42

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).

28 Jan 2010, 2:39 AM
#6
eyal8r avatar

eyal8r

Zen Follower

Join Date:
Jan 2010
Posts:
142
Plugin Contributions:
0

Post #6 by eyal8r

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!

28 Jan 2010, 4:19 AM
#7
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Post #7 by gjh42

You can wrap HTML comment tags around the whole section, and individually comment the PHP echo and require statements.```php

<!--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-->
28 Jan 2010, 4:23 AM
#8
eyal8r avatar

eyal8r

Zen Follower

Join Date:
Jan 2010
Posts:
142
Plugin Contributions:
0

Post #8 by eyal8r

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