Help with If Statements in the Membership Template

Hello,

Please, can someone help me with a basic code of an If Statement in the Membership template file?

I've created memberships with differents terms. e.g.:

Membership A - 30 days
Membership A - 90 days
Membership A - 180 days
Membership A - 360 days

Membership B - 30 days
Membership B - 90 days
Membership B - 180 days
Membership B - 360 days

On the membership page /m/membership/index, next to the membership title, days or price, I would like to display a marketing/sale slogan that is different from a membership level to another.

e.g: Membership B (90 days) - MarketingSlogan

So, in /modules/boonex/membership/templates/base/available_level.html I would like to achieve something like this next to the membership title, days or price:

if membership = 30 days
echo (_MarketingSlogan_Text_1)

if membership = 90 days
echo (_MarketingSlogan_Text_2)

if membership = 180 days
echo (_MarketingSlogan_Text_3)

if membership = 360 days
echo (_MarketingSlogan_Text_4)

Thanks in advance for helping.

Regards

Quote · 12 Sep 2019

You can't do this directly in the template file but you can generate some text keys that can be inserted into the template file that will get converted when the template file is parsed.  I will see if I can find some free time on this.

Geeks, making the world a better place
Quote · 14 Sep 2019

Thanks in advance.

Quote · 17 Sep 2019

Hello


This is possible that I can help you: https://www.boonex.com/m/premium-membership-badges


Regards

Quote · 17 Sep 2019

 

Hello


This is possible that I can help you: https://www.boonex.com/m/premium-membership-badges


Regards

Hi Decane,

Thanks for your reply. It's not exactly what I am trying to acheive. Anyway, thanks. By the way, I already have this Premium Membership Badges module from Modzzz.

Regards

Quote · 17 Sep 2019

Can anyone help? Thanks.

Quote · 20 Sep 2019

 

Can anyone help? Thanks.

Are you offering a job?

Geeks, making the world a better place
Quote · 20 Sep 2019

Nope, I am asking if someone can 'help' achieving it. Which code and where to place it?

Quote · 20 Sep 2019

 

Nope, I am asking if someone can 'help' achieving it. Which code and where to place it?

You probably won't get an answer then because this involves creating code and adding a key to the template.  It isn't a "add this" answer.  However, why don't you just put it in the description for each membership level?

Geeks, making the world a better place
Quote · 21 Sep 2019

Well, reading your first message I really thought you knew how to do it. Then you said you could help, then you asked if it was a job offer. Now you are telling me that I probably won't get an answer. Anyway, thanks.

For the second question: 'why don't I just put it in the description for each membership level?' It's because I have several membership levels with different terms as already explained in my first post. Putting it in one membership description will make it appear in all the terms of the same membership. E.g. Membership A - 30 days, Membership A - 90 days etc. Membership terms (number of days) shares the same description. Thanks

Quote · 21 Sep 2019

Maybe Modzzz Banner Ads will work. I have the mod but I've yet to install it. It works with membership levels, but whether it will work in the complex way you require is another story.

Modzzz currently has it on sale for $15. It's worth a try

Quote · 22 Sep 2019

 

Well, reading your first message I really thought you knew how to do it. Then you said you could help, then you asked if it was a job offer. Now you are telling me that I probably won't get an answer. Anyway, thanks.

 I have to side with GG. She does not work for free.

She and Deano are all that is left here for support IMO. I used to be super active but switched to UNA in 2016.

 

LeonidS, jumps in sometimes to help from UNA which is very helpful.

 

GG is offering help which would benefit you in the end instead of another module that might do what you specifically want.

Hope you succeed with your task.

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 22 Sep 2019

 This module will not work for what he wants.  

Maybe Modzzz Banner Ads will work. I have the mod but I've yet to install it. It works with membership levels, but whether it will work in the complex way you require is another story.

Modzzz currently has it on sale for $15. It's worth a try

 

Paypal email is jeromemingo@gmail.com - http://www.boonex.com/market/posts/modzzz
Quote · 22 Sep 2019

While what you need seems very simple to you, it will take some code changes to achieve it (which is more than a simple IF statement). The membership creation page will have to be modified to add the corresponding slogan and the files for handling display modified accordingly. Myself or geek_girl could get this done for you as a small custom job.

Paypal email is jeromemingo@gmail.com - http://www.boonex.com/market/posts/modzzz
Quote · 22 Sep 2019

I said that if I had time I might take a look but I have to make a living and that means less free stuff lately.  With the changes in Boonex developers are not making the money they use to and thus can no longer provide as much free stuff as they did the in old days.

Geeks, making the world a better place
Quote · 22 Sep 2019

If you do decide to hire someone; hire Modzzz as he is trying to raise money to help his family; the hurricane devastated where he lives.

Geeks, making the world a better place
Quote · 22 Sep 2019

Alright. I understand. Thanks.

Quote · 22 Sep 2019
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.