Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 37
  1. #21
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: disable subcategory title/ h1

    It looks like you would put both of those red sections into your tpl_header.php, below the cartcount div.
    The first one has everything needed to calculate and display the free shipping, and the second one has the checkout link.
    Make a single div to contain both of them, and give it an id like cartHeader, and position that in your stylesheet the same way as #cartCount.

  2. #22
    Join Date
    Mar 2009
    Location
    Cornelius, NC
    Posts
    334
    Plugin Contributions
    0

    Default Re: disable subcategory title/ h1

    moving in the right direction...

    at least it didnt make my whole page disappear like normal when i try to add something... lol

    if you look at site, you will see it just dumped the text of the code into the page, instead of actually processing the functions. i do not know php well enough to know what to change, but if i had to guess it would be, add a <?php to the top and a ?> to the bottom??????

    your take?
    www.customk9design.com/catalogzen

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

    Default Re: disable subcategory title/ h1

    Yep, you're right, the PHP code needs its tags for both sections.

    There is also a little cleanup needed where the code came out of the longer file. After the first line, there is a } that is no longer useful.
    Instead of

    $content .=

    you will want

    echo

    to output the content immediately instead of accumulating it.

    Alternatively, you could leave the $content .= as is, and add a new line at the end:

    <?php echo $content; ?>

  4. #24
    Join Date
    Mar 2009
    Location
    Cornelius, NC
    Posts
    334
    Plugin Contributions
    0

    Default Re: disable subcategory title/ h1

    so i need to tag each statement with <?php ?>
    or just one at the beginning and one at the end?

    im trying this now: (which made my page disappear! argh. i just cant learn this stuff fast enough, though ive absorbed so much in the last week and a half!)

    Code:
    <?php echo '<div class="cartinfoheader" />'; ?>
    
    <?php $free_ship_on = MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING;?>
    
    <?phpif ($free_ship_on == 'false') { ?>
     <?php $free_limit = MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER; ?>
      <?php if ($_SESSION['cart']->count_contents() > 0) { ?>
         <?php $_SESSION['cart']->get_products(); ?>
         <?php $basket_total = $_SESSION['cart']->show_total(); ?>
       <?php  if ($basket_total < $free_limit) { ?>
       <?php  $diff_to_free = ($free_limit - $basket_total); ?>
          <?php  $content .= 'Add '. currencies->format($diff_to_free) .' to your order to qualify for<br />Free Shipping!'; ?>
       <?php  } else { 
            $content .='Your order qualifies for<br />Free Shipping!'; 
         } ?>
     <?php } else { 
            $content .= 'Free Shipping for orders of<br />' . $currencies->format($free_limit) . ' or more.'; 
      }?>
      }
    	<?php $content .= '</div>'; ?>
    <?php $content .= '<div class="cartSidebox"> ?>
    <?php <a href="' . zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . zen_image_button(BUTTON_IMAGE_CHECKOUT, BUTTON_CHECKOUT_ALT) . '</a></div>';?>

  5. #25
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    6,196
    Plugin Contributions
    0

    Default Re: disable subcategory title/ h1

    Gjh42 and Cu,
    What was the big fix for this neat little task in the header for the shopping cart add on

  6. #26
    Join Date
    Mar 2009
    Location
    Cornelius, NC
    Posts
    334
    Plugin Contributions
    0

    Default Re: disable subcategory title/ h1

    ok, i have tried adding the <?php and ?> to several spots... what i THINK are the logical places, but it really is just hit and miss for me, due to my lack of knowledge of php... (i cant cram the info in any faster!!!)

    when you get a chance to look at this again, let me know.

    here is my header file as it currently stands:
    Code:
    <?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="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-cartcount display-->
    <div id="cartCount">
    In My Cart:
    <?php
    if ($_SESSION['cart']->count_contents() == '1') {
      echo $_SESSION['cart']->count_contents() . " item";
    } else {
      echo $_SESSION['cart']->count_contents() . " items";
    }
    ?>
    </div>
    <!--eof-cartcount 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>
        <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>
    <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-->
    <div id="topbar">
    <ul id="topMenuStyle">
    <li><a id="item1" href='http://customk9design.com/catalogzen/index.php?main_page=page&id=2'><span class="alt">About Us</span></a></li>
    <li><a id="item2" href='http://customk9design.com/catalogzen/index.php?main_page=page&id=3'><span class="alt">Lifetime Guarantee</span></a></li>
    <li><a id="item3" href='http://customk9design.com/catalogzen/index.php?main_page=page&id=5'><span class="alt">Eco Friendly</span></a></li>
    <li><a id="item4" href='http://customk9design.com/catalogzen/index.php?main_page=contact_us'><span class="alt">Contact Us</span></a></li>
    <li><a id="item7" href='http://customk9design.com/catalogzen/index.php?main_page=page&id=9'><span class="alt">Paw Pages</span></a></li>
    <li><a id="item5" href='http://customk9design.com/catalogzen/index.php?main_page=advanced_search&search_in_description=1&keyword=Enter%20search%20keywords%20here'><span class="alt">Search</span></a></li>
    <li><a id="item6" href='http://customk9design.com/catalogzen/index.php?main_page=shopping_cart'><span class="alt">Shopping Cart</span></a></li>
    </ul>
    </div>
    <?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 } ?>
    and here is the complete "tpl_shopping_cart" i would like to see under the existing cart information in the header (with the differences from the template marked in red):

    Code:
    <?php
    /**
     * Side Box Template
     *
     * @package templateSystem
     * @copyright Copyright 2003-2005 Zen Cartt 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_shopping_cart.php 4821 2006-10-23 10:54:15Z drbyte $
     * @installation instructions file provided by Judy Gunderson at http://zencart-ecommerce-website-design.com
     */
      $content ="";
    
      $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">';
      if ($_SESSION['cart']->count_contents() > 0) {
      $content .= '<div id="cartBoxListWrapper">' . "\n" . '<ul>' . "\n";
        $products = $_SESSION['cart']->get_products();
        for ($i=0, $n=sizeof($products); $i<$n; $i++) {
          $content .= '<li>';
    
          if (($_SESSION['new_products_id_in_cart']) && ($_SESSION['new_products_id_in_cart'] == $products[$i]['id'])) {
            $content .= '<span class="cartNewItem">';
          } else {
            $content .= '<span class="cartOldItem">';
          }
    
          $content .= $products[$i]['quantity'] . BOX_SHOPPING_CART_DIVIDER . '</span><a href="' . zen_href_link(zen_get_info_page($products[$i]['id']), 'products_id=' . $products[$i]['id']) . '">';
    
          if (($_SESSION['new_products_id_in_cart']) && ($_SESSION['new_products_id_in_cart'] == $products[$i]['id'])) {
            $content .= '<span class="cartNewItem">';
          } else {
            $content .= '<span class="cartOldItem">';
          }
    
          $content .= $products[$i]['name'] . '</span></a></li>' . "\n";
    
          if (($_SESSION['new_products_id_in_cart']) && ($_SESSION['new_products_id_in_cart'] == $products[$i]['id'])) {
            $_SESSION['new_products_id_in_cart'] = '';
          }
        }
        $content .= '</ul>' . "\n" . '</div>';
      } else {
        $content .= '<div id="cartBoxEmpty">' . BOX_SHOPPING_CART_EMPTY . '</div>';
      }
    
      if ($_SESSION['cart']->count_contents() > 0) {
        $content .= '<hr />';
        $content .= '<div class="cartBoxTotal">' . $currencies->format($_SESSION['cart']->show_total()) . '</div>';
    	
       $content .= '<div class="cartSidebox" />';
    	
      }
    
    $free_ship_on = MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING;
    
    if ($free_ship_on == 'false') {
      $free_limit = MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER;
      if ($_SESSION['cart']->count_contents() > 0) { 
         $_SESSION['cart']->get_products(); 
         $basket_total = $_SESSION['cart']->show_total(); 
         if ($basket_total < $free_limit) { 
            $diff_to_free = ($free_limit - $basket_total); 
            $content .= 'Add '. $currencies->format($diff_to_free) .' to your order to qualify for<br />Free Shipping!'; 
         } else { 
            $content .='Your order qualifies for<br />Free Shipping!'; 
         } 
      } else { 
            $content .= 'Free Shipping for orders of<br />' . $currencies->format($free_limit) . ' or more.'; 
      }
      }
    	$content .= '</div>';  
    
      if (isset($_SESSION['customer_id'])) {
        $gv_query = "select amount
                     from " . TABLE_COUPON_GV_CUSTOMER . "
                     where customer_id = '" . $_SESSION['customer_id'] . "'";
       $gv_result = $db->Execute($gv_query);
    
        if ($gv_result->RecordCount() && $gv_result->fields['amount'] > 0 ) {
          $content .= '<div id="cartBoxGVButton"><a href="' . zen_href_link(FILENAME_GV_SEND, '', 'SSL') . '">' . zen_image_button(BUTTON_IMAGE_SEND_A_GIFT_CERT , BUTTON_SEND_A_GIFT_CERT_ALT) . '</a></div>';
          $content .= '<div id="cartBoxVoucherBalance">' . VOUCHER_BALANCE . $currencies->format($gv_result->fields['amount']) . '</div>';
        }
      }
      $content .= '<br class="clearBoth" />';
      $content .= '<div class="cartSidebox"><a href="' . zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . zen_image_button(BUTTON_IMAGE_CHECKOUT, BUTTON_CHECKOUT_ALT) . '</a></div>';
      $content .= '</div>';
    ?>
    What i would like to have is this (on the right side of the header, over the shopping cart portion of the header image)

    In My Cart: xx Items
    Total: $xx.xx
    Add $xx.xx more to your
    cart to qualify for
    FREE SHIPPING!
    [GO TO CHECKOUT]
    Last edited by customk1; 5 Apr 2009 at 01:19 AM. Reason: added checkout button to example at the bottom

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

    Default Re: disable subcategory title/ h1

    PHP Code:
    <!--eof-branding display-->

    <!--bof-cart head info display-->
    <div id="cartHead">
    <!--bof-cartcount display-->
    <div id="cartCount">
    In My Cart:
    <?php
    if ($_SESSION['cart']->count_contents() == '1') {
      echo 
    $_SESSION['cart']->count_contents() . " item";
    } else {
      echo 
    $_SESSION['cart']->count_contents() . " items";
    }
    ?>
    </div>
    <!--eof-cartcount display-->

    <!--bof cartfreeship display-->
    <div id="cartFreeShip" />
    <?php 
    $free_ship_on 
    MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING;

    if (
    $free_ship_on == 'false') {
      
    $free_limit MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER;
      if (
    $_SESSION['cart']->count_contents() > 0) { 
         
    $_SESSION['cart']->get_products(); 
         
    $basket_total $_SESSION['cart']->show_total(); 
         if (
    $basket_total $free_limit) { 
            
    $diff_to_free = ($free_limit $basket_total); 
            echo 
    'Add '$currencies->format($diff_to_free) .' to your order to qualify for<br />Free Shipping!'
         } else { 
            echo 
    'Your order qualifies for<br />Free Shipping!'
         } 
      } else { 
            echo 
    'Free Shipping for orders of<br />' $currencies->format($free_limit) . ' or more.'
      }
      } 
    ?>
    </div>
    <!--eof cartfreeship display-->

    <?php echo '<div id="cartCheckout"><a href="' zen_href_link(FILENAME_CHECKOUT_SHIPPING'''SSL') . '">' zen_image_button(BUTTON_IMAGE_CHECKOUTBUTTON_CHECKOUT_ALT) . '</a></div>'?>
    </div>
    <!--eof-cart head info display-->

    <!--bof-navigation display-->
    Change the #cartCount in your stylesheet to #cartHead .

  8. #28
    Join Date
    Mar 2009
    Location
    Cornelius, NC
    Posts
    334
    Plugin Contributions
    0

    Default Re: disable subcategory title/ h1

    im so happy i could cry....




    wow. thank you so much! this is exactly what i wanted... (i told santa i wanted a pony for christmas, but i REALLY wanted this!!)

    ok, just to finalize, i have 3 different divs now i can control:
    1. carthead
    2. cartcount
    3. cartfreeship

    if i want to move the whole thing around, or apply css to the whole thing, i use carthead, and if i want to change colors/font/size etc for anything individually, i can separately use cartcount and cartfreeship, correct?

    i really like how you separated it all out.

    glen, seriously, thank you very very much.

  9. #29
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    6,196
    Plugin Contributions
    0

    Default Re: disable subcategory title/ h1

    Cu,
    I have noticed this on the Shopping Cart Page

    You may want to add some instructions for using the shopping cart here. (defined in includes/languages/english/shopping_cart.php)

    Boy, Thanks to Gjh42, What a nice looking header...

  10. #30
    Join Date
    Mar 2009
    Location
    Cornelius, NC
    Posts
    334
    Plugin Contributions
    0

    Default Re: disable subcategory title/ h1

    it is great! i am very happy with it.

    thanks for reminding me about the "shopping cart instructions" just havent gotten to fixing that page yet.

    also, i forgot i didnt put my search bar back in yet, so i think im going to take that fake "home" button back out, and just turn on that top nav bar that has home/login/search...

    thanks again to gj for an awesome job! i know that this will help other folks too...

 

 
Page 3 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. v151 Disable EZ pages title & heading ?
    By mrcastle in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 7 Aug 2014, 12:49 PM
  2. v150 Want to disable categories link, with only subcategory links opening product pages
    By wdkstudio in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 1 May 2012, 03:14 PM
  3. Disable Title in breadcrumb?
    By maxell6230 in forum General Questions
    Replies: 2
    Last Post: 16 Sep 2010, 02:37 PM
  4. Disable subcategory listing image.
    By jackson5759 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 13 May 2010, 05:39 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