0
votes

Newbie in PrestaShop.

I am using PrestaShop version 1.6.1.6.

I want to implement login with facebook functionality on my site.

I have downloaded PrestaShop FaceBook Connect from https://www.modulebazaar.com/prestashop-facebook-connect.html

Installation / Configuration and everything works good.

From Read-me documentation i have placed short code at my authentication.tpl file.

enter image description here

themes\leo_green\authentication.tpl

<div class="col-xs-12 col-sm-6 col-md-6">
        <form action="{$link->getPageLink('authentication', true)|escape:'html':'UTF-8'}" method="post" id="login_form" class="box panel panel-default">
            <h3 class="panel-heading">{l s='Already registered?'}</h3>
            {$HOOK_EGR_FBLOGIN}
            <div class="form_content panel-body clearfix">
                <div class="form-group">
                    <label for="email">{l s='Email address'}</label>
                    <input class="is_required validate account_input form-control" data-validate="isEmail" type="email" id="email" name="email" value="{if isset($smarty.post.email)}{$smarty.post.email|stripslashes}{/if}" />
                </div>
                <div class="form-group">
                    <label for="passwd">{l s='Password'}</label>
                    <input class="is_required validate account_input form-control" type="password" data-validate="isPasswd" id="passwd" name="passwd" value="" />
                </div>
                <p class="lost_password form-group"><a href="{$link->getPageLink('password')|escape:'html':'UTF-8'}" title="{l s='Recover your forgotten password'}" rel="nofollow">{l s='Forgot your password?'}</a></p>
                <p class="submit">
                    {if isset($back)}<input type="hidden" class="hidden" name="back" value="{$back|escape:'html':'UTF-8'}" />{/if}
                    <button type="submit" id="SubmitLogin" name="SubmitLogin" class="button btn btn-outline button-medium">
                        <span>
                            <i class="fa fa-lock left"></i>
                            {l s='Sign in'}
                        </span>
                    </button>
                </p>
            </div>
        </form>
    </div>

The code {$HOOK_EGR_FBLOGIN} has been added.

Notice: Undefined index: HOOK_EGR_FBLOGIN in C: \ wamp64 \ www \ project \ tools \ smarty \ sysplugins \ smarty_internal_templatebase.php (171): eval () 'code on line 154

Notice: Trying to get property of non-object in C: \ wamp64 \ www \ project \ tools \ smarty \ sysplugins \ smarty_internal_templatebase.php (171): eval () 'd code on line 154

I have tried to clear cache also delete cache folder.

Any help would be appreciated.

EDIT

I have already set

Admin -> Advanced Parameters -> Performance -> Disable all Overrides -> No 

Update 1

getting same error while installing another module for facebook login.

Login with facebook prestashop 1.6 using OneAll Social Login module

1

1 Answers

1
votes

I'm not acquainted with these modules but it seems that such variable isn't defined in the main module .php file. I recommend you to check it out because it may be that documentation is obsolete and now it uses a different way to transfer hook's information. Like a hookErgFbLogin or something like this. In this case, you need to invoke the hook with such code

{hook h='hookErgFbLogin'}

Hope this gonna help you