OpenCart: Add left column (contain categories etc) on Default page

Niladri Banerjee - Uttarpara picture Niladri Banerjee - Uttarpara · Aug 31, 2012 · Viewed 15.5k times · Source

I want to add the 'Left Column' (categories etc) in the default page. I see that the left panel is exists on the product pages but missing from the default page. Please see the screen shot. Please suggest.

Answer

TheBlackBenzKid picture TheBlackBenzKid · Sep 1, 2012

1 - Open the desired page in templates folder, example, content/information pages:

catalog\view\theme\default\template\information.tpl

2 - Add this line in the desired location:

<?php echo $column_left; ?>

If it fails, open the relevant MVC controller model of that code, example:

catalog\controller\information.php

Find $this->children = array(

Make sure the array contains the left panel, example:

$this->children = array(
    'common/column_left',
    'common/column_right',
    'common/content_top',
    'common/content_bottom',
    'common/footer',
    'common/header'
);

I hope you mean that information etc by default as the default, aka homepage, already has this: (\catalog\view\theme\default\template\common\home.tpl)

<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>
<div id="content"><?php echo $content_top; ?>
<h1 style="display: none;"><?php echo $heading_title; ?></h1>
<?php echo $content_bottom; ?></div>
<?php echo $footer; ?>