I’m getting closer to having PfaffManager be a product. My MVP is to just have Discourse replace Discourse Installation Packages — Literate Computing, LLC so that people can purchase an installation (as they do now through WordPress), which will kick off the installation in Discourse (working) where they can additionally get live updates on the installation process (working), and then also be able to click a button to kick off a rebuild (working) for some period of time.
I used a add_model_callback(GroupUser, :after_save)
to see that when a user gets aded to the CreateServer group, it creates the server (in the model that my plugin adds) and removes them from the group (so that they could, theoretically, buy another server installation). I think that this technique could be used to make discourse-subscriptions
a fairly general purpose payment system.
So now I’ve now got this:
A couple things that I see right now:
- the
<h1>
title and the button share the samediscourse_subscriptions.subscribe.title
–I’d like to have the<h1>
say something like “Purchase an installation or service” for the header and something like “Pay Now” for the button. - if the
<h1>
had asubscription-title
class, then I could use CSS to hide the existing title and replace it with a::before
, which might solve the above problem. - I’d like to add navigation to
/pfaffmanager/servers
somewhere on this page in a header or footer and I don’t see any way to do that. I tried adding something like{{~raw-plugin-outlet name="subscription-header-before"~}}
to thes.hbs
template, but it’s not that simple.
I think that it’s reasonable to wish for a bit more subscription-specific class stuff in the subscription plugin, but I’m still bad enough at CSS that I’m not exactly sure if I’m right or what it should look like.
Ah! Rather than wishing for plugin outlets in the subscription plugin, perhaps I should contrive to make my own template that still calls the stripe stuff from the subscription plugin? Would that make sense?