Salut Bruno ! ;-)<br><br>In your script your are using the database's names of your custom fields.<br><br>You should make sure theses are the names to use by trying a DoDescribe.<br><br>Try :<br><br>$decribe_infos = $client->doDescribe('SalesOrder');<br>
print_r($describe_infos);<br><br>You'll get the actual names for the fields.<br><br clear="all">David V.<br>
<br><br><div class="gmail_quote">2009/11/2 Fusioncore <span dir="ltr"><<a href="mailto:ml@arceva.fr">ml@arceva.fr</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
This is the script.<br>
I don't find the info about the product and service add syntax. but it's<br>
plan on a second time<br>
<br>
$client = new Vtiger_WSClient($crm_url);<br>
<br>
$login = $client->doLogin($crm_username, $crm_accesskey);<br>
if(!$login)<br>
echo 'Login Failed';<br>
else<br>
{<br>
echo "Login Successful<br />";<br>
$module = 'SalesOrder';<br>
<br>
$record = $client->doCreate($module,<br>
array(<br>
'subject'=>"$pack_number",<br>
'duedate'=>"$_t",<br>
'description'=>"$comment_t",<br>
'recurring_frequency'=>"$bill_reccuring_t",<br>
'cf_548'=>"$pay_method",<br>
'cf_547'=>"$ip",<br>
'cf_546'=>"$date",<br>
'cf_540'=>"$pack_number",<br>
'accountid'=>"$account_number",<br>
'sostatus'=>"$sostatus",<br>
'total'=>"$total",<br>
'subtotal'=>"$subtotal",<br>
'taxtype'=>"$taxtype",<br>
'contactid'=>"$fact_contactid",<br>
)<br>
);<br>
$error = $client->lasterror();<br>
if($error) {echo $error['code'] . ' : ' . $error['message'];<br>
}<br>
<br>
if($record) {<br>
$salesorderid = $client->getRecordId($record['id']);<br>
}<br>
echo "<br />new SaleOrder id : $salesorderid <br />";<br>
}<br>
<br>
When my website will be open, I think I clean my code and enhance the<br>
css and translation to publish it on the extension vtiger site. It's a<br>
complete commerce solution totaly integrate with vtiger.<br>
<br>
Thanks for your help,<br>
<div class="im"><br>
Bruno<br>
French-vtiger Manager<br>
<br>
<br>
Prasad a écrit :<br>
> Hi Bruno,<br>
><br>
</div><div class="im">> Can you share the script?<br>
><br>
</div><div><div></div><div class="h5">> On 11/2/09, *Fusioncore* <<a href="mailto:ml@arceva.fr">ml@arceva.fr</a> <mailto:<a href="mailto:ml@arceva.fr">ml@arceva.fr</a>>> wrote:<br>
><br>
> Hi Prasad,<br>
><br>
> The encode problem was solve by the update with the last release<br>
> of the<br>
> vtwsclib.<br>
> But I have a new problem. When I use DoCreate action to create a<br>
> salesorder, I have this error : ACCESS_DENIED : Permission to perform<br>
> the operation is denied<br>
><br>
> The vtwslib user have all write permission on the crm. Do you have<br>
> an idea ?<br>
><br>
><br>
> Thanks,<br>
><br>
> Bruno<br>
> French-vtiger manager<br>
><br>
><br>
><br>
> Prasad a écrit :<br>
> > Hi Bruno,<br>
> ><br>
><br>
> > php curl is required by vtwsclib and recommended to be present for<br>
> > vtiger CRM as well.<br>
> ><br>
> > I was pointing to<br>
> > <a href="http://in2.php.net/manual/en/function.urlencode.php#92424" target="_blank">http://in2.php.net/manual/en/function.urlencode.php#92424</a>, for<br>
> > urlencode API<br>
> ><br>
> > Its used in:<br>
> ><br>
> > * function doGet (Vtiger_HTTP_Client) and<br>
> > * function send_post_data (Curl_HTTP_Client, file:<br>
> > vtwsclib/third-party/curl_http_client.php)<br>
> ><br>
> > Regards,<br>
> > Prasad<br>
> > vtiger Team<br>
> ><br>
><br>
> > On 10/7/09, *Fusioncore* <<a href="mailto:ml@arceva.fr">ml@arceva.fr</a> <mailto:<a href="mailto:ml@arceva.fr">ml@arceva.fr</a>><br>
</div></div><div><div></div><div class="h5">> <mailto:<a href="mailto:ml@arceva.fr">ml@arceva.fr</a> <mailto:<a href="mailto:ml@arceva.fr">ml@arceva.fr</a>>>> wrote:<br>
> ><br>
> > php curl must be install on both server ?<br>
> > My class was on the website server and vtiger was on an<br>
> other server.<br>
> > Actually curl was present only on the website server<br>
> > I don't understand your other hint urlencode API, where she<br>
> is use ?<br>
> > I search on the HTTP_Client.php and I return my feedback soon<br>
> ><br>
> ><br>
> > Thanks,<br>
> ><br>
> > Bruno<br>
> > French-vtiger manager<br>
> ><br>
> ><br>
> > Prasad a écrit :<br>
> ><br>
> > > Hi Bruno,<br>
> > ><br>
> > > PHP CURL API's are used to handle the communication.<br>
> > > You might need to tune the UTF-8 support in function<br>
> __construct of<br>
> > > class Vtiger_HTTP_Client (file:<br>
> vtwsclib/Vtiger/Net/HTTP_Client.php)<br>
> > ><br>
> > > I found the following article to be related:<br>
> > > <a href="http://markmail.org/message/m27ctd3qzzg7ts3i" target="_blank">http://markmail.org/message/m27ctd3qzzg7ts3i</a><br>
> > > Please update if you find any information.<br>
> > ><br>
> > > Another hint: urlencode API is being used which could be<br>
> causing<br>
> > issue<br>
> > > with UTF-8, please watch out during your analysis.<br>
> > ><br>
> > > Regards,<br>
> > > Prasad<br>
> > > vtiger Team<br>
> > ><br>
> ><br>
> > > On 10/7/09, *Fusioncore* <<a href="mailto:ml@arceva.fr">ml@arceva.fr</a><br>
> <mailto:<a href="mailto:ml@arceva.fr">ml@arceva.fr</a>> <mailto:<a href="mailto:ml@arceva.fr">ml@arceva.fr</a> <mailto:<a href="mailto:ml@arceva.fr">ml@arceva.fr</a>>><br>
><br>
> > <mailto:<a href="mailto:ml@arceva.fr">ml@arceva.fr</a> <mailto:<a href="mailto:ml@arceva.fr">ml@arceva.fr</a>><br>
> <mailto:<a href="mailto:ml@arceva.fr">ml@arceva.fr</a> <mailto:<a href="mailto:ml@arceva.fr">ml@arceva.fr</a>>>>> wrote:<br>
> > ><br>
> > > Hi,<br>
> > > I have create a bridge who sent my website user on the<br>
> account<br>
> > > table on<br>
> > > vtiger.<br>
> > > This bridge extract data from the website database<br>
> (utf8_general<br>
> > > encode)<br>
> > > and send it to vtiger with vtwsclib. (vtiger database was<br>
> > full utf8)<br>
> > > I have a problem with the accent on some string. For<br>
> example, I<br>
> > > have an<br>
> > > address "Avenue Jean Sébastien BACH" on my website and<br>
> when<br>
> > I sync<br>
> > > with<br>
> > > crm, the address save on the crm was "Avenue Jean S"<br>
> > > Does vtwsclib support accent ?<br>
> > ><br>
> > > Thanks,<br>
> > ><br>
> > > Bruno<br>
> > > French-vtiger manager<br>
> > > _______________________________________________<br>
> > > Reach hundreds of potential candidates -<br>
> <a href="http://jobs.vtiger.com" target="_blank">http://jobs.vtiger.com</a><br>
> > ><br>
> > ><br>
> ><br>
> > ><br>
> ><br>
> ------------------------------------------------------------------------<br>
> ><br>
> > ><br>
> > > _______________________________________________<br>
> > > Reach hundreds of potential candidates -<br>
> <a href="http://jobs.vtiger.com" target="_blank">http://jobs.vtiger.com</a><br>
> > _______________________________________________<br>
> > Reach hundreds of potential candidates - <a href="http://jobs.vtiger.com" target="_blank">http://jobs.vtiger.com</a><br>
> ><br>
> ><br>
><br>
> ><br>
> ------------------------------------------------------------------------<br>
><br>
> ><br>
> > _______________________________________________<br>
> > Reach hundreds of potential candidates - <a href="http://jobs.vtiger.com" target="_blank">http://jobs.vtiger.com</a><br>
> _______________________________________________<br>
> Reach hundreds of potential candidates - <a href="http://jobs.vtiger.com" target="_blank">http://jobs.vtiger.com</a><br>
><br>
><br>
</div></div>> ------------------------------------------------------------------------<br>
<div><div></div><div class="h5">><br>
> _______________________________________________<br>
> Reach hundreds of potential candidates - <a href="http://jobs.vtiger.com" target="_blank">http://jobs.vtiger.com</a><br>
_______________________________________________<br>
Reach hundreds of potential candidates - <a href="http://jobs.vtiger.com" target="_blank">http://jobs.vtiger.com</a><br>
</div></div></blockquote></div><br>