Forums / Templates, Stylesheets, Page Layout / Content Beneath *New Products on Main Page

Content Beneath *New Products on Main Page

Locked

Views: 1,071

Results 1 to 15 of 15
This thread is locked. New replies are disabled.
15 Jun 2010, 10:43 AM
#1
davx avatar

davx

New Zenner

Join Date:
Nov 2009
Posts:
80
Plugin Contributions:
0

Content Beneath *New Products on Main Page

Hi Guys

I seem to be going around in circles, I want to add some php/html content beneath the New Products on the main page.

I have tried a few things but nothing seems to be working. Where can I add this?

I have tried:

/httpdocs/shop/includes/templates/template_default/templates/tpl_index_default.php

and

/httpdocs/shop/includes/languages/english/index.php

Any Ideas?

Cheers

15 Jun 2010, 11:01 AM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Content Beneath *New Products on Main Page

tpl_index_default.php is the right one. What kind of code are you trying to add ?

15 Jun 2010, 11:48 AM
#3
davx avatar

davx

New Zenner

Join Date:
Nov 2009
Posts:
80
Plugin Contributions:
0

Re: Content Beneath *New Products on Main Page

Thanks for the reply

Well I want to add an image, but also some php.

To test it I simply added a <p>TEST</p> to the bottom of that file.

15 Jun 2010, 11:51 AM
#4
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Content Beneath *New Products on Main Page

I did something similar (an <a href ..>) just under the New Products section on a test site, and it appeared.

Are you saving the file to an override folder?

15 Jun 2010, 12:02 PM
#5
davx avatar

davx

New Zenner

Join Date:
Nov 2009
Posts:
80
Plugin Contributions:
0

Re: Content Beneath *New Products on Main Page

I just tried adding

<a href="http://www.zen-cart.com">Zencart</a>

to both

/httpdocs/shop/includes/templates/template_default/templates/tpl_index_default.php

and

/httpdocs/shop/includes/templates/ritrshop/templates/tpl_index_default.php

With no show :(

15 Jun 2010, 12:20 PM
#6
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Content Beneath *New Products on Main Page

Edit: Never mind.

15 Jun 2010, 12:55 PM
#7
davx avatar

davx

New Zenner

Join Date:
Nov 2009
Posts:
80
Plugin Contributions:
0

Re: Content Beneath *New Products on Main Page

? Huh?

15 Jun 2010, 1:04 PM
#8
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Content Beneath *New Products on Main Page

I asked a question you had already answered.

I don't know what to tell you - it should work. Are you sure the edited files are being saved?

15 Jun 2010, 1:27 PM
#9
davx avatar

davx

New Zenner

Join Date:
Nov 2009
Posts:
80
Plugin Contributions:
0

Re: Content Beneath *New Products on Main Page

Yea, its been re-uploaded.

I've even tried deleting them and re-uploading.

Below is a copy of my 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 */ <p> Test </p> ?> <?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>
15 Jun 2010, 2:19 PM
#10
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Content Beneath *New Products on Main Page

Davx:

<?php
/**

  • display the New Products Center Box
    */
<p> Test </p>

?>

Looks like you have it inside a PHP statement.

15 Jun 2010, 3:26 PM
#11
davx avatar

davx

New Zenner

Join Date:
Nov 2009
Posts:
80
Plugin Contributions:
0

Re: Content Beneath *New Products on Main Page

Apologies, my poor copy/pasting.

It actually reads;

/**

  • display the New Products Center Box
    */
    ?>
<p>Test</p> <?php require($template->get_template_dir('tpl_modules_whats_new.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_whats_new.php'); ?> <?php } ?>

Which is outside of the php statement :( still same problem

15 Jun 2010, 3:45 PM
#12
davx avatar

davx

New Zenner

Join Date:
Nov 2009
Posts:
80
Plugin Contributions:
0

Re: Content Beneath *New Products on Main Page

Im not to sure if im understanding this correctly.

I have never made any changes to tpl_index_default.php.

I have removed tpl_index_default.php from my template directory so it should revert back to using the one located inside /includes/templates/template_default folder right?

15 Jun 2010, 4:28 PM
#13
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Content Beneath *New Products on Main Page

/includes/templates/template_default/templates, yes.

15 Jun 2010, 8:18 PM
#14
davx avatar

davx

New Zenner

Join Date:
Nov 2009
Posts:
80
Plugin Contributions:
0

Re: Content Beneath *New Products on Main Page

Hmmm well its not workin in there either :(

16 Jun 2010, 7:54 AM
#15
davx avatar

davx

New Zenner

Join Date:
Nov 2009
Posts:
80
Plugin Contributions:
0

Re: Content Beneath *New Products on Main Page

Solved - Had to create a file in /includes/templates/template_default/templates/tpl_index_categories.php

Cheers

Dave