I am porting a Shopify "multi-site" to CraftCMS using Commerce and I need to be able to add subscriptions to the shopping cart (customers can subscribe to a monthly box), together with other products. Ideally I would have the subscription as a payment variant of a given product, so I can offer the same product for a reduced price if a customer subscribes to it. (Single box vs. Monthly box)

Has anyone implemented something similar? Any hint or advise on how you'd go for this?

Edit, just for this question viewers's information:

enter image description here

  • I haven't look at subscriptions yet for Commerce 2, so don't have a specific answer to Craft side of this, but I'd argue that you'd do well to keep the single and monthly boxes as separate products if for no other reason than for easier sales reporting purposes. We manage a large subscription service company and that's how they prefer it too. Apr 18 '18 at 16:05
  • Subscriptions currently only work with Stripe - you will find the plugin in the Craft Plugin Store. All subscription plans need to be setup on the Stripe account, before you can select them in your CP. This will allow you to keep the transactions apart, as @stephen indicated. E-way does provide subscriptions also, however, while in E-commerce β, there is no provision for this plugin as yet.. –
    – Nutmeg
    Apr 18 '18 at 22:56
  • @StephenCallender The subscription vs. single item would be different product variants, and thus, they'd have a different SKU, so I think we would be covering that issue that you comment. Apr 19 '18 at 8:03
  • @Nutmeg I have already set up stripe subscriptions on my Craft installation but the thing of actually being able to add a subscription to the cart is what I haven't solved. I'm guessing I'll have to implement custom logic but can't yet evaluate how much possible it is to accomplish. Apr 19 '18 at 8:03
  • 1
    @RosanaRuiz I just implemented this on a site I'm working on. I created a Product which represents the subscription and added a field onto the product to store the associated subscription handle. Then, I wrote a plugin that hooks into the EVENT_AFTER_COMPLETE_ORDER event which manually adds the user to the subscription.
    – Bryant
    Jun 15 '18 at 12:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.