How to move block reinsurance to top?

If you want to move default prestashop module named "block reinsurance" to top (yes, it's a module for footer icons "money back", "exchange in store", "payment upon shipment", "Free shipping", "100% secured payment") this guide is exactly for you. In this paper i will show you the easiest way to do this.

 

prestashop block reinsurance top

 

Block reinsurance modification

We have to modify module core. It's beccause this addon by default doesn't support displayHeader (yes, we will use displayHeader hook instead of displayTop). We must add support of this hook manually. We have also to modify module CSS stylesheet file. 

 

1. displayHeader hook support

Open main module file named blockreinsurance.php, you can find it of course in module directory: /modules/blockreinsurance/. Before last closing bracket } add this code:

    public function hookDisplayHeader($params){
        return $this->hookFooter($params);    
    }

You can see whole modified file on my pastebin resource (you can see new function hookDisplayHeader(); at the end of the file): modfied blockreinsurance.php on pastebin

 

2. Transplant module to new hook

Now we have to transplant our modified blockreinsurance module to the new hook. In this case open modules > positions tab in your back office and click on green transplant button:

 

transplantation of prestashop module

transplant module prestashop

 

You will see form with several fields. From "module" dropdown select "Customer reassurance block" and from "Hook into" dropdown selection select "displayHeader" hook, exactly as i show on image below. You don't have to define other fields, only these two. After that, just hit green Save button.

 

transplantation of customer reassurance block

customer reassurance block

 

You will see message that you correctly transplanted customer reassurance module to new hook. You can go to the third step now.

 

3. Remove block reassurance module from displayFooter

It's time to unhook module from old position. In this case on modules > positions back office page search for "displayFooter" modules list and hit thrash icon near block reassurance module on that list. Exactly as i show on image below:

 

customer reassurance block - remove module from displayFooter modules list

customer reassurance module remove displayFooter

 

After that action our block reassurance module will be removed from its original position: Footer. After that you can go to fourth step.

 

4. Changing styles of block reassurance module

Now we have to modify styles of module. We want to create full width reassurance block with icons in the middle of the device screen. In this case we must modify style.css stylesheet. This file is located in module directory /modules/blockreinsurance.css. Remember that if this file exists in your theme /modules/css/ directory - you have to modify this file instead of original one.

 

Clear file contents and paste there this CSS code:

/* BLOCK #reinsurance_block ******************************************************************** */
#reinsurance_block {display:block; clear:both; background:url(../blockreinsurance/img/bg_reinsurance_block.gif) repeat-x 0 0 #c3c7cb}
#reinsurance_block ul {list-style:none; width:980px; margin:auto;}
#reinsurance_block li {
	float:left;
	padding:15px 10px !important;
	font-size:13px;
	color:#333;
	text-transform:uppercase;
	text-shadow:0 1px 0 #fff
}
#reinsurance_block .width1 li {width:960px}
#reinsurance_block .width2 li {width:470px}
#reinsurance_block .width3 li {width:305px}
#reinsurance_block .width4 li {width:224px}
#reinsurance_block .width5 li {width:175px}
#reinsurance_block li img{
	float:left;
	margin-right:10px;
}
#reinsurance_block li span {
	float:left;
	padding-top:12px;
	width:65%;
}

Just save changes. And that's all.

 

Effect: Customer Reassurance transplanted to top section

customer reassurance module transplanted to top

author milos myszczuk
Article by Milosz Myszczuk PrestaShop expert, official PrestaShop community moderator. PHP developer, specialist in relative and spatial databases management, GIS Analyst, CEO & founder of VEKIA interactive agency. Read more about VEKIA company
If you like my articles and want much more valuable tips, feel free to send me donation
1.4 version 1.4.11 1.6 404 addon admin advertise ahref ajax alpha animation api app application authentication back office backup badge banner basics block bootstrap button cache carrier cart catalog category certificate changelog chat class clear client clip cms code colors columns comments configuration contact container content controller cookie counter country coupon css csv currency customer dashboard database debug default delete delivery desktop developer device disable discount displayNav displayTop download dynamic editor effect empty encrypt engine error exchange exclude export facebook faceshop fade fancoupon fancybox fanpage fatal feature feed field file fix fixed font footer free friendly url front ftp full gallery generate gift global godaddy google google+ gray grid groupon header help hide highlight homefeatured homepage hook hosting hover howto htaccess html html5 ID image import include input instagram installation integration iPhone issue javascript jquery kgb knowhow languages law left likebox link list livingsocial loading log login logo loyality mail mailing maintenance manufacturer marketing marquee mcrypt menu meta mobile modification module movie moving multilanguage multiupload must have mysql news newsletter notification number open graph order override page password performance PHP phpmyadmin picture pinterest plugin popup post prestashop prestashop 1.0 prestashop 1.1 prestashop 1.2 prestashop 1.3 prestashop 1.4 prestashop 1.5 price rules problem product profile promotion proslider purifier quantity query quick tip random rates register reinsurance release reporting reset responsive restore results ribbon rich text right sales search security seo service shadow share shipping shop shopmania slider smarty social networks SQL SSL statistics stock store style subcategory superuser support switcher tab tablet tag tax template text theme tinyMCE tips and tricks tpl tracking translations tree trends trigger tumblr tutorial twitter update upgrade upload variables video visits voucher vulnerability web2print wide widget width window wishlist wysiwyg youtube zip zopim