Skip to content

Instantly share code, notes, and snippets.

@yokotak0527
Created July 19, 2012 01:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yokotak0527/3140103 to your computer and use it in GitHub Desktop.
Save yokotak0527/3140103 to your computer and use it in GitHub Desktop.
welcart 拡張プラグイン WCEX MobileのオブジェクトでPC、スマホ、ガラケーの分岐
// welcart 拡張プラグイン WCEX Mobile
// http://www.welcart.com/archives/1626.html
// $wcmbのプロパティで環境ごとの分岐ができそうだったのでメモ
// ガラケーかどうかの判定っぽい。返り値はintかboolian
// PCで0:int スマホで10:int ガラケーでtrue:bool
$wcmb['check_garak']
// デバイスの名前が入ってる
// PCだとPC:string スマホ、ガラケーだと機種名
$wcmb['device_name']
// PCで0 スマホで10 ガラケーで3になる
// $wcmb['device_div']
// というのがあるけどこれはなんだろう・・・
// あとガラケーだけ
// $wcmb["target"]
// 中身はtrue:boolが出来る。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment