跳至內容
選單
此問題已被標幟
5972 瀏覽次數

I'm using php and xmlrpc. When I use qty_available, no matter what type of filter using, respond is always all ids.

       $args_search=array(
         new xmlrpcval(array(
                 new xmlrpcval("qty_available","string"), 
                 new xmlrpcval("=","string"),
                 new xmlrpcval("4","string")
          ),
         "array")
       );    
       $sock=new xmlrpc_client($url_obj);
       $msg=new xmlrpcmsg('execute');
       $msg->addParam(new xmlrpcval($db, "string"));
       $msg->addParam(new xmlrpcval($uid, "int"));
       $msg->addParam(new xmlrpcval($pwd, "string"));
       $msg->addParam(new xmlrpcval("product.product", "string"));
       $msg->addParam(new xmlrpcval("search", "string"));
       $msg->addParam(new xmlrpcval($args_search, "array"));
       $resp = $sock->send($msg);
       $val=$resp->value();
       $ids=$val->scalarval();
       $num = count($ids);
         for ($i=0; $i<$num; $i++)
         {
            $id=$ids[$i]->scalarval();
            echo "--> id: ".$id;
         }

I's working fine when use e.g. "price_extra=150" . Do I have to pass some other attribute like location?

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
3月 18
4338
2
3月 15
10533
1
3月 15
7748
1
1月 23
5185
1
4月 21
7536