Jump to content
compret

[FREE Modules] Register / Login to Prestashop with Facebook Connect

Recommended Posts

Alhamdulillah, akhirnya jadi juga nih module...
Tapi sayangnya pas module ini jadi Prestashop 1.3.7 dah final, padahal module ini dibuat pake versi 1.3.6.

Mohon bantuan rekan2 untuk uji coba module ini ya... (saya gk tanggung jawab kalau langsung diinstall di situs yang sudah berjalan)

Blum ada dokumentasi instalasinya, penjelasan singkat sbb:
1. Sebelum install module harus buat FacebookApplication dulu di sini
2. Kita akan pakai AppID dan AppSecret, trus jangan lupa di settingan URL Situs aplikasi di set ke urls Prestashop.
3. Backup dulu situs prestashopnya (PENTING)
4. Download modulenya (lihat attachment)
5. a. Folder 'classes' dikopi ke folder 'classes', overwrite file Customer.php (lebih baik buat backupny)
5. b. Copy folder 'idfbcon' ke dalam fhttp://www.fileserve.com/file/7vJFVmJolder 'modules'
5. c. Copy file 'authentication.php' ke folder root, terakhir copy file 'authentication.tpl' ke 'themes/prestashop/' (dalam kasus ini saya pake theme bawaan, untuk theme yang lain silakan sesuaikan sendiri ya....)
6. Install module dari backoffice, set konfigurasi module (perlu Facebook APP ID dan Facebook Secret dari aplikasi FB yang sudah dibuat di langkah 1).

Kekurangan yang diketahui:
1. jika login menggunakan account yang belum connect dengan facebook, maka tombol facebook ikutan jadi logout (pegennya sih register/login with facebook)
2. banyak lagi kekurangan lain yang perlu dicari (Bantuan rekan2 sangat diperlukan)
===========================================================================
Update versi 0.2
1. one click installation (lewati langkah 5 diatas) = belum saya test

Lihat Demo di sini
Download Guide di sini

IDFBCon_v.0.1.zip

IDFBCon_v.0.2.zip

  • Like 1

Share this post


Link to post
Share on other sites
Alhamdulillah, akhirnya jadi juga nih module...
Tapi sayangnya pas module ini jadi Prestashop 1.3.7 dah final, padahal module ini dibuat pake versi 1.3.6.

Mohon bantuan rekan2 untuk uji coba module ini ya... (saya gk tanggung jawab kalau langsung diinstall di situs yang sudah berjalan)

Blum ada dokumentasi instalasinya, penjelasan singkat sbb:
1. Sebelum install module harus buat Applikasi Facebook dulu di sini
2. Kita akan pakai APP ID dan APP Secret, trus jangan lupa di settingan URL Situs aplikasi di set ke urls Prestashop.
3. Backup dulu situs prestashopnya (PENTING)
4. Download modulenya IDFBCon_v.0.1.zip
5. a. Folder 'classes' dikopi ke folder 'classes', overwrite file Customer.php (lebih baik buat backupny)
5. b. Copy folder 'idfbcon' ke dalam fhttp://www.fileserve.com/file/7vJFVmJolder 'modules'
5. c. Copy file 'authentication.php' ke folder root, terakhir copy file 'authentication.tpl' ke 'themes/prestashop/' (dalam kasus ini saya pake theme bawaan, untuk theme yang lain silakan sesuaikan sendiri ya....)
6. Install module dari backoffice, set konfigurasi module (perlu Facebook APP ID dan Facebook Secret dari aplikasi FB yang sudah dibuat di langkah 1).

Kekurangan yang diketahui:
1. jika login menggunakan account yang belum connect dengan facebook, maka tombol facebook ikutan jadi logout (pegennya sih register/login with facebook)
2. banyak lagi kekurangan lain yang perlu dicari (Bantuan rekan2 sangat diperlukan)

Demo disini
cuman minta subdomain dari temen.


Can you translate step to install this module ?

Share this post


Link to post
Share on other sites
@botmez
you can download instalation guide here


Thx !

Doesn't work with Version 1.3.1.1 ? how to fix it ?

Nadine

Share this post


Link to post
Share on other sites

Hi, can this be downloaded for anywhere else as fileserve.com just won't allow the download

  • Like 1

Share this post


Link to post
Share on other sites

@botmez
Sorry can't help you. How can I help you if you're not providing enough information about why it doesn't works.

@probashi
You can download it from file attachment now.

@mehdi2405
I don't know.

Share this post


Link to post
Share on other sites

@Gamelane
no problem in my test site

@dric83
Thanks for sharing here

@Tropical Dream
v1.4 isn't recommended for production use yet. Probably won't work, cause v1.4 will be different with v1.3,
the promising feature is the capability of overriding Prestashop core. I hope I have the time to port this module to v1.4 when its already released.

Share this post


Link to post
Share on other sites

If the store instead of www.domain.com in www.dominio.com/shop/ does not work.

Share this post


Link to post
Share on other sites

@aqui
yes it's not supported yet, actually you only need to change a few code

Share this post


Link to post
Share on other sites

@Didid
Kasusnya sama dengan aqui kalau prestashop tidak diinstal di root folder, maka modul ini tidak bisa berfungsi.
Sebenarnya tinggal edit beberapa baris code aja, silakan dicari dan edit sendiri.

Share this post


Link to post
Share on other sites

maap bapak, nanya2 terus. kalo "Invalid 'client_id'." itu bukan karena salah daftar di facebooknya? saya sudah memindahkannya ke root, tapi hasilnya masih sama. sekarang situsnya jadi: http://tokoduniaibu.byethost7.com

40324_4CluQg2DCLuJRnk2dGH4_t

40325_aS8v8AIiy4stzh0vAWwC_t

Share this post


Link to post
Share on other sites

tolong dong pak, saya awam banget neh.... apa dan di mana, code yg harus saya edit?

Share this post


Link to post
Share on other sites

I have gone to the root folder the store and it is rare but now gives an error "fatal error" does not work well on 1.3.7

Share this post


Link to post
Share on other sites

i tried login to your demo site 1st time its ok, after logout and try login again and again i got this error:

There is 1 error :
1. fb login authentication failed

  • Like 2

Share this post


Link to post
Share on other sites

I tried to install the module, but I get several errors in my version 1.3;
I run a weird sort of script that makes it difficult to climb to the top of my site (very rare).

I do not see the button by any party to the template I use (www.eluniversodelperro.com) even if it appears in the default template.

Share this post


Link to post
Share on other sites
I tried to install the module, but I get several errors in my version 1.3;
I run a weird sort of script that makes it difficult to climb to the top of my site (very rare).

I do not see the button by any party to the template I use (www.eluniversodelperro.com) even if it appears in the default template.


Find a solution for 1.3.1 ?

Share this post


Link to post
Share on other sites

I so far have not found any solution, because besides the ones who created the issue is not answered.

The button works on the original theme, but not in others and does not work for registration

I am very interested in this module, if anyone has it working properly to send me a message

Share this post


Link to post
Share on other sites
I so far have not found any solution, because besides the ones who created the issue is not answered.

The button works on the original theme, but not in others and does not work for registration

I am very interested in this module, if anyone has it working properly to send me a message


Give me 2 days !
I will be back with this module in 1.3.1 !
Ok ?
Regards,
Nadine

Share this post


Link to post
Share on other sites
i tried login to your demo site 1st time its ok, after logout and try login again and again i got this error:

There is 1 error :
1. fb login authentication failed


error too !!! on test site !!!

43244_G6bvRim9kdZKn2ifgWxG_t

Share this post


Link to post
Share on other sites

Thank you for this great module and sharing. For me it is working on test site but I cant make it work on my site. When I chose to register it point me to regular registration page. My website is suvenircic.com/prestashop . Will it work if it is not in domain root and how to fix it. I use Version 1.3.2.3. Thanks.

Share this post


Link to post
Share on other sites

Salema laykum, baraka ALLAHO FIKA AKHI

Alhamdulillah, akhirnya jadi juga nih module...
Tapi sayangnya pas module ini jadi Prestashop 1.3.7 dah final, padahal module ini dibuat pake versi 1.3.6.

Mohon bantuan rekan2 untuk uji coba module ini ya... (saya gk tanggung jawab kalau langsung diinstall di situs yang sudah berjalan)

Blum ada dokumentasi instalasinya, penjelasan singkat sbb:
1. Sebelum install module harus buat FacebookApplication dulu di sini
2. Kita akan pakai AppID dan AppSecret, trus jangan lupa di settingan URL Situs aplikasi di set ke urls Prestashop.
3. Backup dulu situs prestashopnya (PENTING)
4. Download modulenya (lihat attachment)
5. a. Folder 'classes' dikopi ke folder 'classes', overwrite file Customer.php (lebih baik buat backupny)
5. b. Copy folder 'idfbcon' ke dalam fhttp://www.fileserve.com/file/7vJFVmJolder 'modules'
5. c. Copy file 'authentication.php' ke folder root, terakhir copy file 'authentication.tpl' ke 'themes/prestashop/' (dalam kasus ini saya pake theme bawaan, untuk theme yang lain silakan sesuaikan sendiri ya....)
6. Install module dari backoffice, set konfigurasi module (perlu Facebook APP ID dan Facebook Secret dari aplikasi FB yang sudah dibuat di langkah 1).

Kekurangan yang diketahui:
1. jika login menggunakan account yang belum connect dengan facebook, maka tombol facebook ikutan jadi logout (pegennya sih register/login with facebook)
2. banyak lagi kekurangan lain yang perlu dicari (Bantuan rekan2 sangat diperlukan)
===========================================================================
Update versi 0.2
1. one click installation (lewati langkah 5 diatas) = belum saya test

Lihat Demo di sini
Download Guide di sini

Share this post


Link to post
Share on other sites
I so far have not found any solution, because besides the ones who created the issue is not answered.

The button works on the original theme, but not in others and does not work for registration

I am very interested in this module, if anyone has it working properly to send me a message


Give me 2 days !
I will be back with this module in 1.3.1 !
Ok ?
Regards,
Nadine


Hi @botmez,
Do you have solution for 1.3.1 yet? After installing both 0.1 and 0.2 I got a blank page on admin panel "modules". Look forward to your solution! Thanks in advance.

Share this post


Link to post
Share on other sites

This looks great! Hope it works on 1.4.

I wonder if theres a free module that posts a shopping cart that has been ordered to their facebook wall, the combination of this and the facebook connect module would be great.

Share this post


Link to post
Share on other sites

Hello,

 

I hope too. I 've tried make changed to run this module but i'm not a professional.

Share this post


Link to post
Share on other sites

I get this error and disappears

 

Not Found

 

The requested URL /store/mi-cuenta was not found on this server.

 

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Share this post


Link to post
Share on other sites

Careful guys , dont install , it fuked up my shop . Had to go through the code to know what have been changed.

If you install it and end up with your shop not working just restore the file Customer.php in /class and authentication.php in /

  • Like 2

Share this post


Link to post
Share on other sites

How can use this in the new version?, Help me upgrade my shop to 1.4

Share this post


Link to post
Share on other sites

Will not work on 1.4 because of authentication page that now use FrontController (not this module)

Share this post


Link to post
Share on other sites

Does anyone know of a module that works with version 1.4?

  • Like 1

Share this post


Link to post
Share on other sites

Is It working with prsta 1.1 ? when upload the module with ftp to /myshop/modules/ , the module page in back office is blank.

 

Please help.

Share this post


Link to post
Share on other sites

Hi,

PS I have 1.2.4 and PWA module.

I want to write a login module for facebook for PS version 1.2.4

Unfortunately, after logging into Facebook I get redirected to the shop:

 

http://MY_SITE/authe...on.php?code=AQB[...]W#_=_

 

and I have: Hack attempt.

 

What is wrong?

How to correct file authentication.php for PS 1.2.4?

this part:

/* FB Connect */
//--------------------------------
if (Tools::getValue('fb'))
{
$create_account = 1;
$smarty->assign('email_create', 1);
$smarty->assign('fb_connect',1);
$smarty->assign('appid', Configuration::get('FB_APPID'));
}
if (Tools::getValue('registered')) {
 //echo '<p>signed_request contents:</p>';
 $response = FBTools::parse_signed_request($_REQUEST['signed_request'],Configuration::get('FB_SECRET'));

 $reg_metadata_fields = '[
  {"name":"name"},
  {"name":"first_name"},
  {"name":"last_name"},
  {"name":"email"},
  {"name":"password"},
  {"name":"birthday"},
  {"name":"gender"},
  {"name":"captcha"}]';
 //echo '<pre>';
 //print_r($response);
 //echo '</pre>';
 if (strcmp($reg_metadata_fields,$response['registration_metadata']['fields']) != 0)
  $errors[] = Tools::displayError('registration metadata fields not valid');
 if (Customer::customerExists($response['registration']['email'])){
  //$errors[] = Tools::displayError('someone has already registered with this e-mail address (this module need further development)');
//$smarty->assign('email_create', 1);
//$smarty->assign('existing_user', 1);
//$smarty->assign('appid', Configuration::get('FB_APPID'));

$customer = new Customer();
$authentication = $customer->getByEmail($response['registration']['email']);

$customer->fb_uid = $response['user_id'];
$customer->active = 1;
$customer->deleted = 0;
//$_POST['lastname'] = $response['registration']['last_name'];
//$_POST['firstname'] = $response['registration']['first_name'];
//$_POST['passwd'] = $response['registration']['password'];
//$_POST['email'] = $response['registration']['email'];
//$errors = $customer->validateControler();
$cookie->id_customer = intval($customer->id);
$cookie->customer_lastname = $customer->lastname;
$cookie->customer_firstname = $customer->firstname;
$cookie->logged = 1;
$cookie->passwd = $customer->passwd;
$cookie->email = $customer->email;
if (Configuration::get('PS_CART_FOLLOWING') AND (empty($cookie->id_cart) OR Cart::getNbProducts($cookie->id_cart) == 0))
 $cookie->id_cart = intval(Cart::lastNoneOrderedCart(intval($customer->id)));
Module::hookExec('authentication');
if ($back = Tools::getValue('back'))
 Tools::redirect($back);
Tools::redirect('my-account.php');
$existing_user = 1;
 }

 if (!sizeof($errors))
 {
  $customer = new Customer();
  $customer_birthday = explode('/',$response['registration']['birthday']);
  $customer->birthday = intval($customer_birthday[2]).'-'.intval($customer_birthday[0]).'-'.intval($customer_birthday[1]);
  if ($response['registration']['last_name'] == "male")
   $_POST['id_gender'] = 1;
  else if ($response['registration']['last_name'] == "female")
   $_POST['id_gender'] = 2;
  else
   $_POST['id_gender'] = 9;
  $_POST['lastname'] = $response['registration']['last_name'];
  $_POST['firstname'] = $response['registration']['first_name'];
  $_POST['passwd'] = $response['registration']['password'];
  $_POST['email'] = $response['registration']['email'];
  $errors = $customer->validateControler();
  $customer->fb_uid = $response['user_id'];
if (!sizeof($errors))
{
 $customer->active = 1;
 if (!$customer->add())
  $errors[] = Tools::displayError('an error occurred while creating your account');
 else
 {
  if (!Mail::Send(intval($cookie->id_lang), 'account', 'Welcome!',
  array('{firstname}' => $customer->firstname, '{lastname}' => $customer->lastname, '{email}' => $customer->email, '{passwd}' => $response['registration']['password']), $customer->email, $customer->firstname.' '.$customer->lastname))
   $errors[] = Tools::displayError('cannot send email');
  $smarty->assign('confirmation', 1);
  $cookie->id_customer = intval($customer->id);
  $cookie->customer_lastname = $customer->lastname;
  $cookie->customer_firstname = $customer->firstname;
  $cookie->passwd = $customer->passwd;
  $cookie->logged = 1;
  $cookie->email = $customer->email;
  Module::hookExec('createAccount', array(
   '_POST' => $_POST,
   'newCustomer' => $customer
  ));
  //$fbcookie = FBTools::get_facebook_cookie((Configuration::get('FB_APPID')), (Configuration::get('FB_SECRET'))); 
  if ($back)
   Tools::redirect($back);
  Tools::redirect('my-account.php');

 }
}
 }
}
if (Tools::getValue('fblogin') OR Tools::getValue('code'))
{
$app_id = (Configuration::get('FB_APPID'));
$app_secret = (Configuration::get('FB_SECRET'));
$my_url = "http://".$_SERVER['HTTP_HOST']."/authentication.php";

$code = $_REQUEST["code"];

if(empty($code)) {
$dialog_url = "http://www.facebook.com/dialog/oauth?client_id="
 . $app_id . "&redirect_uri=" . urlencode($my_url);

echo("<script> top.location.href='" . $dialog_url . "'</script>");
}

$token_url = "https://graph.facebook.com/oauth/access_token?client_id="
. $app_id . "&redirect_uri=" . urlencode($my_url) . "&client_secret="
. $app_secret . "&code=" . $code;
$access_token = file_get_contents($token_url);

$graph_url = "https://graph.facebook.com/me?" . $access_token;

$user = json_decode(file_get_contents($graph_url));
$customer = new Customer();
$authentication = $customer->getByEmail($user->email);
//print_r($user);
/* Handle brute force attacks */

sleep(1);
if ($user->id != $customer->fb_uid)
 $errors[] = Tools::displayError('fb login authentication failed');
else
{
 $cookie->id_customer = intval($customer->id);
 $cookie->customer_lastname = $customer->lastname;
 $cookie->customer_firstname = $customer->firstname;
 $cookie->logged = 1;
 $cookie->passwd = $customer->passwd;
 $cookie->email = $customer->email;
 if (Configuration::get('PS_CART_FOLLOWING') AND (empty($cookie->id_cart) OR Cart::getNbProducts($cookie->id_cart) == 0))
  $cookie->id_cart = intval(Cart::lastNoneOrderedCart(intval($customer->id)));
 Module::hookExec('authentication');
 if ($back = Tools::getValue('back'))
  Tools::redirect($back);
 Tools::redirect('my-account.php');
}

}
//--------------------------------

for_PS1.2.4_with_PWA.zip

Share this post


Link to post
Share on other sites

Hi everyone,

Just to say that I install this module (v0.2) my prestashop version : 1.3.7 (I've update my 1.3.1 to 1.3.7 very easily)

 

The module work great unless for one thing, just a line that prevent the fb_uid to be stored in the database during registering.

The wrong line causes 1. fb login authentication failed

 

So :

in the file Customer.php, line 125 :

$this->fb_uid = 0;

replace by

if(empty($this->fb_uid)) $this->fb_uid = 0;

Because most of the time fb_uid contain the user's fb_uid! off course!!

 

If you're already install the module the file is in the folder classes/Customer.php

If you're not install the module the file is in the module folder idfbcon/Customer.php

 

Hope it'll help

 

(attached the same archive that the first post WITH the new line)

IDFBCon_v.0.2.zip

Share this post


Link to post
Share on other sites

@Gamelane

no problem in my test site

 

@dric83

Thanks for sharing here

 

@Tropical Dream

v1.4 isn't recommended for production use yet. Probably won't work, cause v1.4 will be different with v1.3,

the promising feature is the capability of overriding Prestashop core. I hope I have the time to port this module to v1.4 when its already released.

 

dinantikan kalau sudah bisa untuk v1.4.7. kalau boleh dinotifikasi ke gooodel@gmail.com ya... thx. GBU.

Share this post


Link to post
Share on other sites

i tried login to your demo site 1st time its ok, after logout and try login again and again i got this error:

 

There is 1 error :

1. fb login authentication failed

Hola, donde conseguiste el modulo? me lo puedes pasar? gracias

Share this post


Link to post
Share on other sites

sepertinya saya belum menemukan caranya,

 

ada yg punya tutornya untuk edit module ini?

Share this post


Link to post
Share on other sites

Hello i installed this module in presta 1.4 but i have a big problem It's not possible to registered and connecting to my shop and in backoffice i dont see basket and customer !

Help me please

 

I delete this modul but the probleme dont delete

Share this post


Link to post
Share on other sites

i have a problem, when i install, and position on the head of page, after that, i go to my shop, is white page. what's wrong? who konws?

Share this post


Link to post
Share on other sites

hi

any news about a new version of this facebook connect module for prestashop 1.4.8.2 ?

we need a new version of the plugin...

Share this post


Link to post
Share on other sites

Careful guys , dont install , it fuked up my shop . Had to go through the code to know what have been changed.

If you install it and end up with your shop not working just restore the file Customer.php in /class and authentication.php in /

You saved my day! Thank you!

  • Like 3

Share this post


Link to post
Share on other sites

▃ ▄ ▅ ▆ 100%

─▀██▀───▀██▀─▀██──██─▀██▀▀ ▀─

──██─────██───██▄█▀───██▄█───

──██─────██───██▀█▄───██▀█───

─▄██▄▄█─▄██▄─▄██──██─▄██▄▄ ▄

 

 

 

 

batako - kerajinan

Share this post


Link to post
Share on other sites

Hello,

 

Dose any one have a English Guide for this Module that they can place here or email to me?

 

Thanks

Nate

Share this post


Link to post
Share on other sites

Hi everyone,

Just to say that I install this module (v0.2) my prestashop version : 1.3.7 (I've update my 1.3.1 to 1.3.7 very easily)

 

The module work great unless for one thing, just a line that prevent the fb_uid to be stored in the database during registering.

The wrong line causes 1. fb login authentication failed

 

So :

in the file Customer.php, line 125 :

$this->fb_uid = 0;

replace by

if(empty($this->fb_uid)) $this->fb_uid = 0;

Because most of the time fb_uid contain the user's fb_uid! off course!!

 

If you're already install the module the file is in the folder classes/Customer.php

If you're not install the module the file is in the module folder idfbcon/Customer.php

 

Hope it'll help

 

(attached the same archive that the first post WITH the new line)

IDFBCon_v.0.2.zip

 

 

 

 

Is possible to see the Module working on your page?

 

Thank you. i am using presta 1.3.7

Share this post


Link to post
Share on other sites

Hey guys, is this compatible to version 1.5.2 ?

Any1 can publish the guide to the community ?

 

Thanks in advanced.

Share this post


Link to post
Share on other sites

You saved my day! Thank you!

Hey can you help me please, I restore original these 2 files , problem still exists.

Share this post


Link to post
Share on other sites

Hey can you help me please, I restore original these 2 files , problem still exists.

 

Personally I did this and it worked:

Unistall and then delete the module via ftp. Delete the relative raw of the modules table in the database (via PHP My admin). Replace the two files. Clear smarty.

 

Keep in mind that this was in the 1.4 prestas version.

Share this post


Link to post
Share on other sites

did it , deleted folder, deleted from modules db, and replaced files, nothing still the same, can't get in to login window

Please help. Thanks

Share this post


Link to post
Share on other sites

Solved, I had to replace authentication.tpl in theme folder. Thanks can breethe now.

Share this post


Link to post
Share on other sites

Hi,

 

After installing this module, I am getting following error

"

Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "/var/www/home/themes/theme171/authentication.tpl" on line 2 "{include file=$tpl_dir./breadcrumb.tpl}" - Unexpected "/", expected one of: "{" , "$" , "identifier" , INTEGER' in /var/www/home/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php:431 Stack trace: #0 /var/www/home/tools/smarty/sysplugins/smarty_internal_templateparser.php(2855): Smarty_Internal_TemplateCompilerBase->trigger_template_error() #1 /var/www/home/tools/smarty/sysplugins/smarty_internal_templateparser.php(2920): Smarty_Internal_Templateparser->yy_syntax_error(37, '/') #2 /var/www/home/tools/smarty/sysplugins/smarty_internal_smartytemplatecompiler.php(51): Smarty_Internal_Templateparser->doParse(37, '/') #3 /var/www/home/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php(82): Smarty_Internal_SmartyTemplateCompiler->doCompile('{capture name=p...') #4 /var/www/home/tools/smarty/sysplugins/smarty_internal_template.php(261): Smarty in /var/www/home/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 431

"

my prestashop version is 1.4

 

really getting on my nerves.. Need Help!!!!!!!! :-(

Share this post


Link to post
Share on other sites

Please someone help this module when installed on my prestashop 1.5.2 version show this error

Fatal error: Cannot redeclare class Customer in /home8/shoperaa/public_html/classes/Customer.php on line 535

Share this post


Link to post
Share on other sites

Hello

Does your module change some files on the ftp when you install ? (to know if i have to backup something if i want to desinstall it)

Prestashop 1.4.1.0

Thanks

Edited by lanner (see edit history)

Share this post


Link to post
Share on other sites

@lanner, yes it does change be careful, look into the zip file, there is backup folder, i had the issue and i hardly found the solution

  • Like 1

Share this post


Link to post
Share on other sites

Ok thanks, i have seen this alter the sql too, i have another module facebook login who don't work and i have to look if the same line in sql is modified, not simple :)

Share this post


Link to post
Share on other sites

you are welcome, if you find any working module would be glad if you would share it :)

Share this post


Link to post
Share on other sites

this module doesn't work, both in old and new version of shop. Try to contact with developer, maybe him knows something more about that

Share this post


Link to post
Share on other sites

my version Version 1.3.1.1, it;s work fine !...

 

remember... for me.... i change...

 

So :

in the file Customer.php, line 125 :

$this->fb_uid = 0;

replace by
if(gettype($this->fb_uid)==NULL) 
$this->fb_uid = 0;

Share this post


Link to post
Share on other sites

PS 1.5.x work with authController!!

What do you mean work with authController?

Share this post


Link to post
Share on other sites

an idea . . . .

 

all persons post in order, the files , the code , . . . with this module working.....

 

opinion ?

 

explain details... example...

 

in X file.. modified in line 123 . . . X code . . . .

Share this post


Link to post
Share on other sites

To KamranMK, I said that the module is very old for the last version of ps which work with controller

Share this post


Link to post
Share on other sites

Version 1.3.1.1

 

in my clasess/Customer.php

line 128

for me work this change

if(gettype($this->fb_uid)==NULL)
$this->fb_uid = 0;

Edited by miguelrojas (see edit history)

Share this post


Link to post
Share on other sites

PS 1.5.x work with authController!!

 

how can it works in 1.5.x? maybe it can works in 1.4.x too..

Share this post


Link to post
Share on other sites

Hi,

 

There is a way to Override or just to pass the FB authentication to Presta, to work with authcontroller:

 

If one of you want to play with the ideas, it might solve all of the problem and it could work on the new version of Presta

 

For the registration form you can write a module which contains two hook handler functions. These will be:

public function hookCreateAccountForm() {}

public function hookCreateAccount($params) {}

The first function allows you to add additional fields to the registration form (by default these are inserted at the end of the form authentication.tpl, although you could move them all as a single group elsewhere). It should simply return the additional form html you require.

The second function provides you with two parameters to handle the account creation process. This is executed after the standard fields have been validated and the new customer has been created. Unfortunately you cannot do validation on your additional fields using this (you would need to either use javascript or override AuthController to perform your own authentication in the preProcess()member function). In one of my own custom modules for a site I have the following, for example:

public function hookCreateAccount($params)

{

$id_lang = (int)Configuration::get('PS_LANG_DEFAULT');

$customer = $params['newCustomer'];

$address = new Address(Address::getFirstCustomerAddressId((int)$customer->id));

$membership_number = $params['_POST']['membership_number'];

....

....

}

$params['newCustomer'] is a standard Prestashop element in the array and contains the newly created customer object. Your fields will be in the $params['_POST'] array - in my case it was an input field called membership_number.

I just finished working of PRESTA Facebook FANPAGE module. I uploaded the module to one of my latest thread, feel free to use it. ( Working for 1.5.x version - with easy instruction )

Share this post


Link to post
Share on other sites

I get this error message:

 

 

error_log

 

07-Mar-2013 14:55:50] PHP Fatal error: Cannot redeclare class Customer in /home/espirome/public_html/classes/Customer.php on line 535

 

On 1.5.3.1 version.

Share this post


Link to post
Share on other sites

 

Hi @botmez,

Do you have solution for 1.3.1 yet? After installing both 0.1 and 0.2 I got a blank page on admin panel "modules". Look forward to your solution! Thanks in advance.

 

i have the same wrong!

Share this post


Link to post
Share on other sites