Page 1 of 1

[MOD] HTML modules are now Welcome Module OC v1.5

Posted: Thu May 26, 2011 10:10 pm
by celestial
Using Opencart v1.5 RC2 SVN r322

Wise men, thank you for the module WELCOME which is already the module HTML, the only thing that we have to do is:

1. Create all the modules you want in extensions, welcome, set the layout and position where you want the messages.
2. Edit \catalog\view\theme\default\template\module\welcome.tpl

Comment or delete:

<!--
<div class="welcome">
<?php echo $heading_title; ?>
</div>
-->

and let alone the:

<?php echo $message; ?>

That is.

If you want make this more stylized (my own):

Edit:

\catalog\view\theme\default\stylesheet\stylesheet.css

FIND:

.box .box-heading {
-webkit-border-radius: 7px 7px 0px 0px;
-moz-border-radius: 7px 7px 0px 0px;
-khtml-border-radius: 7px 7px 0px 0px;
border-radius: 7px 7px 0px 0px;
border: 1px solid #DBDEE1;
background: url('../image/background.png') repeat-x;
padding: 8px 10px 7px 10px;
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
font-weight: bold;
line-height: 14px;
color: #333;
}


Insert below:


.box .box-heading2 {
-webkit-border-radius: 7px 7px 0px 0px;
-moz-border-radius: 7px 7px 0px 0px;
-khtml-border-radius: 7px 7px 0px 0px;
border-radius: 7px 7px 0px 0px;
border: 1px solid #DBDEE1;
background: #585858 ;
padding: 2px 10px 7px 10px;
}

go back to edit \catalog\view\theme\default\template\module\welcome.tpl and change to:

<div class="box">
<div class="box-heading2"></div>
<div class="box-content"><?php echo $message; ?></div>
</div>

Note: the color #585858 is the same of the top mega menu.

From here let your imagination fly.

Another Note: Why not change the name to the module Welcome? this is our decision. In the way this module is right now is only for one welcome, because the <?php echo $heading_title; ?> and you dont want this in all the new boxes.
welcome.jpg

welcome.jpg (35.81 KiB) Viewed 3476 times


Re: [MOD] HTML modules are now Welcome Module OC v1.5

Posted: Fri Jun 17, 2011 4:09 am
by dat98cbr
Cool. Is there a way to set in which store the message will appear if you run multistore?

Re: [MOD] HTML modules are now Welcome Module OC v1.5

Posted: Fri Jun 17, 2011 4:10 am
by Xsecrets
dat98cbr wrote:Cool. Is there a way to set in which store the message will appear if you run multistore?
create different layouts for the different stores then assign your module positions to those layouts.

Re: [MOD] HTML modules are now Welcome Module OC v1.5

Posted: Fri Jun 17, 2011 2:02 pm
by dat98cbr
Your are absolutely right. Spot on!

For other users you can find a tutorial here: http://forum.opencart.com/viewtopic.php ... 40#p159593