Post by dmbrownfield » Sun Feb 22, 2009 12:40 am

I tried creating a 2 column table in this file:
store/catalog/language/english/controller/home.php

but after inserting the HTML code and refreshing the page, all of my text on that page is gone. The headings and categories, etc are there but no text.

Help ??

New member

Posts

Joined
Fri May 09, 2008 12:37 am

Post by Qphoria » Sun Feb 22, 2009 2:21 am

usually means you broke something on that page and the php error is supressed. Try starting over.. using small steps and checking the page after each change.

User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by naveed.ahmed » Wed Feb 25, 2009 1:25 pm

Dear you can make a table on the main page using following hierarchy

catalog-> view->template>common->home.tpl

for example: i have made a table on content area above products int he main page

<div class="top">

<h1><?php echo "Welcome to Cellswoop Shopping Cart"; ?></h1>

</div>

<div class="middle">

<!-- <div>

<p><?php echo $welcome; ?></p>

</div>
-->
<!-- <div class="heading"><?php echo $text_latest; ?></div>-->
<table width="550px" border="1" cellpadding="0" cellspacing="0" align="center">
<tr>
<td width="125px" valign="top" align="left">some text here</td>
<td width="125px" valign="top" align="left">some text here</td>
<td width="125px" valign="top" align="left">some text here</td>
<td width="125px" valign="top" align="left">some text here</td>
</tr>
</table>




<table class="list">

<?php for ($i = 0; $i < sizeof($products); $i = $i + 4) { ?>

<tr>

<?php for ($j = $i; $j < ($i + 4); $j++) { ?>

<td width="25%"><?php if (isset($products[$j])) { ?>

<a href="<?php echo $products[$j]['href']; ?>"><img src="<?php echo $products[$j]['thumb']; ?>" title="<?php echo $products[$j]['name']; ?>" alt="<?php echo $products[$j]['name']; ?>" /></a><br />

<a href="<?php echo $products[$j]['href']; ?>"><?php echo $products[$j]['name']; ?></a><br />

<span style="color: #999; font-size: 11px;"><?php echo $products[$j]['model']; ?></span><br />

<span style="color: #900; font-weight: bold;"><?php echo $products[$j]['price']; ?></span><br />

<?php if ($products[$i]['rating']) { ?>

<img src="catalog/view/image/stars_<?php echo $products[$j]['rating'] . '.png'; ?>" alt="<?php echo $products[$j]['stars']; ?>" />

<?php } ?>

<?php } ?></td>

<?php } ?>

</tr>

<?php } ?>

</table>

</div>

<div class="bottom"></div>

i hope you will get it

Newbie

Posts

Joined
Tue Feb 24, 2009 10:12 pm

Post by nde » Thu Feb 26, 2009 4:29 am

Yeah, the template files are the right place to put these things.

nde
New member

Posts

Joined
Sat Jun 30, 2007 7:32 am

Post by Qphoria » Thu Feb 26, 2009 5:10 am

The main page has it's own editor in the admin now. Why not just create the table there? No need to edit tpl file

User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am
Who is online

Users browsing this forum: No registered users and 5 guests