Hi, If a users has an expired product, I want to display a message saying that your product has expired please renew. Currently I use this, but this displays message for active product and not expired. <div id="memberMessage" style="width:100%;"> {foreach from=$member_products item=p} {if $p.product_id eq "143" } message here {else} {/if} {/foreach}</div> Thanks
so are you saying it's not possible at all? I have no knowledge of php so can if there is a way, can you please tell me how? thanks
Saying that link provides you specifics to the session variables where that kind of information is exposed.
If you need that code within aMember template you can use this: Code: {php} // Here is how you can get all complated payments which user have foreach($GLOBALS['db']->get_user_payments($_SESSION[_amember_id],1) as $payment){ // do whatever checks you need. } {/php}
Thanks for that - I'm still a little lost You see my codebelow: Code: <div id="memberMessage" style="width:100%;"> {foreach from=$member_products item=p} {if $p.product_id eq "143" } message here {else} {/if} {/foreach}</div> That displays message for all active members of product 143, but not to members who have product 143 as expired, how do i merge your code into mine so the message is displayed to both active and expired members of product 143 Thanks