Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2012
    Posts
    9
    Plugin Contributions
    0

    Default Removing underscores from header in 12leaves template

    Hey guys, im a noob to zencart and php, but have tried for hours... I'm trying to remove the underscores from the header for "shopping cart" at the top of the page. I had this issue with the top navigation as well but was able to fix that buy using this code below. but I not able to do this for the shopping cart, you can see near the top it says HEADER_SHOPPING_CART_EMPTY


    I uploaded the black pure template by using FTP, the files seem to be there, the templeate and the language folder when i go to includes>templates>black pure>languages


    any help would be much appreciated!
    URL: http://recordsent.com



    <?PHP
    define('MONTHLY_SPECIALS_PAGE', 'MONTHLY SPECIALS PAGE');

  2. #2
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Removing underscores from header

    There is no define() in Zen Cart for HEADER_SHOPPING_CART_EMPTY, so it must be something that was added by your custom template or another addon you're using.

    The solution to your problem is to ensure that the define('HEADER_SHOPPING_CART_EMPTY', 'whatever it should say here'); statement is in the proper file. It would likely be something stuffed into the /includes/languages/english/extra_definitions/ folder (the correct place for it, or under another subfolder of your template name), or maybe (incorrectly) in the /includes/languages/english.php file.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Aug 2012
    Posts
    9
    Plugin Contributions
    0

    Default Re: Removing underscores from header

    yes I have found the folder, it is in another folder, compared to the top navigation menu, here is the text from the entire file. the file is titled tpl_HEADER_SHOPPING_CART_EMPTY.php

    <?php
    /**
    * Template designed by 12leaves.com
    * 12leaves.com - Free ecommerce templates and design services

    * @copyright Copyright 2008-2009 12leaves.com
    * @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
    */










    $content ="";
    $product_amount = 0;

    if ($_SESSION['cart']->count_contents() > 0) {
    $products = $_SESSION['cart']->get_products();

    for ($i=0, $n=sizeof($products); $i<$n; $i++) {
    $product_amount = $products[$i]['quantity'] + $product_amount;
    }

    $content .= '<a href="' . zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL') . '"><img class="cart-icon full float-left" src="'. $template->get_template_dir('', DIR_WS_TEMPLATE, $current_page_base,'images') . '/spacer.gif" alt="" />' . HEADER_PRODUCT_AMOUNT . '<span>'. $product_amount . '</span></a>, ';
    } else {
    $content .= '<div id="cartBoxEmpty"><a href="' . zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL') . '"><img class="cart-icon empty float-left" src="'. $template->get_template_dir('', DIR_WS_TEMPLATE, $current_page_base,'images') . '/spacer.gif" alt="" /></a>' . HEADER_SHOPPING_CART_EMPTY . '</div>';
    }

    if ($_SESSION['cart']->count_contents() > 0) {
    $content .= HEADER_CART_SUBTOTAL .'<span>' . $currencies->format($_SESSION['cart']->show_total()) . '</span>';
    }

    ?>


    <?PHP
    define('HEADER_SHOPPING_CART_EMPTY', 'SHOPPING CART');



    ?>



    But I also took your advised nd looked in the languages folder, and found another reference to it

    // shopping_cart box text in sideboxes/shopping_cart.php
    define('BOX_HEADING_SHOPPING_CART', 'Shopping Cart');
    define('BOX_SHOPPING_CART_EMPTY', 'Your cart is empty.');
    define('BOX_SHOPPING_CART_DIVIDER', 'ea.-&nbsp;');


    any ideas on which file I need to edit? and what php script would i enter to fix the issue?

    thanks!

  4. #4
    Join Date
    Aug 2012
    Posts
    9
    Plugin Contributions
    0

    Default Re: Removing underscores from header

    Also I found this in the Header.php file

    // header Search Button/Box Search Button
    define('HEADER_SEARCH_BUTTON','Search');
    define('HEADER_SEARCH_DEFAULT_TEXT', 'Search for...');
    define('HEADER_ADVANCED_SEARCH', 'Advanced Search');
    define('HEADER_SHOPPING_CART_EMPTY', 'Your cart is empty');
    define('HEADER_PRODUCT_AMOUNT', 'item(s) - ');
    define('HEADER_CART_SUBTOTAL', 'subtotal: ');
    define('HEADER_CURRENCY', '&nbsp;&nbsp;Currency:');
    define('HEADER_LANGUAGES', 'Language:');

    even though the define tag for HEADER_SHOPPING_CART_EMPTY is there it doesnt work..

  5. #5
    Join Date
    Aug 2012
    Posts
    9
    Plugin Contributions
    0

    Default Re: Removing underscores from header

    Got it.. I just entered the same define script at the top of the page instead of the bottom....

    <?PHP
    define('HEADER_SHOPPING_CART_EMPTY', 'SHOPPING CART');

  6. #6
    Join Date
    Dec 2010
    Location
    UK
    Posts
    1,771
    Plugin Contributions
    3

    Default Re: Removing underscores from header

    Hi. Just had a peep at your site, you appear to have 'HEADER' i I your top menu bar (between login and register').

  7. #7
    Join Date
    May 2011
    Location
    Sunny Rossendale (not)
    Posts
    556
    Plugin Contributions
    2

    Default Re: Removing underscores from header

    bit off topic but your images are huge 4,608px x 3,072px thats why it takes so long for the pages to load try 400px x 300px
    What ever your doing remember to KISS ( Keep It Simple Stupid )

 

 

Similar Threads

  1. v150 Add a View Cart link to my shopping cart header, in 12leaves template?
    By Serg in forum All Other Contributions/Addons
    Replies: 10
    Last Post: 22 Aug 2012, 02:49 AM
  2. Removing categories from header w/o turning off header.
    By cameo in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 16 Nov 2011, 06:38 PM
  3. Removing the pipe separator from the HOME LOG IN header in my TM template
    By headache in forum Templates, Stylesheets, Page Layout
    Replies: 11
    Last Post: 24 Sep 2011, 10:26 PM
  4. code problems w/ 12leaves Pure Green template
    By finlander in forum Addon Templates
    Replies: 0
    Last Post: 30 Dec 2010, 06:19 AM

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