EU/VAT – Mehrwertsteuer Madness

Calculating European VAT Rates with PHP – the easy way.

Disclaimer: No legal advice, just a little experience report.

If you sell digital things (services, digital goods etc.) to EU countries, you might have to calculate the VAT at the rate of the customer’s country (and even pay it there afterwards).
The latter is even the more inconvenient part, but at least the first part can be done quite easily with good old PHP.

Continue reading “EU/VAT – Mehrwertsteuer Madness”

Symfony and Angular: shared translations

Angular for frontend with symfony delivering the data have become quite a common setup.

When working with this constellation you will sooner or later come across the i18n topic. Most likely you would want to share translations between front- and backend. So that you could keep translations in one single location while using it for frontend templates as well as server-side error messages etc.

One approach would be to store translations in the symfony yml or xml files and deliver those to the frontend via an api endpoint.
Given that front- and backend-code run on the same server, there is an even simpler solution.
Continue reading “Symfony and Angular: shared translations”

Using Silverstripe Templates outside Silverstripe

In a recent website-project i had a WordPress Blog running next to the main CMS Silverstripe, handling the Blog-part of the site.

Integrating the Blog in Silverstripe (which indeed would have made things simpler) was not  an option at the time. The usage of loads of WordPress plugins would’ve made a rewrite a major task, which was out of the budget.

The blog was integrated in the same page layout as the rest of the website. So ideally it would at least share the same Templates for header, footer etc. and would integrate the sites navigation built by Silverstripe.

But how to use the pre-rendered Silverstripe template .ss files in a WordPress theme?

The following worked fine for me, using Silverstripe 3.0:
Continue reading “Using Silverstripe Templates outside Silverstripe”