Strict Standards: Declaration of action_plugin_blog::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/lib/plugins/blog/action.php on line 13

Strict Standards: Declaration of action_plugin_indexmenu::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/lib/plugins/indexmenu/action.php on line 13

Strict Standards: Declaration of action_plugin_importoldchangelog::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/lib/plugins/importoldchangelog/action.php on line 8

Strict Standards: Declaration of action_plugin_importoldindex::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/lib/plugins/importoldindex/action.php on line 8

Strict Standards: Declaration of action_plugin_include::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/lib/plugins/include/action.php on line 19

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/parserutils.php on line 208

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/parserutils.php on line 211

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/parserutils.php on line 421

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/parserutils.php on line 594

Strict Standards: Declaration of cache_instructions::retrieveCache() should be compatible with cache::retrieveCache($clean = true) in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/cache.php on line 291

Deprecated: Function split() is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/auth.php on line 154

Strict Standards: Only variables should be passed by reference in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/doku.php on line 73
おろしのかーとをつくろう [開発チーム]

Deprecated: Function split() is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/parser/lexer.php on line 517

Deprecated: Function split() is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/parser/lexer.php on line 517

Deprecated: Function split() is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/parser/lexer.php on line 517

Deprecated: Function split() is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/parser/lexer.php on line 517

Deprecated: Function split() is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/parser/lexer.php on line 517

Deprecated: Function split() is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/parser/lexer.php on line 517
Writing /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/data/cache/f/f8572e666088ab7bd18f87682f61a357.i failed
Unable to save cache file. Hint: disk full; file permissions; safe_mode setting.

Deprecated: Function split() is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/parser/metadata.php on line 296

Deprecated: Function split() is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/parser/lexer.php on line 517

Deprecated: Function split() is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/parser/lexer.php on line 517

Deprecated: Function split() is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/parser/lexer.php on line 517

Deprecated: Function split() is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/parser/lexer.php on line 517

Deprecated: Function split() is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/parser/lexer.php on line 517

Deprecated: Function split() is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/parser/lexer.php on line 517
Writing /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/data/cache/f/f8572e666088ab7bd18f87682f61a357.i failed
Unable to save cache file. Hint: disk full; file permissions; safe_mode setting.
Writing /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/data/cache/9/9898519f505a9a2acb1a12f6c431ff66.code failed
Writing /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/data/cache/a/a1b9dd40a7da793e9b685516acc2dbc9.code failed
Writing /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/data/cache/e/edd09553b6374b3acd104b2842722210.code failed
Writing /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/data/cache/f/f8572e666088ab7bd18f87682f61a357.xhtml failed

かーと

  • http://market-jp.fideli.com/へカート機能をつけるよ
    • かーと?
      • よくあるやつですね
      • ログインしないと使えないという感じで

やること

詳細ページに

  • 下記のような個数入力フォームをつくる

\\192.168.0.111\sysad\ソフトチーム\グローバルマーケット関連\かーと\1.JPG

<script language = "javascript">
<!--
 function check(){
   var counts = document.getElementById("counts").value;
   if("数字チェック" && "未入力チェック"){
     return true;
   }else{
     alert("個数を正しくにゅうりょくしてね");
     return false;
   }
 }
-->
</script>
<form onsubmit="return check();" name="" method="get" action="/market_jp/cart.php">
  <input type="text" size="7" maxlength="6" id="counts" name="counts" value=""><br />
  <input type="submit" name="" value="かーとへいれる">
  <!-- 必要に応じてhiddenでパラメータを -->
  <input type="hidden" name="op_uniqnum" value="{$op_uniqnum}">
  <input type="hidden" name="cart_type" value="add"><!-- まぁてきとうに -->
</form>

/m_food/cart.phpを作る

// フィデリのフレームワークに乗せるとクッキーが書けないのでベタPHPを用意
 
ini_set( "session.cookie_domain", '.fideli.com' );
session_start();
 
$p = $_GET;
// 追加
if(isset($g["type"]) && $g["type"] == "add" && $op_uniqnum = getInt($g["op_uniqnum"])
 && $counts = getInt($g["counts"])
){
  $time = time() + (60 * 60 * 24 * 365);
// 配列でくっきに保存 $_COOKIE["COOKIE_OROSHI_CART"]["商品番号"] = 個数
  setcookie("COOKIE_OROSHI_CART[".$op_uniqnum."]", $counts , $time ,'/', ".fideli.com");
}
 
header("Location : /market_jp/m/cart/まぁ適当に");
exit
function getInt($value, $default=0){
  $out_value = $default;
  if(!isset($value)){
    return $default;
  }
  $out_value = $value;
  if(preg_match("/^\d+$/i",$out_value)){
    return $out_value;
  }
  return $default;
}

かーとの中身を表示させる /m_food/classes/oroshi***Class.phpを作る

  • ログインしてなかったら強制的にログインフォームへぐばい
// 最終的にはログインしたら帰ってこれる、そんな感じがいいな。
header("Location: /market_jp/?id=refresh&path=".urlencode(urldecode($session["path"])));

\\192.168.0.111\sysad\ソフトチーム\グローバルマーケット関連\かーと\2.JPG

  • 親クラスには class oroshi***Class extends oroshiParent {
$ops = array();
$ops2 = array();
if(isset($_COOKIE["COOKIE_OROSHI_CART"])){
 foreach($_COOKIE["COOKIE_OROSHI_CART"] as $op => $count){
  // 念の為セキュリティーちぇっく
   if(preg_match("/^\d+$/",$op) && preg_match("/^\d+$/",$count) && $count > 0){
     $ops[$op] = $count;
     $ops2[$op] = $op;
   }
 }
}
if($ops){
 // カートに入っているしょうひんを取得
  $sql = "select からむをちゃんと指定 from oroshi_product where op_uniqnum in(".join(",",$ops2).") and ".$this->oroshiCommon->specialBuyerSql()." op_status = 1";
 
 // ぐるぐる
 foreach($res as $k => $v){
  // きぼうこすうをついか
   $res[$k]["count"] = $ops[$v["op_uniqnum"]];
   $res[$k]["金額"] = $ops[$v["op_uniqnum"]] * $v["単価"]; // 税についてはかくにんして
 }
 $this->assgin("りすと",$res);
}
 
// で、このかーとの中ではimageのように数を変更したり削除できたりするようにします
 
/*
 * ★注意★
 * カート内のデータはクッキーの操作になるのでさっき作った
 * /m_food/cart.phpに機能追加して、その中でせいぎょします
 */
  • あたまのつかいどころやヒント
    1. カートへの追加と更新(addとupdate)は同じロジックでも動く?
    2. 詳細からの追加は1つの商品だけの追加だけどカート内からの変更、削除は複数商品分同時に更新しなきゃならない?
    3. レジへ進む時には 商品番号をクッキーで渡すのではなく、hiddenでPOSTでもってこう

れじ(こうにゅうすてっぷ)

  • buyerFormClass を複数同時購入版にするイメージ
    1. fideli_biz/classes/parent/market/orderMarketParentClass.php が近い?
    2. テーブルを2つ用意する必要があるね(1つでも良いけど2つのほうがめんどくさいけど楽だよ)
    3. 送料のロジックがかわるから超注意卸依頼のまとめ200905
  • 遷移は現状の卸の流れと同じ
    1. 入力 → 確認 → 完了
    2. 完了したらクッキーのデータを削除します

\\192.168.0.111\sysad\ソフトチーム\グローバルマーケット関連\かーと\3.JPG
\\192.168.0.111\sysad\ソフトチーム\グローバルマーケット関連\かーと\4.JPG

おろしのかーとをつくろう.txt · 最終更新: 2010/07/27 15:46 (外部編集)
www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0

Strict Standards: Only variables should be passed by reference in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/doku.php on line 81