Fix: Help for ws service is more clear.
This commit is contained in:
parent
658c95a3e6
commit
c82425c488
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2007 Jean Heimburger <jean@tiaris.info>
|
* Copyright (C) 2007 Jean Heimburger <jean@tiaris.info>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -21,37 +21,37 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/oscommmerce_ws/includes/configure.php
|
* \file htdocs/oscommmerce_ws/includes/configure.php
|
||||||
\ingroup oscommerce_ws
|
* \ingroup oscommerce_ws
|
||||||
\brief Configuration client Webservice
|
* \brief Configuration client Webservice
|
||||||
\version $Revision$
|
* \version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//base url des webservices
|
// URL To reach web services
|
||||||
|
define(OSCWS_DIR,'http://myoscserver/ws_server/');
|
||||||
|
|
||||||
|
// URL To reach OSCommerce
|
||||||
|
define(OSC_URL, 'http://myoscserver/'); // url du site OSC
|
||||||
|
|
||||||
|
|
||||||
define(OSCWS_DIR,'http://www.tiaris.info/catalog/ws_OSC/');
|
|
||||||
|
|
||||||
define(OSC_URL, 'http://www.tiaris.info/catalog/'); // url du site OSC
|
|
||||||
|
|
||||||
//affichages dans la page d'accueil
|
//affichages dans la page d'accueil
|
||||||
define(OSC_MAXNBCOM, 5);
|
define(OSC_MAXNBCOM, 5);
|
||||||
define(OSC_ORDWAIT,'4'); // code du statut de commande en attente
|
define(OSC_ORDWAIT,'4'); // code du statut de commande en attente
|
||||||
define(OSC_ORDPROCESS,'1'); // code du statut de commande en traitement
|
define(OSC_ORDPROCESS,'1'); // code du statut de commande en traitement
|
||||||
//
|
|
||||||
|
|
||||||
define(OSC_ENTREPOT, 1); //l'entrepot lié au stock du site web
|
define(OSC_ENTREPOT, 1); //l'entrepot lie au stock du site web
|
||||||
define(TX_CURRENCY, 1); // le taux de conversion monnaie site osc - monnaie dolibarr (1 euro = 119.33 XPF)
|
define(TX_CURRENCY, 1); // le taux de conversion monnaie site osc - monnaie dolibarr (1 euro = 119.33 XPF)
|
||||||
define(NB_DECIMALS, 2);
|
define(NB_DECIMALS, 2);
|
||||||
define(NB_DECIMALSITE, 2); // nb de décimales sur le site
|
define(NB_DECIMALSITE, 2); // nb de decimales sur le site
|
||||||
define(FK_PORT, 2); // l'id du service frais de port défini.
|
define(FK_PORT, 2); // l'id du service frais de port defini.
|
||||||
|
|
||||||
// fonctions
|
// fonctions
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief assure la conversion en monnaie de dolibarr
|
* \brief assure la conversion en monnaie de dolibarr
|
||||||
* \param oscid Id du produit dans OsC
|
* \param oscid Id du produit dans OsC
|
||||||
* \param prodid champ référence
|
* \param prodid champ r<EFBFBD>f<EFBFBD>rence
|
||||||
* \return int <0 si ko, >0 si ok
|
* \return int <0 si ko, >0 si ok
|
||||||
*/
|
*/
|
||||||
function convert_price($price)
|
function convert_price($price)
|
||||||
@ -62,7 +62,7 @@ define(FK_PORT, 2); // l'id du service frais de port d
|
|||||||
/**
|
/**
|
||||||
* \brief assure la conversion en monnaie de dolibarr
|
* \brief assure la conversion en monnaie de dolibarr
|
||||||
* \param oscid Id du produit dans OsC
|
* \param oscid Id du produit dans OsC
|
||||||
* \param prodid champ référence
|
* \param prodid champ r<EFBFBD>f<EFBFBD>rence
|
||||||
* \return int <0 si ko, >0 si ok
|
* \return int <0 si ko, >0 si ok
|
||||||
*/
|
*/
|
||||||
function convert_backprice($price)
|
function convert_backprice($price)
|
||||||
|
|||||||
@ -3,7 +3,7 @@ OSCommerce interface and Dolibarr
|
|||||||
|
|
||||||
TODO ON THE OSCOMMERCE WEBSITE INSTALLATION :
|
TODO ON THE OSCOMMERCE WEBSITE INSTALLATION :
|
||||||
|
|
||||||
Copy the contents of the ws_server directory on the OSCommerce web server.
|
Copy the directory ws_server and its content on the OSCommerce web server.
|
||||||
This includes the lib directory which contains the nusoap library, the
|
This includes the lib directory which contains the nusoap library, the
|
||||||
includes directory which contains the configure.php file and the ws_* files.
|
includes directory which contains the configure.php file and the ws_* files.
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,3 @@
|
|||||||
|
<?php
|
||||||
|
header("Location: ws_index.html");
|
||||||
|
?>
|
||||||
@ -23,19 +23,6 @@ set_magic_quotes_runtime(0);
|
|||||||
|
|
||||||
require_once("./includes/configure.php");
|
require_once("./includes/configure.php");
|
||||||
|
|
||||||
define(OSC_IMG_URL, 'http://www.tiaris.info/catalog/images/'); // url du site OSC
|
|
||||||
|
|
||||||
// OSC
|
|
||||||
|
|
||||||
define('OSCADMIN', '/home/tiaris.info/catalog/admin/');
|
|
||||||
define('OSCIMAGES', '/home/tiaris.info/catalog/images/');
|
|
||||||
|
|
||||||
require(OSCADMIN.'includes/configure.php');
|
|
||||||
require(OSCADMIN.DIR_WS_CLASSES . 'object_info.php');
|
|
||||||
require(OSCADMIN.DIR_WS_INCLUDES . 'database_tables.php');
|
|
||||||
require(OSCADMIN.DIR_WS_FUNCTIONS . 'database.php');
|
|
||||||
require(OSCADMIN.DIR_WS_FUNCTIONS . 'general.php');
|
|
||||||
|
|
||||||
|
|
||||||
// Soap Server.
|
// Soap Server.
|
||||||
require_once('./lib/nusoap.php');
|
require_once('./lib/nusoap.php');
|
||||||
@ -59,7 +46,7 @@ function create_article($prod)
|
|||||||
// make a connection to the database... now
|
// make a connection to the database... now
|
||||||
tep_db_connect() or die('Unable to connect to database server!');
|
tep_db_connect() or die('Unable to connect to database server!');
|
||||||
|
|
||||||
// vérifier les paramètres
|
// v<>rifier les param<61>tres
|
||||||
$sql_data_array = array('products_quantity' => $prod['quant'],
|
$sql_data_array = array('products_quantity' => $prod['quant'],
|
||||||
'products_model' => $prod['ref'],
|
'products_model' => $prod['ref'],
|
||||||
'products_image' => $prod['image'],
|
'products_image' => $prod['image'],
|
||||||
@ -167,7 +154,7 @@ function saveImage($name,$content)
|
|||||||
$fich = fopen(OSCIMAGES.$name, 'wb');
|
$fich = fopen(OSCIMAGES.$name, 'wb');
|
||||||
fwrite($fich,base64_decode($content));
|
fwrite($fich,base64_decode($content));
|
||||||
fclose($fich);
|
fclose($fich);
|
||||||
return $name.' enregistré';
|
return $name.' enregistr<EFBFBD>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -15,6 +15,11 @@ your server OSCommerce.<br>
|
|||||||
<br>
|
<br>
|
||||||
Those pages will be called by Dolibarr using its own SOAP web service client.<br>
|
Those pages will be called by Dolibarr using its own SOAP web service client.<br>
|
||||||
<br>
|
<br>
|
||||||
However, don't forget to edit the configure.php file in the ws_server/includes directory.<br>
|
However, don't forget to edit the <br>
|
||||||
|
* configure.php file in the OSCommerce server side (in ws_server/includes directory) to define
|
||||||
|
how to connect to the OSCommerce database.<br>
|
||||||
|
* configure.php file in the Dolibarr server side (in oscommerce_ws/includes directory) to define
|
||||||
|
how to connect to the OSCommerce server side web services.<br>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Loading…
Reference in New Issue
Block a user