ajnglagla Posted February 1, 2014 Share Posted February 1, 2014 (edited) Hello, I have bought a product review with facebook login module and i am trying to pull "facebook user id" from database. I will use this value to show their profile photo near their name. But somehow i can not pull the "facebook user id" value from database. Can you please help me, Am i missing something? in class/reviewhelp.class.php public function getUserPhoto($data=null){ $id_customer = (int) $data['id_customer']; //get info about fb id $result2 = Db::getInstance()->GetRow(' SELECT * FROM `'._DB_PREFIX_.'fb_customer` WHERE `customer_id` = '.$id_customer.' '); if($result2){ $fbuserid = $result2['fb_id']; } else { $fbuserid = "nofacebook"; } return $fbuserid; } In productreviewfb.php $smarty->assign(array($this->name.'fbuserid' => $fbuserid)); In review.tpl {$fbuserid} {if isset($fbuserid)}exist{else}not exist{/if} Sadly output is always "not exist" and does not show the value of $fbuserid Where i am doing wrong? Edited February 1, 2014 by ajnglagla (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted February 2, 2014 Share Posted February 2, 2014 $this->name.'fbuserid' your variable fbuserid doesnt exsit because of $this->name, so your variable in fact looks like somenamefbuserid remove $this->name for what purposes you use this ? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now