Jump to content

Prestashop 1.7.6.5: duplicate Contactform-Modul


meyer2005

Recommended Posts

Hello,  I duplicated the contact form module and then I added it to the displayHome hook, but it does not appear on the front office. After I found that it does not appear on any hook.
I think I have a problem with the new file ContactHomeController. Can you help me please!?

 class ContactHomeControllerCore extends FrontController
{
    public $php_self = 'contactHome';
    public $ssl = true;

    /**
     * Assign template vars related to page content.
     *
     * @see FrontController::initContent()
     */
    public function initContent()
    {
        parent::initContent();

        $this->setTemplate('contactHome');
    }

    public function getBreadcrumbLinks()
    {
        $breadcrumb = parent::getBreadcrumbLinks();

        $breadcrumb['links'][] = [
            'title' => $this->getTranslator()->trans('Contact us', [], 'Shop.Theme.Global'),
            'url' => $this->context->link->getPageLink('contactHome', true),
        ];

        return $breadcrumb;
    }
}

 

Link to comment
Share on other sites

Hello ndiaga, thank you for your answer but I am looking to have 2 different contact forms. a form for the home page, a second for the product page without changing the form on the contact page. Is it possible to do this with the module that you recommended?

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...