If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / define main page lower not displaying properly

define main page lower not displaying properly

Started by swdynamic on 22 May 2013, 1:02 PM · Views: 1,144

Results 1 to 4 of 4
22 May 2013, 1:02 PM
#1
swdynamic avatar

swdynamic

New Zenner

Join Date:
Jan 2008
Posts:
55
Plugin Contributions:
0

Post #1 by swdynamic

To Start...THANKS to EVERYONE!! for the previous help given all other issues I have posted. That being said could use a little more advise please.

I added the "define main page lower" add on to my site and added an animated gif to that area. Also added several other items such as newly added company product logo and some text that I wanted either above or below the animation. No matter whether I use html or text area the only thing that shows up in the store is the animated gif file?!

https://www.wreckersource.com

I have tried to code several different ways and still nothing changes. When I open Admin-Tools-define page editor- the code or items are showing to be there just not displaying on site...

Is there something in the php or css files that would cause this?

Thanks in advance again.

22 May 2013, 2:30 PM
#2
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Post #2 by rodg

swdynamic:

I added the "define main page lower" add on to my site.

It's probably just me, but I can't seem to locate this particular add-on.

swdynamic:

and added an animated gif to that area. Also added several other items such as newly added company product logo and some text that I wanted either above or below the animation. No matter whether I use html or text area the only thing that shows up in the store is the animated gif file?!

www.wreckersource.com

I have tried to code several different ways and still nothing changes. When I open Admin-Tools-define page editor- the code or items are showing to be there just not displaying on site...

The problem here, is that we have no idea of what we should be seeing. As a general rule, a page with missing elements will rarely actually look like its broken.. it'll look like it was designed that way.

swdynamic:

Is there something in the php or css files that would cause this?

It probably have nothing to do with .CSS (hidden element excepted). It will have something to do with the .php files though, for the simple reason that the store is .php driven.

Considering this is an 'add-on' function that affects existing pages, I suspect that in order for it to work at all it will require that at least one of the existing php files will need to be replaced or modified in order to output the new/additional data. I further suspect that this is where your problem lies.

If I were able to identify the actual add-on you are using I would probably be able to determine whether my suspicions hold water or not, but without this, I'm doing little more than having an educated guess.

Cheers
Rod

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

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

23 May 2013, 4:10 PM
#3
swdynamic avatar

swdynamic

New Zenner

Join Date:
Jan 2008
Posts:
55
Plugin Contributions:
0

Post #3 by swdynamic

I apologize for calling it an add-on, I believe that I may have simply found a way to add the extra define page to the Index. It is simply an added define page to allow easier adding and editing to the Main Page content if I am wording that properly. Everything shows in the define pages editor when I select either plain text or html areas. Just doesn't show in the Store that way, only the animated gif.

define_main_page_lower.php

<img width="180" height="40" align="baseline" style="width: 180px; height: 40px;" alt="Tecniq_logo" src="http://www.wreckerequip.com/2011_Store/includes/templates/2011_Catalog_Template/images/headerLogo_hover.png" border="0" hspace="0" /></p>
Just added. <b>CHECK OUT PRODUCT PAGES</b>

</p> <img width="500" height="120" src="http://www.wreckerequip.com/2011_Store/images/banners/finance_dkbrg_anim_complete.gif" /> <br/> Please Click the Link <b>"About Our Finance Options"</b> to The Left.</p>

Need Help Locating or Finding Something?? <b>That is What WE DO!! Give US a Call TODAY!!</b></p>

Not sure if maybe I am just newbie trying to accomplish too much, coding wrong, ??? I have tried the above in HTML area as well and it shows exactly as I would like it, just not on the site.

Again, Thanks in Advance for the Time and Patience

23 May 2013, 4:29 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #4 by ajeh

On the index template tpl_index_default.php you will see the code for the define_main_page:

<?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 } ?>

The $define_page is defined in the file:
/includes/modules/pages/index/header_php.php

// include template specific file name defines
$define_page = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', FILENAME_DEFINE_MAIN_PAGE, 'false');

So for your code you need to place on the page somewhere something similar:

<?php if (DEFINE_MAIN_PAGE_LOWER_STATUS >= 1 and DEFINE_MAIN_PAGE_LOWER_STATUS <= 2) { ?>
<?php
/**
 * get the Define Main Lower Page Text
 */
$define_page_lower = zen_get_file_directory(DIR_WS_LANGUAGES .  $_SESSION['language'] . '/html_includes/',  FILENAME_DEFINE_MAIN_PAGE_LOWER, 'false');
?>
<div id="indexDefaultMainContent" class="content"><?php require($define_page_lower); ?></div>
<?php } ?>

For the constant that is in the configuration table you can use for DEFINE_MAIN_PAGE_LOWER_STATUS in your Tools ... Install SQL Patches:

insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Define Main Page Lower Status', 'DEFINE_MAIN_PAGE_LOWER_STATUS', '1', 'Enable the Defined Main Page Lower Link/Text?<br />0= Link ON, Define Text OFF<br />1= Link ON, Define Text ON<br />2= Link OFF, Define Text ON<br />3= Link OFF, Define Text OFF', '25', '85', now(), now(), NULL, 'zen_cfg_select_option(array(\'0\', \'1\', \'2\', \'3\'),');

For the filename definition, you can create a new file:
/includes/extra_datafiles/define_main_page_lower_filenames.php

<?php
// define for Define Main Page Lower filename
define('FILENAME_DEFINE_MAIN_PAGE_LOWER', 'define_main_page_lower');

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!