Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Text directly under products on main page only

Text directly under products on main page only

Views: 1,177

Results 1 to 14 of 14
2 May 2013, 6:57 PM
#1
phil_lomas avatar

phil_lomas

New Zenner

Join Date:
Feb 2013
Location:
Southampton, United Kingdom
Posts:
40
Plugin Contributions:
0

Text directly under products on main page only

Hi

Can anyone tell me what file to edit and the tree path to put some text onto the home page directly under the products. I only want the text on the homepage but don't seem to be able to find which file to add it to. Site is wwwdotbikeporndotcodotuk.

Many thanks in advance

Phil

2 May 2013, 7:25 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Text directly under products on main page only

You want to add text after the listings for Monthly Specials???

2 May 2013, 9:50 PM
#3
phil_lomas avatar

phil_lomas

New Zenner

Join Date:
Feb 2013
Location:
Southampton, United Kingdom
Posts:
40
Plugin Contributions:
0

Re: Text directly under products on main page only

kobra:

You want to add text after the listings for Monthly Specials???

Hi. Yes I do

Regards

Phil

3 May 2013, 12:02 AM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Text directly under products on main page only

In a copy of tpl_index_default.php for your template

Open it in a code editor and reorder the sequence that items are displayed

Save and upload to your template structure

3 May 2013, 12:08 AM
#5
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,179
Plugin Contributions:
0

Re: Text directly under products on main page only

One might try this also ...
includes/ templates/template_default/templates/ tpl_modules_specials_default.php
Place this file in your override directory and edit ...

Place your text in the red coding below ...

$zc_show_specials = false;
  include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_SPECIALS_INDEX));
?>
 
<!-- bof: specials -->
<?php if ($zc_show_specials == true) { ?>
<div class="centerBoxWrapper" id="specialsDefault">
<?php
/**
 * require the columnar_display template to show the products
 */
  require($template->get_template_dir('tpl_columnar_display.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_columnar_display.php');
?><div>My unique text is here</div>
</div>
<?php } ?>
<!-- eof: specials -->
3 May 2013, 2:59 AM
#6
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Text directly under products on main page only

While what haredo posted will work -
The way I am suggesting will move your define_main_page.php text to appear after your specials

In this way, you can edit what is represented through the admin > tools > define page editor

3 May 2013, 4:46 PM
#7
phil_lomas avatar

phil_lomas

New Zenner

Join Date:
Feb 2013
Location:
Southampton, United Kingdom
Posts:
40
Plugin Contributions:
0

Re: Text directly under products on main page only

Ok thanks guys but this is where I am a bit confused. I have opened define pages editor and opened define_main_page and input some text. Problem is that it doesn't appear on the main page hence the original question. Am I supposed to 'turn on' the pages somewhere?
thanks

Phil

3 May 2013, 5:01 PM
#8
stevesh avatar

stevesh

Black Belt

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

Re: Text directly under products on main page only

Are you editing the right file ? Should be includes/languages/english/html_includes/black_pure_free/define_main_page.php. Also try editing the file directly without using the Define Pages Editor.

3 May 2013, 5:13 PM
#9
phil_lomas avatar

phil_lomas

New Zenner

Join Date:
Feb 2013
Location:
Southampton, United Kingdom
Posts:
40
Plugin Contributions:
0

Re: Text directly under products on main page only

Hi Steve

The file isn't there in that file tree. define_main_page.php does sit under html_includes and that shows the text I put into define pages editor. Should I copy that file and put it into black_pure_free?

3 May 2013, 5:50 PM
#10
stevesh avatar

stevesh

Black Belt

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

Re: Text directly under products on main page only

Worth a try. It should work in the original directory, but copy it to the custom template directory and see if it displays.

3 May 2013, 5:58 PM
#11
phil_lomas avatar

phil_lomas

New Zenner

Join Date:
Feb 2013
Location:
Southampton, United Kingdom
Posts:
40
Plugin Contributions:
0

Re: Text directly under products on main page only

hmm Tried it and still didn't display on main page. The file tree on define pages editor changed to where you suggested the file should be but still didn't display the text. It's almost as though black_pure_free doesn't include the script to include define_main_page.php.

3 May 2013, 6:51 PM
#12
stevesh avatar

stevesh

Black Belt

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

Re: Text directly under products on main page only

Unlikely, but not impossible. Are you able to edit any/all of the other define pages ?

3 May 2013, 8:10 PM
#13
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Text directly under products on main page only

Check your setting in

admin > config > define page status > Define Main Page Status > set to "1"

7 May 2013, 5:21 PM
#14
phil_lomas avatar

phil_lomas

New Zenner

Join Date:
Feb 2013
Location:
Southampton, United Kingdom
Posts:
40
Plugin Contributions:
0

Re: Text directly under products on main page only

Man sometimes the easiest things are overlooked. I can't believe I wasted so much time looking for a problem that wasn't there. Kobra thankyou. Stevesh thanks for suggestions.

Set main page status to 1 and it works. I feel stupid.

Regards

Phil