How to use Conditional Statements in UNA based on Badge IDs on the ACL view page?

Hello UNA Team.

I am willing to offer a special membership pricing: 50% discount to Qualified Non-profit organizations.

So, I've created special membership levels for them (monthly and yearly plans) which are basically a clone of the Premium membership level but with some enhanced permissions. I have also created a Badge for NGOs. I will be assigning that badge manually after reviewing the NGO's profile and papers/documents.

The problem is that those memberships with a special pricing for Qualified Non-profit organizations appear on the /acl-view page and anyone can actually subcribe to them.

How to get those specific membeship levels to display on the /acl-view page to members with the NGO Badge only?

Is it possible to add some 'if statements' in a RAW block with something like this:

If member badge_id=4 => display level_id=5 and level_id=6

@Alex T⚜️ , how can the ability to set custom condition in browse service you added to UNA here https://github.com/unaio/una/issues/3166 be applied to this case?

Thanks in advance for helping.

  • 613
  • More
Replies (11)
    • To achieve this I would recommend to hide these membership levels with css then add additional block which is only shown for NGO and have some css in it to force show these membership levels for them.

      • What about @AQB Soft Paid Levels Splitter. Works perfect for persons, based on the datalist system/sex.image_transcoder.php?o=sys_images_editor&h=1027&dpx=2&t=1674599132

        May be the organisation 'splitter' can be combined with a 'custom defined datalist'

        • Hi @Alex T⚜️ Thanks for your reply.

          It sounds good but the only problem is the block can be hidden based on membership levels only (Standard, Premium, Moderator etc) not based on Badges.

          I have both paid membership level with a special pricing (50% Off) called "NGO" and a Badge also called "NGO".

          When NGOs create a profile, their membership level is "Standard". Then I will assign a bagde to their profile manually after reviewing their papers.

          There is no way to restrict the visibility of a block based on Badges. If I set the visibility of the block to the NGO membership level, they will still not be able to see it because, to begin with, their membership is 'Standard', They will need to paid/upgrade to the NGO membership level first to be able to see that additional block because it is restricted to to NGO membership level only.

          I don't know if what I have said makes sense.

          Any idea on the css to force show those membership levels to NGOs.? (Members with the NGO badge)

          Please help. Thanks

          • Thanks for the suggestion but unfortunately the module doesn't split memberships based on badges. Also, I am looking for a simple solution if possible using the Raw block with some css, not really modules.

            • Yes, I know it does not, but badges is a simple datalist too. Why not asking AQB how to use THIS badges datalist instead of the system/sex list? Should be simple for them...

              But anyway, I understand your idea NOT to use additional modules. Hope you find a solution !

              • @OneEagle if it is possible we would suggest to use the Organizations module for NGOs instead of badges. In this case you will be able to use the Paid Levels Splitter module to show a filtered list of membership levels available for purchase based on a profile type (Persons VS Organizations).

                • @AQB Soft . Thanks but still that will not work because I will not be dealing with NGOs only, but with Businesses/Entites, Institutions also, They are all organizations and they will all use the organizations module (Organization profile). The only way I have to make a difference between them is using badges. I would like those special pricing membership levels to display to NGOs only, not to other organizations.

                  Also as I have already said I don't want to use a module just for that. I would like to achieve it using the Raw block and some css or any other simple solution. Not a module.

                  • @Alex T⚜️ Did you see my reply above. Please could you help? We are stuck

                    • Hi @LeonidS Please could you mind helping me with this?

                      •  Did you see my reply above. Please could you help? We are stuck

                        Badges aren't supposed to be used for permissions system, so there is no way to do it without custom modifications. However when you assign a badge you can assign some membership level as well, then you will be use some of the suggested methods

                        • Thanks @Alex T⚜️ for the reply. The problem is: what membership level should I assign the NGO to in order for them to see the hidden NGO membership level block while all membership levels are visible on the /acl-view page?

                          First stept: Per your suggestion I have hidden the NGO membership level (50% OFF) from the /acl-view page using CSS.

                          Second step: How to make it visible to NGO Organizations only? When they registered, they receive the Standard membership.

                          Again, per your suggestion, if I created a block with the 'Suscribe' button to NGO membership level and set the visibility to Standard membership only in order to NGO Organization Profils to see it (because NGO start as Standard members after creating their profile), then all Standard members on the plateform will see that NGO membership level with the special pricing (50% OFF).

                          If I assign that NGO membership level to NGOs manually, then it won't make any sense because I would like them to pay for it. For them to pay for it they have to see it.

                          It's stuck there! Please help! Thanks

                          Login or Join to comment.