One Page Checkout – customising an extension for the cloud
A plugin without PHP: what a cloud app may do, where it runs into limits, and what came out of rebuilding the One Page Checkout.
Our One Page Checkout for Shopware is popular. Until now it was reserved for self-hosted customers, because Shopware Cloud Hosting places its own demands on an app.
What a cloud app is not allowed to do
No PHP code of your own can run inside the app itself. Deeper functionality has to sit on a separate app server and is addressed from there via API.
The task was therefore to rebuild the existing plugin so that it gets by on HTML, CSS and JavaScript alone. Subscribers and everything else containing PHP had to go. Shopware’s documentation helps with the first steps.
The manifest.xml is the heart of it
The basis of an app is quickly in place. Its core is the manifest.xml. What goes in there closely resembles the composer.json of a self-hosted plugin.
Enlarge image
Templates, snippets and assets stay familiar
The rest of the structure is identical when it comes to templates, snippets, Sass and JavaScript. Only the directory layout looks a little different. Anyone who knows the plugin system finds their way around the app system quickly.
Conclusion
Apps are a good thing for cloud hosting customers. It gets tight as soon as you want more in the frontend than showing existing data differently. In our case we wanted to display payment and shipping information in the One Page Checkout before login and registration. That was not possible.
More is possible in the admin: there you can add information via iFrame. In the storefront that option is still missing. With it there would be considerably more use cases. We are staying on it and will publish further apps.