Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / new template -- questions

new template -- questions

Locked

Views: 1,870

Results 1 to 20 of 24
This thread is locked. New replies are disabled.
2 Aug 2009, 7:52 PM
#1
speedbird3654 avatar

speedbird3654

New Zenner

Join Date:
Jul 2008
Posts:
92
Plugin Contributions:
0

new template -- questions

After a hack on my site i am designing a new template etc.

Im stuck on a couple of general modifications.

Take a look :- http://occasion-creative.com/ocstore/

Where do i remove the following bits

in the banner :- HEADER_SALES_TEXT
in the banner :- the blue ...........
middle section :- TEXT_GREETING_GUEST

Hope someone could shed some light or point me to some threads as i have searched through many of my files and posts here and no further forward

Also is there a way of bringing all my products from one database and put them on another

Cheers

2 Aug 2009, 7:57 PM
#2
jprough avatar

jprough

New Zenner

Join Date:
Feb 2009
Location:
Mogadore, Ohio
Posts:
31
Plugin Contributions:
0

Re: new template -- questions

Search for those strings in admin>Developers Tool Kit

Good Luck

2 Aug 2009, 8:03 PM
#3
speedbird3654 avatar

speedbird3654

New Zenner

Join Date:
Jul 2008
Posts:
92
Plugin Contributions:
0

Re: new template -- questions

i have searched for them this is what i get

Searching 73 files ... for: HEADER_SALES_TEXT

Match Lines found: 0
Warning Error: No matching Configuration Keys were found ... HEADER_SALES_TEXT

2 Aug 2009, 8:11 PM
#4
speedbird3654 avatar

speedbird3654

New Zenner

Join Date:
Jul 2008
Posts:
92
Plugin Contributions:
0

Re: new template -- questions

i searched TEXT_GREETING_GUEST and got the following

// Showcase vs Store
if (STORE_STATUS == '0') {
define('', '</a>');
} else {
define ('TEXT_GREETING_GUEST', 'please enjoy our online showcase.');

If i edit that area in the code the site stops working and just shows a white page

4 Aug 2009, 6:02 PM
#5
speedbird3654 avatar

speedbird3654

New Zenner

Join Date:
Jul 2008
Posts:
92
Plugin Contributions:
0

Re: new template -- questions

anyone got a clue

4 Aug 2009, 7:53 PM
#7
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: new template -- questions

The blue ..... is apparently the alt text to a missing image. I'm seeing a red X before it.

The correct way to remove the literal is to remove what's between the single quotes, but leave the quotes in place.

// Showcase vs Store
if (STORE_STATUS == '0') {
define('', '</a>');
} else {
define ('TEXT_GREETING_GUEST', 'please enjoy our online showcase.');

to

// Showcase vs Store
if (STORE_STATUS == '0') {
define('', '</a>');
} else {
define ('TEXT_GREETING_GUEST', '');

I colored the single quotes to make it clearer.

HEADER_SALES_TEXT is being picked up as the tagline. It should be defined in includes/languages/english/sunflower_orange/header.php

It should look something like

define('HEADER_SALES_TEXT', '<h1>Sales Message Goes Here</h1>');

If it's not in there, that's the problem. Zen Cart is looking for it and not finding it.

7 Aug 2009, 8:07 PM
#8
speedbird3654 avatar

speedbird3654

New Zenner

Join Date:
Jul 2008
Posts:
92
Plugin Contributions:
0

Re: new template -- questions

i have found this it it helps

<?php /** * @package languageDefines * @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: header.php 2848 2006-01-14 09:47:08Z wilt $ */ // header text in includes/header.php define('HEADER_TITLE_CREATE_ACCOUNT', 'Create Account'); define('HEADER_TITLE_MY_ACCOUNT', 'My Account'); define('HEADER_TITLE_CART_CONTENTS', 'Shopping Cart'); define('HEADER_TITLE_CHECKOUT', 'Checkout'); define('HEADER_TITLE_TOP', 'Top'); define('HEADER_TITLE_CATALOG', 'Home'); define('HEADER_TITLE_LOGOFF', 'Log Out'); define('HEADER_TITLE_LOGIN', 'Log In'); // added defines for header alt and text define('HEADER_ALT_TEXT', 'Powered by Zen Cart :: The Art of E-Commerce [home link]'); define('', '<h1>Sales Message Goes Here</h1>'); define('HEADER_LOGO_WIDTH', '200px'); define('HEADER_LOGO_HEIGHT', '70px'); define('HEADER_LOGO_IMAGE', 'logo.gif'); // header Search Button/Box Search Button define('HEADER_SEARCH_BUTTON','Search'); define('HEADER_SEARCH_DEFAULT_TEXT','Enter search keywords here'); ?>

Can anyone give me a set of instructions to remove the points i made as i am ready to release the site but need them fixed first.

Thanks so much

7 Aug 2009, 8:17 PM
#9
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: new template -- questions

Hi,

Start by changing this:

define('', '<h1>Sales Message Goes Here</h1>');

to:

define('HEADER_SALES_TEXT', '');
7 Aug 2009, 8:21 PM
#10
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: new template -- questions

You know, I looked right at this and didn't see it. :wacko:

// Showcase vs Store
if (STORE_STATUS == '0') {
define('', '</a>');
} else {
define ('TEXT_GREETING_GUEST', 'please enjoy our online showcase.');

Your problem is the line in red. You've edited that incorrectly. The original reads:

// Showcase vs Store
if (STORE_STATUS == '0') {
  define('TEXT_GREETING_GUEST', 'Welcome <span class="greetUser">Guest!</span> Would you like to <a href="%s">log yourself in</a>?');
} else {
  define('TEXT_GREETING_GUEST', 'Welcome, please enjoy our online showcase.');
}

If you want to remove the "Welcome Guest" part, it should look like this (color added for clarity).

// Showcase vs Store
if (STORE_STATUS == '0') {
  define('TEXT_GREETING_GUEST', '');
} else {
define ('TEXT_GREETING_GUEST', 'please enjoy our online showcase.');
7 Aug 2009, 8:31 PM
#11
speedbird3654 avatar

speedbird3654

New Zenner

Join Date:
Jul 2008
Posts:
92
Plugin Contributions:
0

Re: new template -- questions

<?php /** * @package languageDefines * @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: index.php 6550 2007-07-05 03:54:54Z drbyte $ */ define('TEXT_MAIN','This is the main define statement for the page for english when no template defined file exists. It is located in: <strong>/includes/languages/english/index.php</strong>'); // Showcase vs Store if (STORE_STATUS == '0') { define('', '</a>'); } else { define ('TEXT_GREETING_GUEST', 'please enjoy our online showcase.'); } define('TEXT_GREETING_PERSONAL', 'Hello <span class="greetUser">%s</span>! Would you like to see our <a href="%s">newest additions</a>?'); define('TEXT_INFORMATION', 'Define your main Index page copy here.'); //moved to english //define('TABLE_HEADING_FEATURED_PRODUCTS','Featured Products'); //define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s'); //define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products'); //define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected'); if ( ($category_depth == 'products') || (zen_check_url_get_terms()) ) { // This section deals with product-listing page contents define('HEADING_TITLE', 'Available Products'); define('TABLE_HEADING_IMAGE', 'Product Image'); define('TABLE_HEADING_MODEL', 'Model'); define('TABLE_HEADING_PRODUCTS', 'Product Name'); define('TABLE_HEADING_MANUFACTURER', 'Manufacturer'); define('TABLE_HEADING_QUANTITY', 'Quantity'); define('TABLE_HEADING_PRICE', 'Price'); define('TABLE_HEADING_WEIGHT', 'Weight'); define('TABLE_HEADING_BUY_NOW', 'Buy Now'); define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.'); define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.'); define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: '); define('TEXT_SHOW', 'Filter Results by:'); define('TEXT_BUY', 'Buy 1 \''); define('TEXT_NOW', '\' now'); define('TEXT_ALL_CATEGORIES', 'All Categories'); define('TEXT_ALL_MANUFACTURERS', 'All Manufacturers'); } elseif ($category_depth == 'top') { // This section deals with the "home" page at the top level with no options/products selected /*Replace this text with the headline you would like for your shop. For example: 'Welcome to My SHOP!'*/ define('HEADING_TITLE', ''); } elseif ($category_depth == 'nested') { // This section deals with displaying a subcategory /*Replace this line with the headline you would like for your shop. For example: 'Welcome to My SHOP!'*/ define('HEADING_TITLE', ' '); } ?>

Also found this. index.php

7 Aug 2009, 8:33 PM
#12
speedbird3654 avatar

speedbird3654

New Zenner

Join Date:
Jul 2008
Posts:
92
Plugin Contributions:
0

Re: new template -- questions

i am getting confused here to what file everyone is on about lolol

HEELLLlllllllpppppppppppppppp lol

7 Aug 2009, 8:34 PM
#13
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: new template -- questions

Why are you posting this? Did you read my reply? The line I've highlighted in red is your problem.

// Showcase vs Store
if (STORE_STATUS == '0') {
define('', '</a>');
} else {
define ('TEXT_GREETING_GUEST', 'please enjoy our online showcase.');
}

Change it as per my earlier post.

7 Aug 2009, 8:40 PM
#14
speedbird3654 avatar

speedbird3654

New Zenner

Join Date:
Jul 2008
Posts:
92
Plugin Contributions:
0

Re: new template -- questions

just confirm the root and the file name to where that is to make sure im doing the right one please

7 Aug 2009, 8:53 PM
#15
speedbird3654 avatar

speedbird3654

New Zenner

Join Date:
Jul 2008
Posts:
92
Plugin Contributions:
0

Re: new template -- questions

right done lol sorry guys

I have replaced it with this

// Showcase vs Store
if (STORE_STATUS == '0') {
define('TEXT_GREETING_GUEST', '');
} else {
define ('TEXT_GREETING_GUEST', 'please enjoy our online showcase.');

i now need to get rid of :- HEADER_SALES_TEXT and the blue .........

7 Aug 2009, 9:58 PM
#16
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: new template -- questions

SpeedBird3654:

i now need to get rid of :- HEADER_SALES_TEXT

Steven300:

Hi,

Start by changing this:

define('', '<h1>Sales Message Goes Here</h1>');

> 
> to:
> 
> ```php
define('HEADER_SALES_TEXT', '');

SpeedBird3654:

i am getting confused here to what file everyone is on about lolol

includes/languages/english/sunflower_orange/header.php

8 Aug 2009, 6:44 PM
#17
speedbird3654 avatar

speedbird3654

New Zenner

Join Date:
Jul 2008
Posts:
92
Plugin Contributions:
0

Re: new template -- questions

Steven300:

includes/languages/english/sunflower_orange/header.php

This is why i am getting confused..

I go through that path and can navigate right up until ENGLISH and then sunflower_orange does not show...

There is a header.php on the ENGLISH section but contains nothing like what i have to edit

8 Aug 2009, 8:29 PM
#18
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: new template -- questions

I was just referring to the code you posted in post #8 of this thread.

You posted this line:

define('', '<h1>Sales Message Goes Here</h1>');

It should be in either:
includes/languages/english/header.php
includes/languages/english/sunflower_orange/header.php

.. depending on whether you used the override system.

So if you search in includes/languages/english/header.php for "Sales Message" does nothing come up?

10 Aug 2009, 8:36 PM
#19
speedbird3654 avatar

speedbird3654

New Zenner

Join Date:
Jul 2008
Posts:
92
Plugin Contributions:
0

Re: new template -- questions

this is whats in the header.php file that you relate to

<?php /** * @package languageDefines * @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: header.php 2848 2006-01-14 09:47:08Z wilt $ */ // header text in includes/header.php define('HEADER_TITLE_CREATE_ACCOUNT', 'Create Account'); define('HEADER_TITLE_MY_ACCOUNT', 'My Account'); define('HEADER_TITLE_CART_CONTENTS', 'Shopping Cart'); define('HEADER_TITLE_CHECKOUT', 'Checkout'); define('HEADER_TITLE_TOP', 'Top'); define('HEADER_TITLE_CATALOG', 'Home'); define('HEADER_TITLE_LOGOFF', 'Log Out'); define('HEADER_TITLE_LOGIN', 'Log In'); // added defines for header alt and text define('HEADER_ALT_TEXT', 'Powered by Zen Cart :: The Art of E-Commerce [home link]'); define('', '<h1>Sales Message Goes Here</h1>'); define('HEADER_LOGO_WIDTH', '200px'); define('HEADER_LOGO_HEIGHT', '70px'); define('HEADER_LOGO_IMAGE', 'logo.gif'); // header Search Button/Box Search Button define('HEADER_SEARCH_BUTTON','Search'); define('HEADER_SEARCH_DEFAULT_TEXT','Enter search keywords here'); ?>

CHANGED it to

<?php /** * @package languageDefines * @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: header.php 2848 2006-01-14 09:47:08Z wilt $ */ // header text in includes/header.php define('HEADER_TITLE_CREATE_ACCOUNT', 'Create Account'); define('HEADER_TITLE_MY_ACCOUNT', 'My Account'); define('HEADER_TITLE_CART_CONTENTS', 'Shopping Cart'); define('HEADER_TITLE_CHECKOUT', 'Checkout'); define('HEADER_TITLE_TOP', 'Top'); define('HEADER_TITLE_CATALOG', 'Home'); define('HEADER_TITLE_LOGOFF', 'Log Out'); define('HEADER_TITLE_LOGIN', 'Log In'); // added defines for header alt and text define('HEADER_ALT_TEXT', 'Powered by Zen Cart :: The Art of E-Commerce [home link]'); define('HEADER_SALES_TEXT', ''); define('HEADER_LOGO_WIDTH', '200px'); define('HEADER_LOGO_HEIGHT', '70px'); define('HEADER_LOGO_IMAGE', 'logo.gif'); // header Search Button/Box Search Button define('HEADER_SEARCH_BUTTON','Search'); define('HEADER_SEARCH_DEFAULT_TEXT','Enter search keywords here'); ?>

and the text is still there im affraid

10 Aug 2009, 8:43 PM
#20
speedbird3654 avatar

speedbird3654

New Zenner

Join Date:
Jul 2008
Posts:
92
Plugin Contributions:
0

Re: new template -- questions

if it helps to work out how to get rid of it i have found this tpl header.php file containing

<?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 4066 2006-08-06 05:50:06Z ajeh $ */ ?> <?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-navigation display--> <div class="navMainWrapper"> <b class="top"><b class="b1"></b><b class="b2"></b><b class="b3"></b><b class="b4"></b></b> <div class="boxcontent"> <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> <div class="navMainSearch forward"><?php require(DIR_WS_MODULES . 'sideboxes/search_header.php'); ?></div> <br class="clearBoth" /> <br class="clearBoth" /> <!-- need two break here to cover the space in internet explorer --> </div> </div> <!--eof-navigation display--> <!--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--> <!--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 class="navMainWrapper"> <div class="boxcontent"> <?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 } ?> </div>

<b class="bottom"><b class="b4b"></b><b class="b3b"></b><b class="b2b"></b><b class="b1b"></b></b>

</div> <!--eof-header ezpage links--> </div> <?php } ?>