Frontaccounting SimpleAPI Module guide
- Article
- Comment (4)
Frontaccounting SimpleAPI Module guide is one of a good way to integrate your products lists from your Frontaccounting to Your eCommerce Store. Here is an simple Helping tutorial to install SimpleAPI on your FA and which will be accessed from remote. Let’s start integration.
First get a copy of SimplAPI module from the Author “Andrés Amaya Díaz “. Here is the link to get the zip of the SimpleAPI module.
And now goto your installed Frontaccoutning directory and open “modules/ ” and extract the zip into it. Than rename the Extracted folder name “FrontAccountingSimpleAPI-master ” into your desired name ” here i just renamed it as ” kvcodes ” . Than move to your browser and goto Install Extension in the Setup page .
Now, it will appear in the list, just install it, and you have one more important work here. Goto your modules directory and open your SimpleAPI module folder than find, util.php and open it on text editor, and here, you need to change the company name, user name and password with your Working FA details and Save it.
$company = '0'; // Company extension, you gave it while creating company $user = 'kvcodes'; // username $password = 'login_password'; //password
and open your browser and open
http://your-fa-url/modules/kvcodes/. This is the testing url. if you encounter any error than it will be the problem of Slim framework or you gave wrong login credentials,
Now, we need to test the API on Remote Server, The following code helps you to test it on remote.
<?php $action = 'customers'; $headers = array('X_company: 0', 'X_user: admin', 'X_password: 123456'); $url = "http://www.your-fa-installation.com/modules/kvcodes/$action/"; // create a new cURL for data retrieval $ch = curl_init(); curl_setopt($ch,CURLOPT_HTTPHEADER,$headers); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, 0); ob_start(); curl_exec($ch); $content = ob_get_contents(); ob_end_clean(); curl_close($ch); echo print_r(json_decode($content, true), true); ?>
This will list you the JSON encoded Customer list gathered from the customers table,
Hello,
Could you please tell me is it possible to use this solution for integration between Vtiger (CRM) and FA?
Best and Regards,
DUC
yes, you can use it and retrieve the data to Vtiger as well.
Hello,
Thank you for this guide.
After I point to domain: http://your-fa-url/modules/kvcodes/ , I got an error as below:
include_once(../../modules/api/sync_db.inc): failed to open stream: No such file or directory in file: /home/hockieum/public_html/ketoan/modules/FrontAccountingSimpleAPI-master/session-custom.inc at line 227
include_once(): Failed opening ‘../../modules/api/sync_db.inc’ for inclusion (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in file: /home/hockieum/public_html/ketoan/modules/FrontAccountingSimpleAPI-master/session-custom.inc at line 227
Could you please tell me why I got the errors? I have done all step you post before.
Thank you again and happy new years to you.
Best and Regards,
DUC
This is the path issue, try use find and replace,
find ” FrontAccountingSimpleAPI-master”
with ” kvcodes ” .
it will work properly.