AngularJS Client Consume Magneto Server? Via Rest or SOAP? - php

Hi I am building an application based on Magento CE 1.9.2
I have previous experience with magento but not recently or experience using the API, either SOAP or REST.
I am trying to decide whether or not it is fully beneficial or it is recommended to to abstract the client allow a fully fledged e-commerce store using an angular client / magento.
I am trying to see if it efficient to integrate AngularJs within Magento or have an Angular client making calls to the Magento API.
I have found this resource and i am investigating:
https://github.com/Wildhoney/Magento-on-Angular
This seems like an interested libary but before i start i wanted to see what the limitations where for accessing data through either SOAP or REST.
Specially as i am building this application for a client who requires the basic shoping aspects and noting to advanced, is there any data / functionality which magento would not be able to send to the client to utilise?
I wish to have the angular client ( this can be on a PHP based app such as laravel like in Magento-on-angular), i need to be able to get all the products, post reviews and interact with say magento modules, modules which work with say instragram and pull down the review pictures which will be sent to a client, i wish to make a full angular checkout and simply post a checkout object (something alone those lines) to magento for it to parse.
my objective is to have a minimal client which does not lack in functionality and i am very proficient in angular, angular was chosen due to the front end requirements of the application.
Or any other constraints or advice?
Or a Pro's / Con's List.
Thanks

Related

Where to find API endpoints in PHP project code

I am working on a frontend project and need to develop a frontend for an already existing backend developed in PHP. I need to extract all the endpoints from the server code and build the frontend accordingly. I need to know where exactly the endpoints are created or listed in PHP code so that I can understand their payload and header requirements.

Programmatically check Enterprise WSDL against Salesforce

I'm building a custom SalesForce integration into my php application using the PHP SDK and the SOAP API. We have a Enterprise account.
My company frequently changes the custom objects inside of SalesForce. I'm worried that this might break my integration with our SalesForce account. Is there a way to verify programmatically that my WSDL (generated inside SalesForce) is still working?
I tried using the describeGlobal message, but this just seems to reflect what's inside my current WSDL (rather than checking with SalesForce).
Since your company frequently changes the custom objects then you should be using the Partner WSDL, not Enterprise. Enterprise is used for non changing or slowly changing orgs. Basically, a strongly typed WSDL. Partner is loosely typed so you can access all objects within the org and you gain flexibility but it requires more time for development.
If you didn't want to stop using the enterprise WSDL, you could use both. Use the partner to issue the describeglobal call to detect changes, download the new WSDL, compile and do what you need with it.

Opencart and phonegap

Hi I have recently began to build mobile open cart sites for mobile browsers. I would like to take it a step further and build native apps using phonegap. My question is , does phonegap support a structure like opencart? Are php files supported?
Would it be possible for me to build a fully functioning opencart site and integrate it successfully with phonegap?
There is very little information online regarding this question.
A Phonegap app cannot contain any server side scripting like PHP. It can only contains HTML, css and Javascript.
But you can always do request to a remote server that runs PHP.
Opencart has quite a few ajax interfaces in various parts of the app. These call controllers that deliver sections of a page usually. I have not looked into the full remote API to know if you can build a full shop app that uses the opencart backend.
If you look down that ajax calls path you may find enough functionality to produce the phonegap app.

SCORM Integration With local DB

I have a PHP web application, I need to integrate SCORM with my application.I know that there is cloud option for integrating SCORM. But our requirement is that saving course details into our local DB.
Please help me.
You have a couple options for integrating SCORM content into standalone (web or otherwise) applications.
One is SCORMCloud (www.scorm.com), which gives you an integration API. They have PHP based plugins for both WordPress and Drupal, which you can use as a guide.
SCORMCloud has a couple of methods based whereby you can bring your learner data back into your database.
When a course launch is finished, SCORMCloud will redirect back to your website. At that point, you can hit the SCORMCloud API and fetch the results of your launch, and write that back to your database.
Our company (www.aura-software.com) produces an application integration framework for cloud based elearning sources (Vimeo, SCORMCloud, TinCan LRSs) called Bright CloudConnect. Depending on what your integration requirements were, it can perform the same functions and a few others. Enabling trackable elearning in existing applications is Bright's primary function.

FileMaker: integrating with Magento

I would like to write a Magento web-app working with Filemaker database.
Could I overwrite the database core files with code using filemaker php api?
What other options are there?
I wanted to do an interface between Filemaker and Magento database but cause of the EAV it's a nightmare to bind the Magento database with a filemaker database. If you want to do that you really need to use PHP in Filemaker and use the SOAP API of Magento if they are separated hosted.
You could too integrate the Magento core API into a PHP script with Filemaker API too if you host your Magento on the same web server or by installing a new Magento instance pointing to an availalble external database. You could do a local replication of the mysql database too on the Filemaker server.
To integrate Magento Core APi it's easy in a PHP file, you set the following:
<?php
require_once 'yourmagentoinstallation/path/app/Mage.php';
Mage::app('default'); // default can be replaced by your default store code
// You can use Magento code (model, EAV, singleton, block, etc)
...
?>
It's possible, there are different ways but I didn't find when I needed an out of the box solution.
It depends on what you mean by "integrate". I doubt you'll need to do something in the lines of "overwrite database core files". Most likely you'll need to update FileMaker when an order is placed and do the same thing to Magento when they get a stock update. It's quite likely that these two scenarios would have to be implemented in vastly different manner.
Here's what FileMaker can do. Its XML backend can readily accept GET and POST requests to the server. Their syntax is fairly advanced and you can find records, add, delete, and duplicate them, run FileMaker scripts, etc. It's nowhere near SQL, especially searching, but quite logical. The server responds in XML. Here's the manual (PDF).
The server can also accepts arbitrary requests sent to its PHP API. (It also has a XSLT API, but it's deprecated and is going to be removed.) The API then reshapes the request as it pleases, talks with the XML backend, and returns back the result. As I'm not a PHP expert, I'm not quite sure where the API is explained, but it must be somewhere here.
FileMaker itself (i.e. its desktop client or even the server) can use plug-ins to talk to web services. E.g. as the stock updates the desktop client can prepare and send requests to Magento API.
And FileMaker can access certain 'big' SQL databases directly. E.g. it can connect to a MySQL database and work with its tables very much like with its own. Maybe it would be unwise to allow free work with core Magento tables, but a carefully scripted updates look like a viable option.
The plug-in and direct connection are better left to FileMaker developers, while the XML and PHP (XSLT) APIs are pretty standard web stuff.
Productive Computing has done some work with Magento. It sounds like they are using external datasources to connect which would make for an overly excessive integration.
Productive Computing Blog
Our NRGship products use the Magento PHP API to pull order data and update order status post-shipment. In order to mirror this, you would need some PHP code server-side, and then use a plugin like Troi URL to invoke http requests to query and update record status.
Providing more information on your needs would allow for a more detailed response.
I use the JDBC driver that comes with Filemaker Pro and I have built a server app in Java that connects to filemaker through JDBC to auto insert data such as orders etc and have background tasks automate updates such as product updates and order status updates by getting data from filemaker through JDBC. The java server app then sends SOAP API requests off to Magento to handle the data exchange.
We have extended this further by having the server app listen for XML messages/commands on a socket so I can have real time integration to filemaker where needed. I then have a simple filemaker plugin I wrote using 24U Filemaker Plugin Template that sends small XML messages to the java server application which then issues an API call to magento accordingly. Filemaker waits for the server app response which gets returned and then filemaker continues the rest of the script that called the method.
It's a lot more elaborate than this in the sense it has a queue of tasks to perform so not to overload magento API, and we have a DB connection pool for the filemaker JDBC connections to save the overload of opening and closing connections. This works really really well, and we literally have the entirety of Magento integrated with filemaker and have produced many custom API modules for magento to achieve additional functionality which magento does not provide.
I was reading it's possible to create Java Plugins for java so in theory you could do away with the server app and simply create a filemaker plugin which has the magento API function calls built into it. If using V2 WSI Compliance mode for magento soap calls you could generate all the stub classes and methods using the JAXB web services plugin which is part of Netbeans which will save you days and days of work.

Categories