Hi,
Please forgive my innocence in asking this matter. Does anyone know how to Integrate livecode apps to my existing Joomla/wordpress website with eCommerce features and functionality?
for example,
I have a joomla or wordpress website and I want to show all the contents especially my ecommerce page where user can see each product details and also user can do purchase using the mobile apps.
Appreciate for any guidance.
Denzio
LiveCode Apps integration with Joomla or Wordpress
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: LiveCode Apps integration with Joomla or Wordpress
Joomla and Wordpress both support XML-RPC (webservices).
So the answer is... YES.
From LiveCode Desktop (Windows, MacOS, Linux) you can "pilot" your web app, using the XML-RPC protocol.
If you know nothing about it, you'll have to suffer a little bit, in order to learn :
-XMLRPC library and XML tags, and probably XML library
-arrays and how to manipulate them
-UTF8 (rich text)
-and probably datagrids (to display large informations coming from your web app)
-last but not least the XML API of Joomla and Wordpress ! ( = names of commands + syntax + required parameters)
etc.
For Mobile, it's.... more tricky because the XMLRPC library is missing. But you can bypass the problem by using direct POST queries sent to the web server (by creating first the proper http header then the XML query that will be sent).
So the answer is... YES.
From LiveCode Desktop (Windows, MacOS, Linux) you can "pilot" your web app, using the XML-RPC protocol.
If you know nothing about it, you'll have to suffer a little bit, in order to learn :
-XMLRPC library and XML tags, and probably XML library
-arrays and how to manipulate them
-UTF8 (rich text)
-and probably datagrids (to display large informations coming from your web app)
-last but not least the XML API of Joomla and Wordpress ! ( = names of commands + syntax + required parameters)
etc.
For Mobile, it's.... more tricky because the XMLRPC library is missing. But you can bypass the problem by using direct POST queries sent to the web server (by creating first the proper http header then the XML query that will be sent).
Re: LiveCode Apps integration with Joomla or Wordpress
Hi bangkok,
Thank you so much for your guidance. Any advice for me to find it more about "For Mobile, it's.... more tricky because the XMLRPC library is missing. But you can bypass the problem by using direct POST queries sent to the web server (by creating first the proper http header then the XML query that will be sent)." I need to find out more about it coz most of my previous project are using joomla and wordpress.
Best regards,
Denzio
Thank you so much for your guidance. Any advice for me to find it more about "For Mobile, it's.... more tricky because the XMLRPC library is missing. But you can bypass the problem by using direct POST queries sent to the web server (by creating first the proper http header then the XML query that will be sent)." I need to find out more about it coz most of my previous project are using joomla and wordpress.
Best regards,
Denzio
Re: LiveCode Apps integration with Joomla or Wordpress
So you want to developp for mobile, right ? IOS or Android ?
Anyway :
-the first thing you need to do is to find a simple command (using XMLRPC) from the API of Joomla or Wordpress. Read their documentation.
-then in your stack, use the XMLRPC library in order to send the query (you need IP address of the server, port number, and path)
Example of a basic query, very simple, without any parameter.
Usually a XMLRPC query must be sent with parameters. For that, use revXMLRPC_AddParam
Now... Eventhough the name is scary, a XMLRPC query is nothing else than :
-a http header
-a message in XML (with XML tags)
... a long string of text !
So, in the first query, here is the raw data that are basically sent to the server.
It's easy to "emulate" those data, and send them to the server using special header and a POST.
I remind you that the XMLRPC library is missing -currently- for IOS and Android. So, this is the only way.
A tip :
-use XMLRPC library to build your queries in Livecode Desktop
-then install fiddler (a very good trafic analyser, with a proxy)
-send your queries
-fiddler will display the "raw data" sent to the server (with header and content, and even the answer from the server, again with header and content)
-it will give you a clear view and understanding of what to do in order to create in raw text your XMLRPC queries
Watch out, this work can be tedious... especially for queries with many parameters...
Plus you'll have to work again in order... to decode/analyze the answers from the server... Because it will be XML strings. For that : XML library and arrays.
So basically, if you start from scratch... you'll need time. And some pain.
But it's working fine.
Anyway :
-the first thing you need to do is to find a simple command (using XMLRPC) from the API of Joomla or Wordpress. Read their documentation.
-then in your stack, use the XMLRPC library in order to send the query (you need IP address of the server, port number, and path)
Example of a basic query, very simple, without any parameter.
Code: Select all
put revXMLRPC_CreateRequest("36.255.255.12","8079","xmlrpc/common","http") into rpc_id -- Create the initial connection.
revXMLRPC_SetMethod rpc_id, "get_server_environment" -- Specify the method to call, from the API of Joomla or Wordpress
put revXMLRPC_Execute(rpc_id) into result_id -- Submit & get the results.
put revXMLText (result_id) into tResult
answer tResult
if revXMLRPC_Documents() is not empty then revXMLRPC_DeleteAllDocuments
Code: Select all
put revXMLRPC_CreateRequest("36.255.255.12","8079","xmlrpc/common","http") into rpc_id -- Create the initial connection.
revXMLRPC_AddParam rpc_id, "string", "MyFirstString" --this is the parameter, a string that contains "MyFirstString
revXMLRPC_SetMethod rpc_id, "get_my_name" -- Specify the method to call, from the API
put revXMLRPC_Execute(rpc_id) into result_id -- Submit & get the results.
put revXMLText (result_id) into tResult
answer tResult
if revXMLRPC_Documents() is not empty then revXMLRPC_DeleteAllDocuments
-a http header
-a message in XML (with XML tags)
... a long string of text !
So, in the first query, here is the raw data that are basically sent to the server.
Code: Select all
POST http://36.255.255.12:8079/xmlrpc/common HTTP/1.1
Host: 36.255.255.12:8079
User-Agent: LiveCode/5.5.3 (Win32)
Content-Length: 104
Content-Type: text/xml
<?xml version="1.0"?>
<methodCall><methodName>get_server_environment</methodName><params/></methodCall>
Code: Select all
set the httpheaders to fld "header"
post tXML to url tServer
answer it
A tip :
-use XMLRPC library to build your queries in Livecode Desktop
-then install fiddler (a very good trafic analyser, with a proxy)
-send your queries
-fiddler will display the "raw data" sent to the server (with header and content, and even the answer from the server, again with header and content)
-it will give you a clear view and understanding of what to do in order to create in raw text your XMLRPC queries
Watch out, this work can be tedious... especially for queries with many parameters...
Plus you'll have to work again in order... to decode/analyze the answers from the server... Because it will be XML strings. For that : XML library and arrays.
So basically, if you start from scratch... you'll need time. And some pain.
But it's working fine.