Community Forums

How i make small modules in the center

Community created contributions & mods for OpenCart 1.x

How i make small modules in the center

Postby celestial » Wed Jun 30, 2010 10:53 am

Q how i can make this please, thks.

viewtopic.php?f=2&t=15455&start=40#p76032

and this (NO DROPDOWN MENU)

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

Help me
celestial
 
Posts: 2167
Joined: Fri Mar 19, 2010 3:19 pm

Re: How i make small modules in the center

Postby Qphoria » Wed Jun 30, 2010 1:50 pm

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;
}
User avatar
Qphoria
Administrator
 
Posts: 19203
Joined: Mon Jul 21, 2008 2:02 pm
Donate to Qphoria

Re: How i make small modules in the center

Postby celestial » Wed Jun 30, 2010 6:01 pm

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 ...
celestial
 
Posts: 2167
Joined: Fri Mar 19, 2010 3:19 pm

Re: How i make small modules in the center

Postby vimal » Fri Jul 02, 2010 12:47 am

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
vimal
 
Posts: 372
Joined: Tue Aug 25, 2009 7:54 pm
Location: Sweden

Re: How i make small modules in the center

Postby yrshopping » Fri Jul 16, 2010 7:02 pm

hi q,

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


b.rgd
David
yrshopping
 
Posts: 77
Joined: Tue Aug 11, 2009 11:42 pm


Return to Free Contributions

Who is online

Users browsing this forum: No registered users and 22 guests

Hosted by Arvixe Web Hosting