Jump to content

[Solved] Newsletter block on homepage


Officer

Recommended Posts

Hello,

I am just wondering how can I add a "Subscribe to our Newsletter" box in the homepage. I think this already exists when the member wants to register upon purchasing an item (I think it's a checkbox that the user can check/uncheck), however, I'd love to add another box to the homepage for both registered and unregistered users so they can put their email address and hit "Subscribe" and their email will be saved in our Backoffice so we can send them newsletter in the future.

Your help is mostly appreciated.

Link to comment
Share on other sites

Usually you can use the transplant function of modules.
But I checked this for newletter block, it seems not working.

You cam modify current module blocknewlatter to add a hook to home
1. Change this one lin in install()

FROM

          if (parent::install() == false OR $this->registerHook('leftColumn') == false)



TO

         if (parent::install() == false OR $this->registerHook('leftColumn') == false OR $this->registerHook('home') == false)



2. Add following code

function hookHome($params)
{
return $this->hookLeftColumn($params);
}

3. un-insall/re-insyall the module

Link to comment
Share on other sites

  • 3 months later...

you are welcome! and thanks for feedback.

 

If i add this code

 

2. Add following code

 

function hookHome($params)

{

return $this->hookLeftColumn($params);

}

 

3. un-insall/re-insyall the module

 

 

To the blockbewsletter.php file i get a error in the Backoffice ,

Can you help me out ?

 

Thanks!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...