Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
5980 Prikazi

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?

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
0
mar. 18
4339
2
mar. 15
10533
1
mar. 15
7748
1
jan. 23
5185
1
apr. 21
7540