Jump to content
cooletin

cant put facebook in displayLeftColumn

Recommended Posts

Hello.

 

Someone knows how I can move facebook in left of this pictures?

 

Not under the products.

 

 

post-433913-0-09827000-1397062731_thumb.png

Share this post


Link to post
Share on other sites

By default Facebook does not have Left Hook so you need to add one to the .php file within the module.

 

modules/blockfacebook/blockfacebook.php

 

Make some space and add this at or around line 94:

 

public function hookLeftColumn()
{
if (!$this->isCached('blockfacebook.tpl', $this->getCacheId()))
$this->context->smarty->assign('facebookurl', Configuration::get('blockfacebook_url'));
 
return $this->display(__FILE__, 'blockfacebook.tpl', $this->getCacheId());
}
 
 
 
 
After this I had issues with the module displaying correctly in the left column so I changed a few more things.
 
Edit the blockfacebook.tpl file and change the <div> tag at line 28 as below.
 
(changed ID as to not change the cmsinfo block css)
<div id="facebook_block_fan" class="block">  
 
Now edit the global.css file and at or around line 7864 you will find the #facebook_block, cmsinfo_block lines, I removed the facebook_block, from each of these changed the #facebook_block, .facebook_fanbox as below.
 
#facebook_block_fan .facebook-fanbox {
  background: white;
  border: 1px solid #aaaaaa;
  padding-bottom: 10px; 
  width:270px   {*not necassary except for center column*}
  }
 
 
 
 
 
Global.css should look like this when done: lines - 7865-7888
 
 
#cmsinfo_block {
  overflow: hidden;
  background: #f2f2f2;
  min-height: 344px;
  padding-right: 29px;
  padding-left: 29px; }
  @media (max-width: 991px) {
    
    #cmsinfo_block {
      min-height: 348px;
      padding-left: 13px;
      padding-right: 13px; } }
  @media (max-width: 767px) {
   
    #cmsinfo_block {
      width: 100%;
      min-height: 1px; } }
 
#facebook_block_fan .facebook-fanbox {
  background: white;
   padding-bottom: 10px; 
  width:270px
  }
 
If you want the border add      border: 1px solid #aaaaaa;  to above.
 
 
 
 
 
Now go to the BO Modules, Positions and transplant the Facebook block to the DisplayLeftColumn and unhook from the DisplayHome.
 
 
 
You can see the results here:
 

Share this post


Link to post
Share on other sites

I did exactly as you showed below and it shows perfectly on the left, but the facebook block only shows at homepage. 

If I click on product details, there is only a title "follow us on facebook", but nothing else. Not sure where the problem is from.

Thanks

Kent

 

 

By default Facebook does not have Left Hook so you need to add one to the .php file within the module.

 

modules/blockfacebook/blockfacebook.php

 

Make some space and add this at or around line 94:

 

public function hookLeftColumn()
{
if (!$this->isCached('blockfacebook.tpl', $this->getCacheId()))
$this->context->smarty->assign('facebookurl', Configuration::get('blockfacebook_url'));
 
return $this->display(__FILE__, 'blockfacebook.tpl', $this->getCacheId());
}
 
 
 
 
After this I had issues with the module displaying correctly in the left column so I changed a few more things.
 
Edit the blockfacebook.tpl file and change the <div> tag at line 28 as below.
 
(changed ID as to not change the cmsinfo block css)
<div id="facebook_block_fan" class="block">  
 
Now edit the global.css file and at or around line 7864 you will find the #facebook_block, cmsinfo_block lines, I removed the facebook_block, from each of these changed the #facebook_block, .facebook_fanbox as below.
 
#facebook_block_fan .facebook-fanbox {
  background: white;
  border: 1px solid #aaaaaa;
  padding-bottom: 10px; 
  width:270px   {*not necassary except for center column*}
  }
 
 
 
 
 
Global.css should look like this when done: lines - 7865-7888
 
 
#cmsinfo_block {
  overflow: hidden;
  background: #f2f2f2;
  min-height: 344px;
  padding-right: 29px;
  padding-left: 29px; }
  @media (max-width: 991px) {
    
    #cmsinfo_block {
      min-height: 348px;
      padding-left: 13px;
      padding-right: 13px; } }
  @media (max-width: 767px) {
   
    #cmsinfo_block {
      width: 100%;
      min-height: 1px; } }
 
#facebook_block_fan .facebook-fanbox {
  background: white;
   padding-bottom: 10px; 
  width:270px
  }
 
If you want the border add      border: 1px solid #aaaaaa;  to above.
 
 
 
 
 
Now go to the BO Modules, Positions and transplant the Facebook block to the DisplayLeftColumn and unhook from the DisplayHome.
 
 
 
You can see the results here:
 

 

Share this post


Link to post
Share on other sites

i don't see likebox on your website, no matter what i check: homepage, product page, category pages etc. there is no likebox

Share this post


Link to post
Share on other sites

URL:  http://smartertonga.com/prestashop166/

 

I'm testing PS166 and doing modifications. 

 

PS: Milos, I've been following ur tutorials to do the modifications, for example, 3 column, tabs like PS1.5. 

 

i don't see likebox on your website, no matter what i check: homepage, product page, category pages etc. there is no likebox

Share this post


Link to post
Share on other sites

Try getting rid of caching

public function hookLeftColumn()
{

$this->context->smarty->assign('facebookurl', Configuration::get('blockfacebook_url'));
 
return $this->display(__FILE__, 'blockfacebook.tpl');
}
 

Share this post


Link to post
Share on other sites

I tried this and the whole homepage is not displaying at all.

Thanks

Kent

 

Try getting rid of caching

public function hookLeftColumn()
{

$this->context->smarty->assign('facebookurl', Configuration::get('blockfacebook_url'));
 
return $this->display(__FILE__, 'blockfacebook.tpl');
}
 

Share this post


Link to post
Share on other sites

enable error reporting as described in my signature, to see what the error is (might be the missing $params in the method)

Share this post


Link to post
Share on other sites

hello

instead of modifications of default module, just use one of the free likebox modules,

these addons have much more customization options

and works in left column without modifications.

Share this post


Link to post
Share on other sites

Thank you! I might just follow Vekia's suggestion as I have no knowledge of coding. 

PS: Your free module of Q&A seems not so compatible with PS1.6.6. 

enable error reporting as described in my signature, to see what the error is (might be the missing $params in the method)

Share this post


Link to post
Share on other sites

Thanks [spam-filter]!

I tried your free module, which is good. Yet I dont know how to do further modification. Like I want to change "Find us on facebook" to "FOLLOW US ON FACEBOOK". If the header can be same style as PS1.6 will be perfect. 

 

 

hello

instead of modifications of default module, just use one of the free likebox modules,

these addons have much more customization options

and works in left column without modifications.

Share this post


Link to post
Share on other sites

×

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More