Zen Cart Logo
Forums / Addon Templates / Ocean Front Template Support Thread

Ocean Front Template Support Thread

Views: 56,761

Results 61 to 80 of 270
13 Aug 2008, 1:25 PM
#61
doodlebuckets avatar

doodlebuckets

Totally Zenned

Join Date:
Jul 2005
Posts:
497
Plugin Contributions:
0

Ocean Front Template Support Thread

clydejones:

Let me play around with the template but I'm thinking that it will take separate per-page stylesheets to get it right.

login.css
shopping_cart.css
and one for each of the checkout pages.

the change would be
.centerColumn {
margin: auto;
width: 792px;
}

Clyde, that's perfect! Thanks :)

13 Aug 2008, 1:56 PM
#62
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Ocean Front Template Support Thread

Doodlebuckets:

Clyde, that's perfect! Thanks :)

Glad its working.

Just a note: a width setting of between 650 and 670 will give you a more centered look.

.centerColumn {
margin: auto;
width: 792px;
}

13 Aug 2008, 3:07 PM
#63
doodlebuckets avatar

doodlebuckets

Totally Zenned

Join Date:
Jul 2005
Posts:
497
Plugin Contributions:
0

Re: Ocean Front Template Support Thread

clydejones:

Glad its working.

Just a note: a width setting of between 650 and 670 will give you a more centered look.

.centerColumn {
margin: auto;
width: 792px;
}

That's actually what I did and I am please with the look of it :) On another note, can you take a look at how my sideboxes display when there are many subcategories? Ie, http://www.babygiftbasketstores.com/store/index.php?main_page=index&cPath=9
Is there a fix for this?

13 Aug 2008, 3:59 PM
#64
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Ocean Front Template Support Thread

Doodlebuckets:

That's actually what I did and I am please with the look of it :) On another note, can you take a look at how my sideboxes display when there are many subcategories? Ie, http://www.babygiftbasketstores.com/store/index.php?main_page=index&cPath=9
Is there a fix for this?

I'm thinking that the list of subcategories is extending the sidebox_content.png beyond its default 750px height.
The only fix I can think of would be to edit the image and increase the height.

13 Aug 2008, 4:21 PM
#65
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Ocean Front Template Support Thread

clydejones:

I'm thinking that the list of subcategories is extending the sidebox_content.png beyond its default 750px height.
The only fix I can think of would be to edit the image and increase the height.

Here you go..

Just unzip the file and drop the graphic into includes/templates/ocean_front/images.

[Attachment no longer available]

14 Aug 2008, 8:54 PM
#66
doodlebuckets avatar

doodlebuckets

Totally Zenned

Join Date:
Jul 2005
Posts:
497
Plugin Contributions:
0

Re: Ocean Front Template Support Thread

clydejones:

Here you go..

Just unzip the file and drop the graphic into includes/templates/ocean_front/images.

[Attachment no longer available]

Wow, thanks, I'll uploaded it shortly! I was wondering if you would give me your opinion. I had someone criticize (constructively of course) my Doodlebuckets product pages, saying all the info was too far below the board. See here: http://www.doodlebuckets.com/store/handcrafted-child-step-stool-froggy-p-2535.html
I like the additional images where they are and I think the attributes should all come before the add to cart button so that people won't miss their choices.

Compare that to the ocean_front template product page: http://www.babygiftbasketstores.com/store/index.php?main_page=product_info&cPath=48&products_id=951
What do you think of how things stack up now? Do you think one of your product info display template mods would better suit my setup? I would really like to know what you think :o)
Thanks!

14 Aug 2008, 8:56 PM
#67
doodlebuckets avatar

doodlebuckets

Totally Zenned

Join Date:
Jul 2005
Posts:
497
Plugin Contributions:
0

Re: Ocean Front Template Support Thread

clydejones:

Here you go..

Just unzip the file and drop the graphic into includes/templates/ocean_front/images.

[Attachment no longer available]

That did it! Woo Hoo! I can't wait to finish this store up and launch it :)

14 Aug 2008, 9:43 PM
#68
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Ocean Front Template Support Thread

Doodlebuckets:

Wow, thanks, I'll uploaded it shortly! I was wondering if you would give me your opinion. I had someone criticize (constructively of course) my Doodlebuckets product pages, saying all the info was too far below the board. See here: http://www.doodlebuckets.com/store/handcrafted-child-step-stool-froggy-p-2535.html
I like the additional images where they are and I think the attributes should all come before the add to cart button so that people won't miss their choices.

Compare that to the ocean_front template product page: http://www.babygiftbasketstores.com/store/index.php?main_page=product_info&cPath=48&products_id=951
What do you think of how things stack up now? Do you think one of your product info display template mods would better suit my setup? I would really like to know what you think :o)
Thanks!

I think I'd have the attributes above the add to cart button (maybe reduce the the font size a bit). I like the way the dodlebuckets.com page is displayed:
(image and description on the left other info on the right.)

On the babygiftbasket site, if you turn off the sideboxes on the product info page, you'll have a bit more space to work with.

I'm not sure which of the product info display mods would work best. You'll probably have to work with each one in order to find something that works.

I'd do something like this:
Product Name Product Price (this at the top and in one line)
Rewards points info on this line
Product Image Product Attributes
Product Description Add to Cart Button

Hope this is useful.

14 Aug 2008, 11:58 PM
#69
doodlebuckets avatar

doodlebuckets

Totally Zenned

Join Date:
Jul 2005
Posts:
497
Plugin Contributions:
0

Re: Ocean Front Template Support Thread

Here is a product with a lot of attributes: http://www.babygiftbasketstores.com/store/index.php?main_page=product_info&cPath=48&products_id=957
What do you think? I used one of your template mods and rearranged a bit. I don't know how to get the name and price on the same line. I put the code above the beginning of the left column (the <div id="productbox"> code). Below is the code with the changes I made...if you think there's a tweak that will make it nicer and can tell me how to change the code, I would be happy to see how it looks :)

Do you think it's OK to have the sideboxes off and still have people navigate around? I do plan on adding the advanced cross-sell, so that will help people find similar stuff. I just don't want people to get stuck and not find their way back to the other product lines. So many shoppers are not 'net savvy. I want to make sure that they can find what they are looking for easily...

[php]<?php
/**
 * Page Template
 *
 * Loaded automatically by index.php?main_page=product_info.<br />
 * Displays details of a typical product
 *
 * @package templateSystem
 * @copyright Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_product_info_display.php 5369 2006-12-23 10:55:52Z drbyte $
 */
 //require(DIR_WS_MODULES . '/debug_blocks/product_info_prices.php');
?>
<div class="centerColumn" id="productGeneral">

<!--bof Form start-->
<?php echo zen_draw_form('cart_quantity', zen_href_link(zen_get_info_page($_GET['products_id']), zen_get_all_get_params(array('action')) . 'action=add_product'), 'post', 'enctype="multipart/form-data"') . "\n"; ?>
<!--eof Form start-->

<?php if ($messageStack->size('product_info') > 0) echo $messageStack->output('product_info'); ?>

<!--bof Category Icon -->
<!--<?php // if ($module_show_categories != 0) {?>-->
<!--<?php 
/**
 * display the category icons
 */
// require($template->get_template_dir('/tpl_modules_category_icon_display.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_category_icon_display.php'); ?>-->             .
<!--<?php // } ?>-->
<!--eof Category Icon -->

<!--bof Prev/Next top position -->
<?php if (PRODUCT_INFO_PREVIOUS_NEXT == 1 or PRODUCT_INFO_PREVIOUS_NEXT == 3) { ?>
<?php
/**
 * display the product previous/next helper
 */
require($template->get_template_dir('/tpl_products_next_previous.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_products_next_previous.php'); ?>
<?php } ?>
<!--eof Prev/Next top position-->

<div id="mainProductBox">
<!--bof Product Name-->
<h1 id="productName" class="productGeneral"><?php echo $products_name; ?></h1>
<!--eof Product Name-->
<!--bof Product Price block -->
<p id="productPrices" class="productGeneral">
<?php
// base price
  if ($show_onetime_charges_description == 'true') {
    $one_time = '<span >' . TEXT_ONETIME_CHARGE_SYMBOL . TEXT_ONETIME_CHARGE_DESCRIPTION . '</span><br />';
  } else {
    $one_time = '';
  }
  echo $one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE : '') . zen_get_products_display_price((int)$_GET['products_id']);
?></p>
<!--eof Product Price block -->
<!-- bof Product Box -->
<div id="productbox">

<!-- bof rewards points -->
<?php
 if (MODULE_ORDER_TOTAL_SC_ORDER_PRODUCT_POINTS == "true") {
    $store_credit = new storeCredit();
    $products_id = (int)$_GET["products_id"];
    $rewards_amount = $store_credit->_retrieve_reward_amount($products_id);
    if ($rewards_amount != $currencies->format(0)) {
    echo sprintf(TEXT_SC_PRODUCTS_INFO, $rewards_amount);
    }
  }
?>
<!-- eof rewards points -->
<!--bof Main Product Image -->
<!--<div id="imagebox">-->
<?php
  if (zen_not_null($products_image)) {
  ?>
<?php
/**
 * display the main product image
 */
   require($template->get_template_dir('/tpl_modules_main_product_image.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_main_product_image.php'); ?>
<?php
  }
?>
<!--</div>-->
<!--eof Main Product Image-->

<br class="clearBoth" />

 <!--bof Product description -->
<?php if ($products_description != '') { ?>
<div id="productDescription" class="productGeneral"><?php echo stripslashes($products_description); ?></div>
<?php } ?>
<!--eof Product description -->

<!--bof Product details list  -->
<?php if ( (($flag_show_product_info_model == 1 and $products_model != '') or ($flag_show_product_info_weight == 1 and $products_weight !=0) or ($flag_show_product_info_quantity == 1) or ($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name))) ) { ?>
<ul id="productDetailsList" class="floatingBox back">
  <?php echo (($flag_show_product_info_model == 1 and $products_model !='') ? '<li>' . TEXT_PRODUCT_MODEL . $products_model . '</li>' : '') . "\n"; ?>
  <?php echo (($flag_show_product_info_weight == 1 and $products_weight !=0) ? '<li>' . TEXT_PRODUCT_WEIGHT .  $products_weight . TEXT_PRODUCT_WEIGHT_UNIT . '</li>'  : '') . "\n"; ?>
  <?php echo (($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name)) ? '<li>' . TEXT_PRODUCT_MANUFACTURER . $manufacturers_name . '</li>' : '') . "\n"; ?>
<!--  <?php // echo '<li>' . zen_image(DIR_WS_IMAGES . zen_get_products_manufacturers_image($_GET['products_id'])) . '</li>'; ?> -->

  </ul>
<br class="clearBoth" />
<?php
  }
?>
<!--eof Product details list -->

<!--bof free ship icon  -->
<?php if(zen_get_product_is_always_free_shipping($products_id_current) && $flag_show_product_info_free_shipping) { ?>
<div id="freeShippingIcon"><?php echo TEXT_PRODUCT_FREE_SHIPPING_ICON; ?></div>
<?php } ?>
<!--eof free ship icon  -->

</div>
<!-- eof Product Box -->

<div id="productPurchaseBox">
<div id="buybox">
<!--bof Additional Product Images -->
<?php
/**
 * display the products additional images
 */
  require($template->get_template_dir('/tpl_modules_additional_images.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_additional_images.php'); ?>
<!--eof Additional Product Images -->
<!--bof Attributes Module -->
<?php
  if ($pr_attr->fields['total'] > 0) {
?>
<?php
/**
 * display the product atributes
 */
  require($template->get_template_dir('/tpl_modules_attributes.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_attributes.php'); ?>
<?php
  }
?>
<!--eof Attributes Module -->

<!--<div id="QuantityDiscountsBox">-->
<!--bof Quantity Discounts table -->
<?php
  if ($products_discount_type != 0) { ?>
<?php
/**
 * display the products quantity discount
 */
 require($template->get_template_dir('/tpl_modules_products_quantity_discounts.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_products_quantity_discounts.php'); ?>
<?php
  }
?>
<!--</div>-->
<!--eof Quantity Discounts table -->

<!--bof Add to Cart Box -->
<?php
if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') {
  // do nothing
} else {
?>
            <?php
    $display_qty = (($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($_GET['products_id'])) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($_GET['products_id']) . '</p>' : '');
            if ($products_qty_box_status == 0 or $products_quantity_order_max== 1) {
              // hide the quantity box and default to 1
              $the_button = '<input type="hidden" name="cart_quantity" value="1" />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
            } else {
              // show the quantity box
    $the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '<br />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
            }
    $display_button = zen_get_buy_now_button($_GET['products_id'], $the_button);
  ?>
  <?php if ($display_qty != '' or $display_button != '') { ?>
    <div id="cartAdd">
    <?php
      echo $display_qty;
      echo $display_button;
            ?>
          </div>
  <?php } // display qty and button ?>
<?php } // CUSTOMERS_APPROVAL == 3 ?>
<!--eof Add to Cart Box-->

<!--<br class="clearBoth" />-->
</div>
</div>

</div>
<br class="clearBoth" />
<hr />

<!--bof Prev/Next bottom position -->
<?php if (PRODUCT_INFO_PREVIOUS_NEXT == 2 or PRODUCT_INFO_PREVIOUS_NEXT == 3) { ?>
<?php
/**
 * display the product previous/next helper
 */
 require($template->get_template_dir('/tpl_products_next_previous.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_products_next_previous.php'); ?>
<?php } ?>
<!--eof Prev/Next bottom position -->

<!--bof Tell a Friend button -->
<?php
  if ($flag_show_product_info_tell_a_friend == 1) { ?>
<div id="productTellFriendLink" class="buttonRow forward"><?php echo ($flag_show_product_info_tell_a_friend == 1 ? '<a href="' . zen_href_link(FILENAME_TELL_A_FRIEND, 'products_id=' . $_GET['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_TELLAFRIEND, BUTTON_TELLAFRIEND_ALT) . '</a>' : ''); ?></div>
<?php
  }
?>
<!--eof Tell a Friend button -->

<!--bof Reviews button and count-->
<?php
  if ($flag_show_product_info_reviews == 1) {
    // if more than 0 reviews, then show reviews button; otherwise, show the "write review" button
    if ($reviews->fields['count'] > 0 ) { ?>
<div id="productReviewLink" class="buttonRow back"><?php echo '<a href="' . zen_href_link(FILENAME_PRODUCT_REVIEWS, zen_get_all_get_params()) . '">' . zen_image_button(BUTTON_IMAGE_REVIEWS, BUTTON_REVIEWS_ALT) . '</a>'; ?></div>
<br class="clearBoth" />
<p class="reviewCount"><?php echo ($flag_show_product_info_reviews_count == 1 ? TEXT_CURRENT_REVIEWS . ' ' . $reviews->fields['count'] : ''); ?></p>
<?php } else { ?>
<div id="productReviewLink" class="buttonRow back"><?php echo '<a href="' . zen_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, zen_get_all_get_params(array())) . '">' . zen_image_button(BUTTON_IMAGE_WRITE_REVIEW, BUTTON_WRITE_REVIEW_ALT) . '</a>'; ?></div>
<br class="clearBoth" />
<?php
  }
}
?>
<!--eof Reviews button and count -->


<!--bof Product date added/available-->
<?php
  if ($products_date_available > date('Y-m-d H:i:s')) {
    if ($flag_show_product_info_date_available == 1) {
?>
  <p id="productDateAvailable" class="productGeneral centeredContent"><?php echo sprintf(TEXT_DATE_AVAILABLE, zen_date_long($products_date_available)); ?></p>
<?php
    }
  } else {
    if ($flag_show_product_info_date_added == 1) {
?>
      <p id="productDateAdded" class="productGeneral centeredContent"><?php echo sprintf(TEXT_DATE_ADDED, zen_date_long($products_date_added)); ?></p>
<?php
    } // $flag_show_product_info_date_added
  }
?>
<!--eof Product date added/available -->

<!--bof Product URL -->
<?php
  if (zen_not_null($products_url)) {
    if ($flag_show_product_info_url == 1) {
?>
    <p id="productInfoLink" class="productGeneral centeredContent"><?php echo sprintf(TEXT_MORE_INFORMATION, zen_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($products_url), 'NONSSL', true, false)); ?></p>
<?php
    } // $flag_show_product_info_url
  }
?>
<!--eof Product URL -->

<!--bof also purchased products module-->
<?php require($template->get_template_dir('tpl_modules_also_purchased_products.php', DIR_WS_TEMPLATE, $current_page_base,'templates'). '/' . 'tpl_modules_also_purchased_products.php');?>
<!--eof also purchased products module-->

<!--bof Form close-->
</form>
<!--eof Form close-->

<br class="clearBoth" />

</div>[/php]
15 Aug 2008, 12:35 AM
#70
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Ocean Front Template Support Thread

Doodlebuckets:

Do you think it's OK to have the sideboxes off and still have people navigate around? I do plan on adding the advanced cross-sell, so that will help people find similar stuff. I just don't want people to get stuck and not find their way back to the other product lines. So many shoppers are not 'net savvy. I want to make sure that they can find what they are looking for easily...

I don't think you need to change and/or tweak anything.

As far as the sideboxes go, I'm of two minds.

first with the sideboxes off on the product info page, If they add the product to the shopping cart, they are taken to the shopping cart page which will have the sideboxes and they can then select from the categories. Kinda like, "I picked this product and I don't see any chance to look at something else; I might as well go ahead and put it in my shopping cart."

second, You might be right, and go ahead and give them a chance to change their mind about this particular product.

23 Aug 2008, 4:37 PM
#71
doodlebuckets avatar

doodlebuckets

Totally Zenned

Join Date:
Jul 2005
Posts:
497
Plugin Contributions:
0

Re: Ocean Front Template Support Thread

Clyde, I have added the Personalized My Account Link to the header and it works when someone is logged in, but when one is not logged in, there is a extra tab. I have posted the code below...what do I need to modify to correct this? Thanks! www.babygiftbasketstores.com is the site :)

[PHP]<?php
/**
 * Common Template - tpl_header.php
 *
 * this file can be copied to /templates/your_template_dir/pagename<br />
 * example: to override the privacy page<br />
 * make a directory /templates/my_template/privacy<br />
 * copy /templates/templates_defaults/common/tpl_footer.php to /templates/my_template/privacy/tpl_header.php<br />
 * to override the global settings and turn off the footer un-comment the following line:<br />
 * <br />
 * $flag_disable_header = true;<br />
 *
 * @package templateSystem
 * @copyright Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_header.php 4813 2006-10-23 02:13:53Z drbyte $
 */
?>

<?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">
<!--bof-branding display-->
<div id="logoWrapper">
<div id="navMainSearch"><?php require(DIR_WS_MODULES . 'sideboxes/search_header.php'); ?></div>
    <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 != '') {
?>
      <div id="tagline"><?php echo HEADER_SALES_TEXT;?></div>
<?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>
<br class="clearBoth" />
<!--eof-branding display-->

<!--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>
<?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 } } ?>
</ul>
<ul class="forward">
<li class="contact"><a href="<?php echo zen_href_link(FILENAME_CONTACT_US, '', 'SSL'); ?>"><?php echo BOX_INFORMATION_CONTACT; ?></a></li>
    <li><?php if (SHOW_CUSTOMER_GREETING == '1') { ?><a href="<?php echo zen_href_link(FILENAME_ACCOUNT); ?>"><?php echo zen_customer_store_account(); ?></a><?php } ?></li>
<?php if ($_SESSION['cart']->count_contents() != 0) { ?>
    <li><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT; ?></a></li>
<?php }?>
    <li class="viewCart"><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a></li>
</ul>

</div>
<!--<div id="navMainSearch"><?php // require(DIR_WS_MODULES . 'sideboxes/search_header.php'); ?></div>-->
<br class="clearBoth" />
</div>
<!--eof-navigation 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 } ?>[/PHP]
23 Aug 2008, 5:36 PM
#72
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Ocean Front Template Support Thread

Doodlebuckets:

Clyde, I have added the Personalized My Account Link to the header and it works when someone is logged in, but when one is not logged in, there is a extra tab. I have posted the code below...what do I need to modify to correct this? Thanks! www.babygiftbasketstores.com is the site :)

Looks like a mis-placed li tag

<ul class="forward">
<li class="contact"><a href="<?php echo zen_href_link(FILENAME_CONTACT_US, '', 'SSL'); ?>"><?php echo BOX_INFORMATION_CONTACT; ?></a></li>
   [B] <li>[/B]<?php if (SHOW_CUSTOMER_GREETING == '1') { ?><li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT); ?>"><?php echo zen_customer_store_account(); ?></a><?php } ?></li>
<?php if ($_SESSION['cart']->count_contents() != 0) { ?>
    <li><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT; ?></a></li>
<?php }?>
    <li class="viewCart"><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a></li>
</ul>

delete the bolded highlighted tag and insert the lighter highlighted tag.

I think that should correct the problem.

23 Aug 2008, 5:46 PM
#73
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Ocean Front Template Support Thread

clydejones:

Looks like a mis-placed li tag

<ul class="forward"> <li class="contact"><a href="<?php echo zen_href_link(FILENAME_CONTACT_US, '', 'SSL'); ?>"><?php echo BOX_INFORMATION_CONTACT; ?></a></li> [B] <li>[/B]<?php if (SHOW_CUSTOMER_GREETING == '1') { ?><li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT); ?>"><?php echo zen_customer_store_account(); ?></a><?php } ?></li> <?php if ($_SESSION['cart']->count_contents() != 0) { ?> <li><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT; ?></a></li> <?php }?> <li class="viewCart"><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a></li> </ul> ``` > > delete the bolded highlighted tag and insert the lighter highlighted tag. > > I think that should correct the problem.

Actually scratch this recomendation and try the following:

replace this entire section:

    <li><?php if (SHOW_CUSTOMER_GREETING == '1') { ?><a href="<?php echo zen_href_link(FILENAME_ACCOUNT); ?>"><?php echo zen_customer_store_account(); ?></a><?php } ?></li>

with the following:

    <?php if (SHOW_CUSTOMER_GREETING == '1') { ?><li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT); ?>"><?php echo zen_customer_store_account(); ?></a></li><?php } ?>
23 Aug 2008, 7:17 PM
#74
doodlebuckets avatar

doodlebuckets

Totally Zenned

Join Date:
Jul 2005
Posts:
497
Plugin Contributions:
0

Re: Ocean Front Template Support Thread

clydejones:

Actually scratch this recomendation and try the following:

replace this entire section:

<li><?php if (SHOW_CUSTOMER_GREETING == '1') { ?><a href="<?php echo zen_href_link(FILENAME_ACCOUNT); ?>"><?php echo zen_customer_store_account(); ?></a><?php } ?></li>
> 
> ```
    <?php if (SHOW_CUSTOMER_GREETING == '1') { ?><li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT); ?>"><?php echo zen_customer_store_account(); ?></a></li><?php } ?>

I'm afraid the extra tab is still there...

23 Aug 2008, 7:38 PM
#75
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Ocean Front Template Support Thread

Doodlebuckets:

I'm afraid the extra tab is still there...

Have you cleared your browser cache?

I just checked the site and didn't see the extra tab.

23 Aug 2008, 7:43 PM
#76
doodlebuckets avatar

doodlebuckets

Totally Zenned

Join Date:
Jul 2005
Posts:
497
Plugin Contributions:
0

Re: Ocean Front Template Support Thread

clydejones:

Have you cleared your browser cache?

I just checked the site and didn't see the extra tab.

That's because I was messing around, trying to fix it and broke the whole site! So I put the original tpl_header.php file back. I have put it as it was when I did the code change you suggested and you can see the extra tab is still there...

23 Aug 2008, 7:45 PM
#77
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Ocean Front Template Support Thread

clydejones:

Have you cleared your browser cache?

I just checked the site and didn't see the extra tab.

Amy can you post the code for this function

zen_customer_store_account()

23 Aug 2008, 7:52 PM
#78
doodlebuckets avatar

doodlebuckets

Totally Zenned

Join Date:
Jul 2005
Posts:
497
Plugin Contributions:
0

Re: Ocean Front Template Support Thread

clydejones:

Amy can you post the code for this function

zen_customer_store_account()

Here it is:

[php]<?php
/**
 * functions_customers
 *
 * @package functions
 * @copyright Copyright 2003-2005 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: functions_customers.php 4793 2006-10-20 05:25:20Z ajeh $
 */

////
// Returns the address_format_id for the given country
// TABLES: countries;
  function zen_get_address_format_id($country_id) {
    global $db;
    $address_format_query = "select address_format_id as format_id
                             from " . TABLE_COUNTRIES . "
                             where countries_id = '" . (int)$country_id . "'";

    $address_format = $db->Execute($address_format_query);

    if ($address_format->RecordCount() > 0) {
      return $address_format->fields['format_id'];
    } else {
      return '1';
    }
  }

////
// Return a formatted address
// TABLES: address_format
  function zen_address_format($address_format_id, $address, $html, $boln, $eoln) {
    global $db;
    $address_format_query = "select address_format as format
                             from " . TABLE_ADDRESS_FORMAT . "
                             where address_format_id = '" . (int)$address_format_id . "'";

    $address_format = $db->Execute($address_format_query);
    $company = zen_output_string_protected($address['company']);
    if (isset($address['firstname']) && zen_not_null($address['firstname'])) {
      $firstname = zen_output_string_protected($address['firstname']);
      $lastname = zen_output_string_protected($address['lastname']);
    } elseif (isset($address['name']) && zen_not_null($address['name'])) {
      $firstname = zen_output_string_protected($address['name']);
      $lastname = '';
    } else {
      $firstname = '';
      $lastname = '';
    }
    $street = zen_output_string_protected($address['street_address']);
    $suburb = zen_output_string_protected($address['suburb']);
    $city = zen_output_string_protected($address['city']);
    $state = zen_output_string_protected($address['state']);
    if (isset($address['country_id']) && zen_not_null($address['country_id'])) {
      $country = zen_get_country_name($address['country_id']);

      if (isset($address['zone_id']) && zen_not_null($address['zone_id'])) {
        $state = zen_get_zone_code($address['country_id'], $address['zone_id'], $state);
      }
    } elseif (isset($address['country']) && zen_not_null($address['country'])) {
      if (is_array($address['country'])) {
        $country = zen_output_string_protected($address['country']['countries_name']);
      } else {
      $country = zen_output_string_protected($address['country']);
      }
    } else {
      $country = '';
    }
    $postcode = zen_output_string_protected($address['postcode']);
    $zip = $postcode;

    if ($html) {
// HTML Mode
      $HR = '<hr />';
      $hr = '<hr />';
      if ( ($boln == '') && ($eoln == "\n") ) { // Values not specified, use rational defaults
        $CR = '<br />';
        $cr = '<br />';
        $eoln = $cr;
      } else { // Use values supplied
        $CR = $eoln . $boln;
        $cr = $CR;
      }
    } else {
// Text Mode
      $CR = $eoln;
      $cr = $CR;
      $HR = '----------------------------------------';
      $hr = '----------------------------------------';
    }

    $statecomma = '';
    $streets = $street;
    if ($suburb != '') $streets = $street . $cr . $suburb;
    if ($country == '') {
      if (is_array($address['country'])) {
        $country = zen_output_string_protected($address['country']['countries_name']);
      } else {
      $country = zen_output_string_protected($address['country']);
      }
    }
    if ($state != '') $statecomma = $state . ', ';

    $fmt = $address_format->fields['format'];
    eval("\$address_out = \"$fmt\";");

    if ( (ACCOUNT_COMPANY == 'true') && (zen_not_null($company)) ) {
      $address_out = $company . $cr . $address_out;
    }

    return $address_out;
  }

////
// Return a formatted address
// TABLES: customers, address_book
  function zen_address_label($customers_id, $address_id = 1, $html = false, $boln = '', $eoln = "\n") {
    global $db;
    $address_query = "select entry_firstname as firstname, entry_lastname as lastname,
                             entry_company as company, entry_street_address as street_address,
                             entry_suburb as suburb, entry_city as city, entry_postcode as postcode,
                             entry_state as state, entry_zone_id as zone_id,
                             entry_country_id as country_id
                      from " . TABLE_ADDRESS_BOOK . "
                      where customers_id = '" . (int)$customers_id . "'
                      and address_book_id = '" . (int)$address_id . "'";

    $address = $db->Execute($address_query);

    $format_id = zen_get_address_format_id($address->fields['country_id']);
    return zen_address_format($format_id, $address->fields, $html, $boln, $eoln);
  }

////
// Return a customer greeting
  function zen_customer_greeting() {

    if (isset($_SESSION['customer_id']) && $_SESSION['customer_first_name']) {
      $greeting_string = sprintf(TEXT_GREETING_PERSONAL, zen_output_string_protected($_SESSION['customer_first_name']), zen_href_link(FILENAME_PRODUCTS_NEW));
    } else {
      $greeting_string = sprintf(TEXT_GREETING_GUEST, zen_href_link(FILENAME_LOGIN, '', 'SSL'), zen_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'));
    }

    return $greeting_string;
  }
/// bof Personalized My Account Link by bigjoed
  function zen_customer_store_account() {

    if (isset($_SESSION['customer_id']) && $_SESSION['customer_first_name']) {
      $store_account_string = sprintf(TEXT_STORE_ACCOUNT_PERSONAL, zen_output_string_protected($_SESSION['customer_first_name']), zen_href_link(FILENAME_ACCOUNT));
    } else {
      $store_account_string = sprintf(TEXT_STORE_ACCOUNT_GUEST, zen_href_link(FILENAME_LOGIN, '', 'SSL'), zen_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'));
    }

    return $store_account_string;
  }  
/// eof Personalized My Account Link by bigjoed
  function zen_count_customer_orders($id = '', $check_session = true) {
    global $db;

    if (is_numeric($id) == false) {
      if ($_SESSION['customer_id']) {
        $id = $_SESSION['customer_id'];
      } else {
        return 0;
      }
    }

    if ($check_session == true) {
      if ( ($_SESSION['customer_id'] == false) || ($id != $_SESSION['customer_id']) ) {
        return 0;
      }
    }

    $orders_check_query = "select count(*) as total
                           from " . TABLE_ORDERS . "
                           where customers_id = '" . (int)$id . "'";

    $orders_check = $db->Execute($orders_check_query);

    return $orders_check->fields['total'];
  }

  function zen_count_customer_address_book_entries($id = '', $check_session = true) {
    global $db;

    if (is_numeric($id) == false) {
      if ($_SESSION['customer_id']) {
        $id = $_SESSION['customer_id'];
      } else {
        return 0;
      }
    }

    if ($check_session == true) {
      if ( ($_SESSION['customer_id'] == false) || ($id != $_SESSION['customer_id']) ) {
        return 0;
      }
    }

    $addresses_query = "select count(*) as total
                        from " . TABLE_ADDRESS_BOOK . "
                        where customers_id = '" . (int)$id . "'";

    $addresses = $db->Execute($addresses_query);

    return $addresses->fields['total'];
  }

////
// validate customer matches session
  function zen_get_customer_validate_session($customer_id) {
    global $db, $messageStack;
    $zc_check_customer = $db->Execute("SELECT customers_id from " . TABLE_CUSTOMERS . " WHERE customers_id=" . (int)$customer_id);
    if ($zc_check_customer->RecordCount() <= 0) {
      $db->Execute("DELETE from " . TABLE_CUSTOMERS_BASKET . " WHERE customers_id= " . $customer_id);
      $db->Execute("DELETE from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " WHERE customers_id= " . $customer_id);
      unset($_SESSION['customer_id']);
      $messageStack->add_session('header', ERROR_CUSTOMERS_ID_INVALID, 'error');
      return false;
    }
    return true;
  }
?>[/php]
23 Aug 2008, 8:14 PM
#79
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Ocean Front Template Support Thread

Doodlebuckets:

Here it is:

[php]<?php
/**

  • functions_customers
  • @package functions
  • @copyright Copyright 2003-2005 Zen Cart Development Team
  • @copyright Portions Copyright 2003 osCommerce
  • @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
  • @version $Id: functions_customers.php 4793 2006-10-20 05:25:20Z ajeh $
    */

////
// Returns the address_format_id for the given country
// TABLES: countries;
function zen_get_address_format_id($country_id) {
global $db;
$address_format_query = "select address_format_id as format_id
from " . TABLE_COUNTRIES . "
where countries_id = '" . (int)$country_id . "'";

$address_format = $db->Execute($address_format_query);

if ($address_format->RecordCount() > 0) {
  return $address_format->fields['format_id'];
} else {
  return '1';
}

}

////
// Return a formatted address
// TABLES: address_format
function zen_address_format($address_format_id, $address, $html, $boln, $eoln) {
global $db;
$address_format_query = "select address_format as format
from " . TABLE_ADDRESS_FORMAT . "
where address_format_id = '" . (int)$address_format_id . "'";

$address_format = $db->Execute($address_format_query);
$company = zen_output_string_protected($address['company']);
if (isset($address['firstname']) && zen_not_null($address['firstname'])) {
  $firstname = zen_output_string_protected($address['firstname']);
  $lastname = zen_output_string_protected($address['lastname']);
} elseif (isset($address['name']) && zen_not_null($address['name'])) {
  $firstname = zen_output_string_protected($address['name']);
  $lastname = '';
} else {
  $firstname = '';
  $lastname = '';
}
$street = zen_output_string_protected($address['street_address']);
$suburb = zen_output_string_protected($address['suburb']);
$city = zen_output_string_protected($address['city']);
$state = zen_output_string_protected($address['state']);
if (isset($address['country_id']) && zen_not_null($address['country_id'])) {
  $country = zen_get_country_name($address['country_id']);

  if (isset($address['zone_id']) && zen_not_null($address['zone_id'])) {
    $state = zen_get_zone_code($address['country_id'], $address['zone_id'], $state);
  }
} elseif (isset($address['country']) && zen_not_null($address['country'])) {
  if (is_array($address['country'])) {
    $country = zen_output_string_protected($address['country']['countries_name']);
  } else {
  $country = zen_output_string_protected($address['country']);
  }
} else {
  $country = '';
}
$postcode = zen_output_string_protected($address['postcode']);
$zip = $postcode;

if ($html) {

// HTML Mode
$HR = '<hr />';
$hr = '<hr />';
if ( ($boln == '') && ($eoln == "\n") ) { // Values not specified, use rational defaults
$CR = '<br />';
$cr = '<br />';
$eoln = $cr;
} else { // Use values supplied
$CR = $eoln . $boln;
$cr = $CR;
}
} else {
// Text Mode
$CR = $eoln;
$cr = $CR;
$HR = '----------------------------------------';
$hr = '----------------------------------------';
}

$statecomma = '';
$streets = $street;
if ($suburb != '') $streets = $street . $cr . $suburb;
if ($country == '') {
  if (is_array($address['country'])) {
    $country = zen_output_string_protected($address['country']['countries_name']);
  } else {
  $country = zen_output_string_protected($address['country']);
  }
}
if ($state != '') $statecomma = $state . ', ';

$fmt = $address_format->fields['format'];
eval("\$address_out = \"$fmt\";");

if ( (ACCOUNT_COMPANY == 'true') && (zen_not_null($company)) ) {
  $address_out = $company . $cr . $address_out;
}

return $address_out;

}

////
// Return a formatted address
// TABLES: customers, address_book
function zen_address_label($customers_id, $address_id = 1, $html = false, $boln = '', $eoln = "\n") {
global $db;
$address_query = "select entry_firstname as firstname, entry_lastname as lastname,
entry_company as company, entry_street_address as street_address,
entry_suburb as suburb, entry_city as city, entry_postcode as postcode,
entry_state as state, entry_zone_id as zone_id,
entry_country_id as country_id
from " . TABLE_ADDRESS_BOOK . "
where customers_id = '" . (int)$customers_id . "'
and address_book_id = '" . (int)$address_id . "'";

$address = $db->Execute($address_query);

$format_id = zen_get_address_format_id($address->fields['country_id']);
return zen_address_format($format_id, $address->fields, $html, $boln, $eoln);

}

////
// Return a customer greeting
function zen_customer_greeting() {

if (isset($_SESSION['customer_id']) && $_SESSION['customer_first_name']) {
  $greeting_string = sprintf(TEXT_GREETING_PERSONAL, zen_output_string_protected($_SESSION['customer_first_name']), zen_href_link(FILENAME_PRODUCTS_NEW));
} else {
  $greeting_string = sprintf(TEXT_GREETING_GUEST, zen_href_link(FILENAME_LOGIN, '', 'SSL'), zen_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'));
}

return $greeting_string;

}
/// bof Personalized My Account Link by bigjoed
function zen_customer_store_account() {

if (isset($_SESSION['customer_id']) && $_SESSION['customer_first_name']) {
  $store_account_string = sprintf(TEXT_STORE_ACCOUNT_PERSONAL, zen_output_string_protected($_SESSION['customer_first_name']), zen_href_link(FILENAME_ACCOUNT));
} else {
  $store_account_string = sprintf(TEXT_STORE_ACCOUNT_GUEST, zen_href_link(FILENAME_LOGIN, '', 'SSL'), zen_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'));
}

return $store_account_string;

}
/// eof Personalized My Account Link by bigjoed
function zen_count_customer_orders($id = '', $check_session = true) {
global $db;

if (is_numeric($id) == false) {
  if ($_SESSION['customer_id']) {
    $id = $_SESSION['customer_id'];
  } else {
    return 0;
  }
}

if ($check_session == true) {
  if ( ($_SESSION['customer_id'] == false) || ($id != $_SESSION['customer_id']) ) {
    return 0;
  }
}

$orders_check_query = "select count(*) as total
                       from " . TABLE_ORDERS . "
                       where customers_id = '" . (int)$id . "'";

$orders_check = $db->Execute($orders_check_query);

return $orders_check->fields['total'];

}

function zen_count_customer_address_book_entries($id = '', $check_session = true) {
global $db;

if (is_numeric($id) == false) {
  if ($_SESSION['customer_id']) {
    $id = $_SESSION['customer_id'];
  } else {
    return 0;
  }
}

if ($check_session == true) {
  if ( ($_SESSION['customer_id'] == false) || ($id != $_SESSION['customer_id']) ) {
    return 0;
  }
}

$addresses_query = "select count(*) as total
                    from " . TABLE_ADDRESS_BOOK . "
                    where customers_id = '" . (int)$id . "'";

$addresses = $db->Execute($addresses_query);

return $addresses->fields['total'];

}

////
// validate customer matches session
function zen_get_customer_validate_session($customer_id) {
global $db, $messageStack;
$zc_check_customer = $db->Execute("SELECT customers_id from " . TABLE_CUSTOMERS . " WHERE customers_id=" . (int)$customer_id);
if ($zc_check_customer->RecordCount() <= 0) {
$db->Execute("DELETE from " . TABLE_CUSTOMERS_BASKET . " WHERE customers_id= " . $customer_id);
$db->Execute("DELETE from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " WHERE customers_id= " . $customer_id);
unset($_SESSION['customer_id']);
$messageStack->add_session('header', ERROR_CUSTOMERS_ID_INVALID, 'error');
return false;
}
return true;
}
?>[/php]


AH, HAH -

This is what you have in the navbar:
<?php if (SHOW_CUSTOMER_GREETING == '1') { ?><li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT); ?>"><?php echo zen_customer_store_account(); ?></a></li><?php } ?>

This is the function:

/// bof Personalized My Account Link by bigjoed
  function zen_customer_store_account() {

    if (isset($_SESSION['customer_id']) && $_SESSION['customer_first_name']) {
      $store_account_string = sprintf(TEXT_STORE_ACCOUNT_PERSONAL, zen_output_string_protected($_SESSION['customer_first_name']), zen_href_link(FILENAME_ACCOUNT));
    } else {
      $store_account_string = sprintf(TEXT_STORE_ACCOUNT_GUEST, zen_href_link(FILENAME_LOGIN, '', 'SSL'), zen_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'));
    }

    return $store_account_string;
  }  
/// eof Personalized My Account Link by bigjoed

You're actually calling the link twice in the navbar and that's why you get the double tab.

Try replacing this:

<?php if (SHOW_CUSTOMER_GREETING == '1') { ?><li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT); ?>"><?php echo zen_customer_store_account(); ?></a></li><?php } ?>

with just this:

<?php if (SHOW_CUSTOMER_GREETING == '1') { ?><li><a href="<?php echo zen_customer_store_account(); ?></a></li><?php } ?>
23 Aug 2008, 8:18 PM
#80
doodlebuckets avatar

doodlebuckets

Totally Zenned

Join Date:
Jul 2005
Posts:
497
Plugin Contributions:
0

Re: Ocean Front Template Support Thread

clydejones:

AH, HAH -

This is what you have in the navbar:

<?php if (SHOW_CUSTOMER_GREETING == '1') { ?><li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT); ?>"><?php echo zen_customer_store_account(); ?></a></li><?php } ?>

This is the function:

/// bof Personalized My Account Link by bigjoed
function zen_customer_store_account() {

if (isset($_SESSION['customer_id']) && $_SESSION['customer_first_name']) {
  $store_account_string = sprintf(TEXT_STORE_ACCOUNT_PERSONAL, zen_output_string_protected($_SESSION['customer_first_name']), zen_href_link(FILENAME_ACCOUNT));
} else {
  $store_account_string = sprintf(TEXT_STORE_ACCOUNT_GUEST, zen_href_link(FILENAME_LOGIN, '', 'SSL'), zen_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'));
}

return $store_account_string;

}
/// eof Personalized My Account Link by bigjoed

You're actually calling the link twice in the navbar and that's why you get the double tab.

Try replacing this:

<?php if (SHOW_CUSTOMER_GREETING == '1') { ?><li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT); ?>"><?php echo zen_customer_store_account(); ?></a></li><?php } ?>
> 
> ```
 <?php if (SHOW_CUSTOMER_GREETING == '1') { ?><li><a href="<?php echo zen_customer_store_account(); ?></a></li><?php } ?>

Uh Oh! Now there is no tab at all!