Adding Entry to Sidebar

If you aren't speaking german, you can ask for support or post your request here.
Antworten
ikyriazis
Beiträge: 2
Registriert: 8. Nov 2024, 20:21

Adding Entry to Sidebar

Beitrag von ikyriazis »

Hello,

I'd like to start off by saying you guys have put an incredible software package together that solves a lot of my community center's needs.

We do need a payment system so in conjunction with the membership fee plugin I want to add an entry to the sidebar that says "Pay Now" and is visible if the user hasn't paid their membership dues yet.

So far I've added this code to admidio/adm_themes/simple/templates/sys-template-parts/menu.main.tpl that lets the "Pay Now" button show up permanently.

Code: Alles auswählen

{if $menuGroup.name === "Modules"}
  <li class="nav-item">
    <a id="PAY_NOW" class="nav-link" href="https://www.ioannis.ky/{$currentUser->getValue('usr_id')}">
      <i class="fas fa-dollar-sign fa-fw"></i>Pay Now
    </a>
  </li>
{/if}
This is ok for now but I was wondering if there is a better way to do this? I noticed you can add an entry to the sidebar using the menu page but it doesn't let me get the user id of the logged in user.

Thanks in advance,
Ioannis
Benutzeravatar
fasse
Administrator
Beiträge: 6167
Registriert: 12. Nov 2005, 16:06

Re: Adding Entry to Sidebar

Beitrag von fasse »

Hi Ioannis,

do you have read this chapter about the integration of user data in your template?
https://www.admidio.org/dokuwiki/doku.p ... ed-in_user

I think this should help you for your needs. Maybe you specify user field with the info if the user has paid his fees.

Best
Fasse
ikyriazis
Beiträge: 2
Registriert: 8. Nov 2024, 20:21

Re: Adding Entry to Sidebar

Beitrag von ikyriazis »

Hi Fasse,

Thanks for the response. I went ahead and wrote a tutorial on how to integrate Stripe with Admidio to help others that want to accept payments and automatically update member paid status in Admidio.

Here it is, would mean a lot if you took a look at it:
https://ioannis.ky/admidio-stripe/

Thanks,
Ioannis
Antworten