Forums / Templates, Stylesheets, Page Layout / Removing underscores from header in 12leaves template

Removing underscores from header in 12leaves template

Views: 1,485

Results 1 to 7 of 7
27 Aug 2012, 1:03 AM
#1
monchompa avatar

monchompa

New Zenner

Join Date:
Aug 2012
Posts:
9
Plugin Contributions:
0

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');
27 Aug 2012, 1:36 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Removing underscores from header in 12leaves template

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.

27 Aug 2012, 2:18 AM
#3
monchompa avatar

monchompa

New Zenner

Join Date:
Aug 2012
Posts:
9
Plugin Contributions:
0

Re: Removing underscores from header in 12leaves template

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

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

thanks!

27 Aug 2012, 2:32 AM
#4
monchompa avatar

monchompa

New Zenner

Join Date:
Aug 2012
Posts:
9
Plugin Contributions:
0

Re: Removing underscores from header in 12leaves template

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', '  Currency:');
define('HEADER_LANGUAGES', 'Language:');

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

27 Aug 2012, 3:00 AM
#5
monchompa avatar

monchompa

New Zenner

Join Date:
Aug 2012
Posts:
9
Plugin Contributions:
0

Re: Removing underscores from header in 12leaves template

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');
27 Aug 2012, 5:35 AM
#6
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,780
Plugin Contributions:
2

Re: Removing underscores from header in 12leaves template

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

27 Aug 2012, 9:40 AM
#7
discoverytdi avatar

discoverytdi

Totally Zenned

Join Date:
May 2011
Location:
Sunny Rossendale (not)
Posts:
562
Plugin Contributions:
0

Re: Removing underscores from header in 12leaves template

bit off topic but your images are huge 4,608px x 3,072px :ohmy: 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 )