Page 1 of 1

Edit some part of the template.

Posted: Sun Jan 16, 2011 11:10 am
by Kropay
Hi,

First, thanks for this amazing free script!

What i need is to delete the right menu to extend the main page. To show not 4 colluns but 5.

See:

http://www.Kropay.com/index.php?route=p ... y&path=259

The right menu is deleted and now i want to cover that space with more one collun to get 5 colluns to that space.

How can i do that?

Re: Edit some part of the template.

Posted: Sun Jan 16, 2011 7:00 pm
by Chones
In the stylesheet set find

Code: Select all

#column_right {
	float: right;
	width: 180px;
	margin-left: 10px;
	clear: right;
}
#content {
	margin-left: 190px;
	margin-right: 190px;
	margin-bottom: 10px;
}
Change it to

Code: Select all

#column_right {
	display: none;
}
#content {
	margin-left: 190px;
	margin-right: 0;
	margin-bottom: 10px;
}
Then in your category template and your latest_home template find the lines

Code: Select all

 <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])) { ?>
Change it to

Code: Select all

 <table class="list">
      <?php for ($i = 0; $i < sizeof($products); $i = $i + 5) { ?>
      <tr>
        <?php for ($j = $i; $j < ($i + 5); $j++) { ?>
        <td width="20%"><?php if (isset($products[$j])) { ?>

Re: Edit some part of the template.

Posted: Sun Jan 16, 2011 9:44 pm
by Kropay
Thank you! The forum must add a thanks button! :P

But i havent edited the last thing you said because its perfect with just the first step... Np right?

Re: Edit some part of the template.

Posted: Sun Jan 16, 2011 9:57 pm
by Chones
Thank you too.

The last bit will give you a row of 5 products instead of 4, which is what I thought you wanted?

Re: Edit some part of the template.

Posted: Mon Jan 17, 2011 7:22 pm
by andris
hiding tags with css display: none; is not really good thing to do.. you could simply remove <?php echo $column_right; ?> from yout template .tpl files where necessary :)

Re: Edit some part of the template.

Posted: Tue Jan 18, 2011 2:32 am
by Chones
Yes, usually I never use display: none;

But OpenCart is different - you would need to edit every template file. With this method you only make the change in the styletsheet. This is the best way to do a template - edit the minimum number of files possible.