Page 1 of 1

How i make small modules in the center

Posted: Wed Jun 30, 2010 11:53 pm
by celestial
Q how i can make this please, thks.

http://forum.opencart.com/viewtopic.php ... =40#p76032

and this (NO DROPDOWN MENU)

[flag1] language1 - [flag2] language2 - [flag3] language3 / [simbol1] currency1 - [simbol2] currency2 - [simbol3]currency3

Help me

Re: How i make small modules in the center

Posted: Thu Jul 01, 2010 2:50 am
by Qphoria
If you want to use small modules in the center it is pretty easy. I included the CSS in the stylesheet for it but it requires some small controller changes.

For example, if you want to have the
Featured, Latest, and BestSellers on the homepage like the example. You can do this:

1. EDIT: catalog/controller/common/home.php

2. FIND:

Code: Select all

$this->children = array(
    'common/column_right',
    'common/column_left',
    'common/footer',
    'common/header'
); 
3. REPLACE WITH:

Code: Select all

$this->children = array(
            'common/column_right',
            'common/column_left',
            'common/footer',
            'common/header',
            'module/latest',
            'module/featured',
            'module/bestseller'
        ); 
4. EDIT: catalog/view/theme/default/template/common/home.tpl

5. FIND:

Code: Select all

<?php foreach ($modules as $module) { ?>
  <?php echo ${$module['code']}; ?>
  <?php } ?>
6. AFTER, ADD:

Code: Select all

  <?php echo $latest; ?>
  <?php echo $featured; ?>
  <?php echo $bestseller; ?>
7. Set Latest, Featured, Bestseller positions to "Left" or "Right" and set the limits all the same

8. EDIT: catalog/view/theme/default/stylesheet/stylesheet.css

9. FIND:

Code: Select all

#content .middle .box {
	float: left;
	margin: 0 6px 10px 6px;
	min-height: 0px;
}
#content .middle .box .middle {
	width: 158px;
	min-height: 0px;
}
10. REPLACE WITH:

Code: Select all

#content .box {
	float: left;
	margin: 0 6px 10px 6px;
	min-height: 0px;
}
#content .box .middle {
	width: 158px;
	min-height: 0px;
}

Re: How i make small modules in the center

Posted: Thu Jul 01, 2010 7:01 am
by celestial
You are my hero, thnks.

but

and this on (NO DROPDOWN MENU LANGUAGE AND CURRENCY)

[flag1] language1 - [flag2] language2 / [simbol1] currency1 - [simbol2] currency2 - [simbol3]currency3 ...

Re: How i make small modules in the center

Posted: Fri Jul 02, 2010 1:47 pm
by vimal
Awesome! Just what I was looking for...been trying this for some time but just didn't seem to get it right...Of course Q is my hero too.. ;D

Re: How i make small modules in the center

Posted: Sat Jul 17, 2010 8:02 am
by yrshopping
hi q,

can you cut the screenshot for small modules in the center? thank you very much.


b.rgd
David