3 Replies Latest reply on Oct 15, 2016 3:50 AM by Webmosphere.co.uk

    Subscription to a webapp item

    Sean Beez Level 1

      I have created Business Directory using Webapp.

      • There are existing business in the Business Directory
      • Business Owners have a "My Account" area via the Secure Zone
      • Business owners can login and upgrade their business listing from FREE to Paid
      • Each business listing is a webapp item
      • How do I go about setting up "Subscription" for upgrading the listing/a webapp item?

      Please note....

      • I don't want to sell subscription to secure zone
      • I want to sell subscription for upgrading a webapp item.
        • 1. Re: Subscription to a webapp item
          Webmosphere.co.uk Level 3

          Off the top of my head:

           

          1. Create a category/classification called, let's say 'upgraded'
          2. Have a special web app edit link that makes use of {module_url}.
          3. Access to the edit page via this link should show a regular payment form etc
          4. On payment form success, submit the edit form with the item now classified as 'upgraded'

           

          There's definitely different ways to skin this cat, but I cannot think of a reason why this theory shouldn't work.

           

          I hope this is a good starting point.

           

          @webmosphere/@bespokify

          • 2. Re: Subscription to a webapp item
            Eworks-WSI Level 2

            Hi webmosphere, this is an interesting solution. How would you submit automatically the webapp item on the payment confirmation screen?

            • 3. Re: Subscription to a webapp item
              Webmosphere.co.uk Level 3

              That's the part that will need experimenting, but as long as you submit the payment form with ajax, you can basically modify the script on this page: Submitting standard web forms with Ajax and JSON  ...to fire off additional events on success, or query the {module_webformresults} and then submit the form if certain conditions are met.

               

              You can simply submit the form in jQuery with $('#formName').submit();

              Or in vanilla via document.getElementById("formName").submit( );

               

              Last time I checked, you could not submit web app forms with ajax, so keep this in mind.

               

              If you are using Stripe, run some tests - I'm pretty confident what you goal in well within BC capabilities, one way or another.