Skip to content

Instantly share code, notes, and snippets.

@nanasess
Last active November 9, 2015 02:51
Show Gist options
  • Save nanasess/8541f0f05c722f1fdd2b to your computer and use it in GitHub Desktop.
Save nanasess/8541f0f05c722f1fdd2b to your computer and use it in GitHub Desktop.
SC_Customer::getValue() で任意の項目をリアルタイムに取得する
public function getValue($keyname)
{
// リアルタイム表示
switch ($keyname) {
case 'point':
case 'sf_id:
$objQuery =& SC_Query_Ex::getSingletonInstance();
$value = $objQuery->get($keyname, 'dtb_customer', 'customer_id = ?', array($_SESSION['customer']['customer_id']));
$_SESSION['customer'][$keyname] = $value;
return $value;
default:
return isset($_SESSION['customer'][$keyname]) ? $_SESSION['customer'][$keyname] : '';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment