How to disable purchase buttons after users subscribe to a specific plan? Answered

Hello, I've a query. When I use plan specific attributes to hide buttons when user is not subscribed to that plan. My query is after the user subscribed to specific plan how to disable that purchase button for the user who have purchased plan?

I'll share a loom video with you to explain what I wanna achieve

Comments

8 comments

  • Comment author
    Julian Galluzzo

    the same thing but add an exclamation mark in front. For example, "!members"

    Make another cms field with an ! before your plan id - then bind it just like you did with the learn more button

    0
  • Comment author
    Tomasz Moszyński

    Hi. I added the first paid plan. Test payments work. The plan concerns access to the film. There will be more films. In cms I have a collection of films and the fields Price_ID and Plan_ID which have the appropriate values. The film purchase button to the custom attribute (data-ms-price:add) takes the value from Price_ID. The purchase works. How can I hide this purchase button if the user has already bought this product?

    0
  • Comment author
    A J

    Hey Tomasz Moszyński, you can use the attribute data-ms-content="CONTENT-ID" with the relevant gated content ID which provides access to the users to the films. Here's a guide on its usage. Hope this helps

    0
  • Comment author
    Tomasz Moszyński

    Thank you!

    I added the Content_ID field to cms. In membestack I added a Gate Content for this exact movie and named it film001. In cms, I added a value to the Content_ID field: film001. Now I use the custom attribute for the "buy" button data-ms-content= and add the field from cms as a value. How to negate a value from cms?

    0
  • Comment author
    A J

    If you mean you want to hide an element, you can add another field to the CMS which is specifically for hiding and have the value as '!CONTENT-ID' and map that field in the respective places to hide it.

    0
  • Comment author
    Tomasz Moszyński

    I coped in a strange way. I added ! in cms. In webflow, when I indicate it as a value from the CMS field, I cannot add ! (negation)

    Is there any way to add ! when value is a field in CMS?

    0
  • Comment author
    A J

    No, unfortunately not. But if you have added ! in the cms field that should do the trick.

    0
  • Comment author
    Tomasz Moszyński

    Thank you!

    0

Please sign in to leave a comment.