Forums / Customization from the Admin / View cart link in ezpage links header to SHOW ALWAYS

View cart link in ezpage links header to SHOW ALWAYS

Locked

Started by jami1955 on 7 Jun 2009, 9:53 AM · Views: 3,209

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
7 Jun 2009, 9:53 AM
#1
jami1955 avatar

jami1955

New Zenner

Join Date:
Feb 2008
Location:
Boulder, CO, Dec 2: India
Posts:
89
Plugin Contributions:
0

View cart link in ezpage links header to SHOW ALWAYS

I have three links in the header "navezpagesTOP" section, one of which is the View Cart link. Normally that link does not appear unless there is something in the cart.

How do I get that link to appear always, even when the cart is empty?
thanks,
Jamieboulder :cool:

version 1.3.8
German localization installation
(http://sourceforge.net/projects/zencart-german/)

7 Jun 2009, 2:07 PM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,717
Plugin Contributions:
0

Re: View cart link in ezpage links header to SHOW ALWAYS

You will need to remove the conditional from the code. Please post your /YOUR_TEMPLATE/common/tpl_header.php

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

7 Jun 2009, 2:30 PM
#3
jami1955 avatar

jami1955

New Zenner

Join Date:
Feb 2008
Location:
Boulder, CO, Dec 2: India
Posts:
89
Plugin Contributions:
0

Re: View cart link in ezpage links header to SHOW ALWAYS

I hope this is what you meant by "Please post your.... " Here it is: I see no conditional in the code relating to the question.

?>

<?php
  // Display all header alerts via messageStack:
  if ($messageStack->size('header') > 0) {
    echo $messageStack->output('header');
  }
  if (isset($_GET['error_message']) && zen_not_null($_GET['error_message'])) {
  echo htmlspecialchars(urldecode($_GET['error_message']));
  }
  if (isset($_GET['info_message']) && zen_not_null($_GET['info_message'])) {
   echo htmlspecialchars($_GET['info_message']);
} else {

}
?>


<!--bof-header logo and navigation display-->
<?php
if (!isset($flag_disable_header) || !$flag_disable_header) {
?>

<div id="headerWrapper">
<div id="language"><a href="index.php?main_page=index&language=en"><img src="http://212.72.183.145/images/flag_en.jpg" border="0" /></a> <a href="index.php?main_page=index&language=en">English</a>      <a href="index.php?main_page=index&language=de"><img src="http://212.72.183.145/images/flag_de.jpg" /></a> <a href="index.php?main_page=index&language=de">Deutsche</a></div>

<!--bof-branding display-->
<div id="logoWrapper">
    <div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?></div>
<?php if (HEADER_SALES_TEXT != '' || (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2))) { ?>
    <div id="taglineWrapper">
<?php
              if (HEADER_SALES_TEXT != '') {
?>
     <?php echo HEADER_SALES_TEXT;?>
<?php
              }
?>
<?php
              if (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2)) {
                if ($banner->RecordCount() > 0) {
?>
      <!--<div id="bannerTwo" class="banners"><?php //echo zen_display_banner('static', $banner);?></div> -->
<?php
                }
              }
?>
    </div>
<?php } // no HEADER_SALES_TEXT or SHOW_BANNERS_GROUP_SET2 ?>
</div>

<!--eof-branding display-->

<!--eof-header logo and navigation display-->

<!--bof-optional categories tabs navigation display-->
<?php require($template->get_template_dir('tpl_modules_categories_tabs.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_categories_tabs.php'); ?>
<!--eof-optional categories tabs navigation display-->

<!--bof-header ezpage links-->
<?php if (EZPAGES_STATUS_HEADER == '1' or (EZPAGES_STATUS_HEADER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) { ?>
<?php require($template->get_template_dir('tpl_ezpages_bar_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_ezpages_bar_header.php'); ?>
<?php } ?>
<!--eof-header ezpage links-->
</div>
<?php } ?>
7 Jun 2009, 2:36 PM
#4
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,717
Plugin Contributions:
0

Re: View cart link in ezpage links header to SHOW ALWAYS

And your URL?

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

8 Jun 2009, 10:10 AM
#5
ekaya avatar

ekaya

New Zenner

Join Date:
Jun 2009
Location:
KL
Posts:
16
Plugin Contributions:
0

Re: View cart link in ezpage links header to SHOW ALWAYS

Did anyone find a solution for this. very curious, please post. Thanks!

zen cart: vers. 1.3.8, php 5
grid layout mod.

8 Jun 2009, 10:27 AM
#6
ekaya avatar

ekaya

New Zenner

Join Date:
Jun 2009
Location:
KL
Posts:
16
Plugin Contributions:
0

Re: View cart link in ezpage links header to SHOW ALWAYS

found the answer in another thread.

http://www.zen-cart.com/forum/showthread.php?t=128346#post733460

move link outside of php conditional.
includes/templates/YOUR_TEMPLATE/common/tpl_header.php

find

<?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>

change to

<li><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a></li> <?php if ($_SESSION['cart']->count_contents() != 0) { ?>

zen cart: vers. 1.3.8, php 5
grid layout mod.

8 Jun 2009, 12:25 PM
#7
jami1955 avatar

jami1955

New Zenner

Join Date:
Feb 2008
Location:
Boulder, CO, Dec 2: India
Posts:
89
Plugin Contributions:
0

Re: View cart link in ezpage links header to SHOW ALWAYS

Obaa-san:

url - http://212.72.183.145/

8 Jun 2009, 1:01 PM
#8
jami1955 avatar

jami1955

New Zenner

Join Date:
Feb 2008
Location:
Boulder, CO, Dec 2: India
Posts:
89
Plugin Contributions:
0

Re: View cart link in ezpage links header to SHOW ALWAYS

So, I got it, thanks to both responders. I have this now in my tpl_ezpages_bar_header.php (not tpl_header.php)

<li><a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGIN; ?></a></li>
<?php } } ?>
<!--changed lines 36-38 -->
<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 if ($_SESSION['cart']->count_contents() != 0) { ?>
  • which enables both view cart and checkout links to appear always. Now I just have to move them over to the right where they belong, that's a simple CSS problem. The forums support have come thru again, I must say it stretches my skills as a web designer to be able to solve these problems thru the .... you get the pic.
    JSC:smile: