问题
Can we use opencart or zencart on the phonegap for an ipad app?
I want to do a native ipad app using the phonegap framework, can we use php in phonegap? How can i implement open cart template in phonegap,can any one give me some useful tutorial links.
回答1:
Ravi,
Use of any large framework for small purpose is not a good idea,
As far as your requirement is concern, you can fulfill your need by simple XML feed generation
Step 1 :
Understand Database structure of any Open source. i.e. in Zen Cart you can get all category information from zen_categories and zen_categories_description table.
Step 2 :
Generate XML feed from DB i.e. create a script which is dynamically generate XML Feed.
<?xml version="1.0" encoding="utf-8"?>
<list>
<item>
<id>1</id>
<name>Cat 1</name>
<image>http://domain.com/images/cat1.jpg</image>
<description>description goes here</description>
</item>
<item>
<id>2</id>
<name>Cat 2</name>
<image>http://domain.com/images/cat2.jpg</image>
<description>description goes here</description>
</item>
</list>
Step 3 :
Read XML feed from your native app and display category list.
Now for product data create another XML feed which is use parameter ( category ID)
Hope, this may help.
来源:https://stackoverflow.com/questions/9158493/can-we-use-opencart-or-zen-cart-on-the-phonegap-for-an-ipad-app