Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Customize Center Page Layout

Customize Center Page Layout

Locked

Views: 12,541

Results 21 to 40 of 51
This thread is locked. New replies are disabled.
25 Feb 2007, 5:28 PM
#21
wtashby avatar

wtashby

Totally Zenned

Join Date:
Feb 2006
Posts:
594
Plugin Contributions:
0

Customize Center Page Layout

clydejones:

Just to double check:

#centercolumnFooter {
margin: 0;
padding: 0;
}

Make sure this is in both of your stylesheets.
includes/templates/trublu/css/stylesheet.css and stylesheet_new.css

  1. in includes/languages/english/extra_definitions/trublu
    create a new file centercolumn_footer_defines.php

define ('CENTERCOLUMN_FOOTER_TEXT','You can place any text you want here');

  1. open includes/templates/trublu/templates/tpl_index_default.php

scroll to the bottom of the file and just above the last </div>

insert the following statement:

<div id="centercolumnFooter"><?php echo CENTERCOLUMN_FOOTER_TEXT; ?> </div>

I've done all that. Checked, and rechecked to make sure all were where they should be. Also, I asked if the div statement in centercolumn_footer_defines.php should be inside <?php ?>

If I don't wrap the statement in php, then the entire statement (just the statement) shows up at the very top of the page. By wrapping it in php, it doesn't show up at the very top of the page, but, it doesn't show up at all.

I Think, Therefore I Zen. I Zen, Therefore, I AM!
Personalized Flowers!
Flowertown Speaking Roses
using version 1.5.7-06232020

25 Feb 2007, 5:36 PM
#22
clydejones avatar

clydejones

Deceased

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

Re: Customize Center Page Layout

No it is just another defines statement like the hundreds of others in the language files. So you there is no need to surround it as you describe.

Take a look at the bottom of the page HERE to see it in action.

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

25 Feb 2007, 5:40 PM
#23
wtashby avatar

wtashby

Totally Zenned

Join Date:
Feb 2006
Posts:
594
Plugin Contributions:
0

Re: Customize Center Page Layout

Ok, I removed the php from the file. Take a look at the site, and you'll see what I mean at the very top of the page.

I Think, Therefore I Zen. I Zen, Therefore, I AM!
Personalized Flowers!
Flowertown Speaking Roses
using version 1.5.7-06232020

25 Feb 2007, 5:54 PM
#24
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,845
Plugin Contributions:
0

Re: Customize Center Page Layout

could you post the contents of tpl_index_default.php

Mike
AEIIA - Zen Cart Certified & PCI Compliant Hosting
The Zen Cart Forum...Better than a monitor covered with post-it notes!

25 Feb 2007, 5:58 PM
#25
wtashby avatar

wtashby

Totally Zenned

Join Date:
Feb 2006
Posts:
594
Plugin Contributions:
0

Re: Customize Center Page Layout

Here are the contents of tpl_index_default.php

<?php /** * Page Template * * Main index page<br /> * Displays greetings, welcome text (define-page content), and various centerboxes depending on switch settings in Admin<br /> * Centerboxes are called as necessary * * @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_index_default.php 3464 2006-04-19 00:07:26Z ajeh $ */ ?> <div class="centerColumn" id="indexDefault"> <h1 id="indexDefaultHeading"><?php echo HEADING_TITLE; ?></h1> <?php if (SHOW_CUSTOMER_GREETING == 1) { ?> <h2 class="greeting"><?php echo zen_customer_greeting(); ?></h2> <?php } ?> <!-- deprecated - to use uncomment this section <?php if (TEXT_MAIN) { ?> <div id="" class="content"><?php echo TEXT_MAIN; ?></div> <?php } ?>--> <!-- deprecated - to use uncomment this section <?php if (TEXT_INFORMATION) { ?> <div id="" class="content"><?php echo TEXT_INFORMATION; ?></div> <?php } ?>--> <?php if (DEFINE_MAIN_PAGE_STATUS >= 1 and DEFINE_MAIN_PAGE_STATUS <= 2) { ?> <?php /** * get the Define Main Page Text */ ?> <div id="indexDefaultMainContent" class="content"><?php require($define_page); ?></div> <?php } ?> <?php $show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_MAIN); while (!$show_display_category->EOF) { ?> <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_FEATURED_PRODUCTS') { ?> <?php /** * display the Featured Products Center Box */ ?> <?php require($template->get_template_dir('tpl_modules_featured_products.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_featured_products.php'); ?> <?php } ?> <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_SPECIALS_PRODUCTS') { ?> <?php /** * display the Special Products Center Box */ ?> <?php require($template->get_template_dir('tpl_modules_specials_default.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_specials_default.php'); ?> <?php } ?> <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_NEW_PRODUCTS') { ?> <?php /** * display the New Products Center Box */ ?> <?php require($template->get_template_dir('tpl_modules_whats_new.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_whats_new.php'); ?> <?php } ?> <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_UPCOMING') { ?> <?php /** * display the Upcoming Products Center Box */ ?> <?php include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS)); ?><?php } ?> <?php $show_display_category->MoveNext(); } // !EOF ?> <div id="centercolumnFooter"><?php echo CENTERCOLUMN_FOOTER_TEXT; ?> </div> </div>

I Think, Therefore I Zen. I Zen, Therefore, I AM!
Personalized Flowers!
Flowertown Speaking Roses
using version 1.5.7-06232020

25 Feb 2007, 6:16 PM
#26
wtashby avatar

wtashby

Totally Zenned

Join Date:
Feb 2006
Posts:
594
Plugin Contributions:
0

Re: Customize Center Page Layout

clydejones:

No it is just another defines statement like the hundreds of others in the language files. So you there is no need to surround it as you describe.

Take a look at the bottom of the page HERE to see it in action.

Every single defines page in the language files that I've looked at has the defines inside of the php code. When I simply put define('CENTERCOLUMN_FOOTER_TEXT','This is the Text I want to add'); into a blank file, save it, then upload it, then I get define('CENTERCOLUMN_FOOTER_TEXT','This is the Text I want to add'); at the very top of every page.

When I do this:

<?php define('CENTERCOLUMN_FOOTER_TEXT','This is the Text I want to add'); ?>

I doesn't show up at the top of the pages. It doesn't show up at all.

I Think, Therefore I Zen. I Zen, Therefore, I AM!
Personalized Flowers!
Flowertown Speaking Roses
using version 1.5.7-06232020

25 Feb 2007, 6:19 PM
#27
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,845
Plugin Contributions:
0

Re: Customize Center Page Layout

What editor are you using? I found a couple of places in your file where the .php had an extra space in it like .p hp and .ph p. I don't know if it makes a difference but here is a cleaned version```

<?php /** * Page Template * * Main index page<br /> * Displays greetings, welcome text (define-page content), and various centerboxes depending on switch settings in Admin<br /> * Centerboxes are called as necessary * * @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_index_default.php 3464 2006-04-19 00:07:26Z ajeh $ */ ?> <div class="centerColumn" id="indexDefault"> <h1 id="indexDefaultHeading"><?php echo HEADING_TITLE; ?></h1> <?php if (SHOW_CUSTOMER_GREETING == 1) { ?> <h2 class="greeting"><?php echo zen_customer_greeting(); ?></h2> <?php } ?> <!-- deprecated - to use uncomment this section <?php if (TEXT_MAIN) { ?> <div id="" class="content"><?php echo TEXT_MAIN; ?></div> <?php } ?>--> <!-- deprecated - to use uncomment this section <?php if (TEXT_INFORMATION) { ?> <div id="" class="content"><?php echo TEXT_INFORMATION; ?></div> <?php } ?>--> <?php if (DEFINE_MAIN_PAGE_STATUS >= 1 and DEFINE_MAIN_PAGE_STATUS <= 2) { ?> <?php /** * get the Define Main Page Text */ ?> <div id="indexDefaultMainContent" class="content"><?php require($define_page); ?></div> <?php } ?> <?php $show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_MAIN); while (!$show_display_category->EOF) { ?> <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_FEATURED_PRODUCTS') { ?> <?php /** * display the Featured Products Center Box */ ?> <?php require($template->get_template_dir('tpl_modules_featured_products.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_featured_products.php'); ?> <?php } ?> <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_SPECIALS_PRODUCTS') { ?> <?php /** * display the Special Products Center Box */ ?> <?php require($template->get_template_dir('tpl_modules_specials_default.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_specials_default.php'); ?> <?php } ?> <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_NEW_PRODUCTS') { ?> <?php /** * display the New Products Center Box */ ?> <?php require($template->get_template_dir('tpl_modules_whats_new.php',DIR_ WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_whats_new.php'); ?> <?php } ?> <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_UPCOMING') { ?> <?php /** * display the Upcoming Products Center Box */ ?> <?php include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS)); ?><?php } ?> <?php $show_display_category->MoveNext(); } // !EOF ?> <div id="centercolumnFooter"><?php echo CENTERCOLUMN_FOOTER_TEXT; ?> </div> </div> ```

Mike
AEIIA - Zen Cart Certified & PCI Compliant Hosting
The Zen Cart Forum...Better than a monitor covered with post-it notes!

25 Feb 2007, 6:22 PM
#28
wtashby avatar

wtashby

Totally Zenned

Join Date:
Feb 2006
Posts:
594
Plugin Contributions:
0

Re: Customize Center Page Layout

I use notepad as my editor. Sorry, your changes had no effect.

I Think, Therefore I Zen. I Zen, Therefore, I AM!
Personalized Flowers!
Flowertown Speaking Roses
using version 1.5.7-06232020

25 Feb 2007, 6:22 PM
#29
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,845
Plugin Contributions:
0

Re: Customize Center Page Layout

you are correct the define files are structured

<?php copyright comments define define ?php>

Mike
AEIIA - Zen Cart Certified & PCI Compliant Hosting
The Zen Cart Forum...Better than a monitor covered with post-it notes!

25 Feb 2007, 6:26 PM
#30
wtashby avatar

wtashby

Totally Zenned

Join Date:
Feb 2006
Posts:
594
Plugin Contributions:
0

Re: Customize Center Page Layout

I've followed clydes instructions to the letter, both with and without the php in defines file, yet, I cannot get the text to appear in the center column or even register as a division when I list them in firefox.

I Think, Therefore I Zen. I Zen, Therefore, I AM!
Personalized Flowers!
Flowertown Speaking Roses
using version 1.5.7-06232020

25 Feb 2007, 6:26 PM
#31
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,845
Plugin Contributions:
0

Re: Customize Center Page Layout

ok lets have a look at centercolumn_footer_defines.php

Mike
AEIIA - Zen Cart Certified & PCI Compliant Hosting
The Zen Cart Forum...Better than a monitor covered with post-it notes!

25 Feb 2007, 6:28 PM
#32
wtashby avatar

wtashby

Totally Zenned

Join Date:
Feb 2006
Posts:
594
Plugin Contributions:
0

Re: Customize Center Page Layout

centercolumn_footer_defines.php> <?php

define('CENTERCOLUMN_FOOTER_TEXT','This is the Text I want to add');
?>

I Think, Therefore I Zen. I Zen, Therefore, I AM!
Personalized Flowers!
Flowertown Speaking Roses
using version 1.5.7-06232020

25 Feb 2007, 6:58 PM
#33
clydejones avatar

clydejones

Deceased

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

Re: Customize Center Page Layout

It's a php file so should appear something like this, yes.

<?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: whatever.php v1.3 $ */ // define('WHATEVER', 'whatever'); ?>

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

25 Feb 2007, 7:05 PM
#34
wtashby avatar

wtashby

Totally Zenned

Join Date:
Feb 2006
Posts:
594
Plugin Contributions:
0

Re: Customize Center Page Layout

clydejones:

It's a php file so should appear something like this, yes.

<?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: whatever.php v1.3 $ */ // define('WHATEVER', 'whatever'); ?>

That didn't make any difference. The text still won't show up.

I Think, Therefore I Zen. I Zen, Therefore, I AM!
Personalized Flowers!
Flowertown Speaking Roses
using version 1.5.7-06232020

25 Feb 2007, 7:06 PM
#35
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,845
Plugin Contributions:
0

Re: Customize Center Page Layout

I've looked and can't find an error on your part......hmmm

I tested on a development site I have following clydes procedure and it worked fine. I did test with your file and got a parse error.......odd winmerge says they are identical. I would take a clean version of tpl_index_default.php and apply the change again....see what happens. i gotta go will check back later

Mike
AEIIA - Zen Cart Certified & PCI Compliant Hosting
The Zen Cart Forum...Better than a monitor covered with post-it notes!

25 Feb 2007, 7:16 PM
#36
wtashby avatar

wtashby

Totally Zenned

Join Date:
Feb 2006
Posts:
594
Plugin Contributions:
0

Re: Customize Center Page Layout

barco57:

I've looked and can't find an error on your part......hmmm

I tested on a development site I have following clydes procedure and it worked fine. I did test with your file and got a parse error.......odd winmerge says they are identical. I would take a clean version of tpl_index_default.php and apply the change again....see what happens. i gotta go will check back later

Tried using a clean tpl_index_default.php (straight from the 1.3.7 zip file I have).

Nothing. No difference, no text at the bottom of the center column.:cry:

I Think, Therefore I Zen. I Zen, Therefore, I AM!
Personalized Flowers!
Flowertown Speaking Roses
using version 1.5.7-06232020

25 Feb 2007, 7:31 PM
#37
clydejones avatar

clydejones

Deceased

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

Re: Customize Center Page Layout

Try adding <div id="centercolumnFooter"><?php echo CENTERCOLUMN_FOOTER_TEXT; ?> </div>

to tpl_index_categories.php and see what happens.

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

25 Feb 2007, 7:37 PM
#38
wtashby avatar

wtashby

Totally Zenned

Join Date:
Feb 2006
Posts:
594
Plugin Contributions:
0

Re: Customize Center Page Layout

That seemed to do the trick. Thanks!:laugh:

Now, can I use the css to change the look of the font?

I Think, Therefore I Zen. I Zen, Therefore, I AM!
Personalized Flowers!
Flowertown Speaking Roses
using version 1.5.7-06232020

25 Feb 2007, 7:39 PM
#39
clydejones avatar

clydejones

Deceased

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

Re: Customize Center Page Layout

Glad it worked out.

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

26 Feb 2007, 4:14 PM
#40
jsteelethg avatar

jsteelethg

New Zenner

Join Date:
Feb 2007
Location:
St. Somewhere, Fl
Posts:
26
Plugin Contributions:
0

Re: Customize Center Page Layout

clydejones, I can see that you have an expertise in some of the layout issues I am having. I hope you take it as a compliment that you are asked for your advice.

Just when I thought I had the hang of layout I got stumped. I understand the re-positioning of items on a vertical basis, using bof, eof, but I can't for the life of me figure out the horizontal. I want to change the square type buybox on this page I am doing....http://www.gingerlandtropicals.com/ZenCart/index.php?main_page=product_info&cPath=1&products_id=1
and change it to a horizontal rectangle like this....
[Attachment no longer available]

Obviously it will entail making my attributes line up horizontally as well, instead of vertically. Can you or anyone out there help me find the path to this particular enlightenment? Thanking you esktop/layout.

**The Herb Garden**
Putting "Spice" in your life since 1989