• 欢迎访问magento4you博客,我们提供magento建站、技术咨询、IT运维、支持培训、二次开发服务及模板定制,联系QQ:283475615
  • Magento入门教程 二次开发 模板定制 联系QQ:283475615
  • magento运营 SEO SEM 数字营销 广告竞价 联系QQ:283475615
  • 如果您觉得本站对你有帮助,那么赶紧使用Ctrl+D 收藏吧!

Develop your own Magento mobile application

Magento手机应用 6年前 (2015-05-16) 1671次浏览 0个评论
Featured Image

Hi everybody.

Do you want to develop your own Magento mobile application?

Great! I’ll give you some pointers on how to get a grasp on Magento’s XMLConnect, an extension that serves Magento Mobile application.

Keep in mind that XMLConnect extension comes ‘preinstalled’ in Magento CE 1.5 and later, but you can get it from Magento Connect.

The Big Picture

Awhile ago, Magento Mobile was released for iPhone, iPad and Android devices. It consists of two parts: a Magento web store with an XMLConnect extension installed and configured, and a native application itself.

XMLConnect extension’s purpose here is to serve your application with requested data (category listing, product information, etc.) and execute desired actions (buy, log in, checkout, etc.).
Basically, application sends a request (plain HTTP GET/POST) to your Magento store (XMLConnect) and it responds with an XML result.

The best way to get familiar with XMLConnect is to see it in action:

1) Set up a Magento store on your web server with some sample data
2) In Magento admin->Mobile->Manage Apps add a new mobile application
3) Install Magento Mobile on your device
4) Start Magento Mobile on your device with your Magento store url and the app code of the application you just created in Magento admin->Mobile

While exploring Magento Mobile, keep an eye on (Apache) activity log file to see exactly what the application is requesting from the server.
For instance, the first request would probably be the application configuration request.

/xmlconnect/configuration/index/app_code/defand1/screen_size/480×800

We recognize in this request an app code (in this example it is “defand1″) and your device’s screen size (here it’s “480×800″).
Let’s check out what is the result of this request. In your browser navigate to:

http://magentoivica.loc/xmlconnect/configuration/index/app_code/defand1/screen_size/480×800
(obviously, replace “magentoivica.loc” with your web server name. Recognize the rest of the url?)

Voilá, what you should get is an entire configuration of your app (as it is set in your Magento admin) in an XML format.

Using this practice, you can easily explore most of the capabilities of XMLConnect. Also, it may be necessary to get into the code of XMLConnect if you want to master some of the more advanced actions (such as the checkout process).

Ok, now you know basics of using XMLConnect, how to make a request and what to expect as a result. But, how to use this information in an Android (Java) environment?

You probably already know something about parsing XML data. I will show you a better way (probably) which will allow you to have more modularity and sustainability in an Android application development.

So, stay tuned :)


极客公园 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:Develop your own Magento mobile application
喜欢 (0)
发表我的评论
取消评论

*

code

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址