I'm still having problems with this, below is the code for the page. I have checked everything else so there must be an error in here. Please I really need help.
Thanks
<?
/*
mainpage.php ENGLISH by Matthijs -
[email protected]
This page will be shown on the first page of the catalog
(default.php) instead of the standard message.
You can write your php/html straight into this.
This means you can drop in another table on the main
page where you could create (manually) a featured product
or just drop in some nice graphics. I've included a small sample
below using existing box-code/stylesheets so you get the idea.
BE AWARE that changes (and possible errors/typo's) are
directly used by the catalog. There is no preview option,
changes are directly 'live'. So be carefull.
All changed and all fixes have been fixed for current snap shot...
*/
?><!-- MAIN PAGE EXAMPLE START //-->
<table width="100%" cellpadding="5" cellspacing="0" border=0>
<tr>
<td class="main" width=50% valign="top" align="right">
<?php
$mainpage_title = "We've just installed the \"Define Mainpage\" module!";
$mainpage_info = "
\"Define Mainpage\" module v1.3 by Matthijs (
[email protected])
<p>
This module demonstrates how easy it can be to adapt existing code in OSC.<br>
All I had to do was add one single line to define_languages.php (admin) to make
sure it always looks for the mainpage.php file. Obviously I had to then implement it
in the Admin & Catalog side, but that's not a big deal as you've just found out.<p>
You can edit the contents of this file from within the Admin ( -> CATALOG -> DEFINE MAINPAGE)<br>
For other, less advanced layouts choose either German or Spanish from the language menu. (Provided you've installed
those languages)<p>If you can't open/edit the /[language]/mainpage.php file you should probably set the right permissions. You'll get a warning anyway.
<p>Todo? Future plans? World peace through superior fire power... ehmm.. <br>no I mean a preview option ;)<br>
And perhaps make a few templates for the layout...<p>
I'd appreciate an e-mail if you use this, I'm curious...<br>
Later,<br>
Mattice
";
$info_box_contents = array();
$info_box_contents[] = array('align' => 'left',
'text' => $mainpage_title );
new infoBoxHeading($info_box_contents, true, true);
$info_box_contents = array();
$info_box_contents[] = array('align' => 'left',
'text' => $mainpage_info);
new infoBox($info_box_contents);
?>
</td>
<td width=30% valign="top" align="center">
<?
$somebox_title = "Ratings...";
$somebox_info = tep_image(DIR_WS_IMAGES . 'stars_1.gif') . ' Sucks!<br>' . tep_image(DIR_WS_IMAGES . 'stars_2.gif') . ' Mwoah<br>' . tep_image(DIR_WS_IMAGES . 'stars_3.gif') . ' Okay<br>' . tep_image(DIR_WS_IMAGES . 'stars_4.gif') . ' Cool!';
$info_box_contents = array();
$info_box_contents[] = array('align' => 'left',
'text' => $somebox_title );
new infoBoxHeading($info_box_contents, true, true);
$info_box_contents = array();
$info_box_contents[] = array('align' => 'left',
'text' => $somebox_info);
new infoBox($info_box_contents);
?>
<p>
<?
$somebox_title = "Anouncement:";
$somebox_info = "<center>This website is powered by the best OpenSource e-commerce solution available on the market today:<p>" . tep_image(DIR_WS_IMAGES . 'oscommerce.gif') . '<p>Please contribute to this fantastic project!<br>Visit http://www.oscommerce.com for more details.</center>';
$info_box_contents = array();
$info_box_contents[] = array('align' => 'left',
'text' => $somebox_title );
new infoBoxHeading($info_box_contents, true, true);
$info_box_contents = array();
$info_box_contents[] = array('align' => 'left',
'text' => $somebox_info);
new infoBox($info_box_contents);
?>
</td>
</table>
<!-- MAIN PAGE EXAMPLE END //-->