Hi there Suppose I want ot show product-specific fields on the member's profile page - what is the correct syntax to show these specific fields: {if in_array ("1", (array)$_SESSION['_amember_product_ids'])} -- Then show this field {/if} Is returning an unbalanced Smarty Syntax error - Am I using the correct variable on profile.html to return the correct product id? Thanks so much mediahackers
Here's the solution . . . Answer my own question! {if in_array(1, (array)$smarty.session._amember_product_ids)} . . . . fields to be specific about . . . {/if} As per this post HTH mediahackers
Doesn't work if member has not completed payment This code will not work if member has not completed payment - does someone know if an else statement that can be placed in here that will pull back the correct data? product_id is in there because I can see it under edit user payment info on the debug info in admin - anyone? - Alex? Many thanks
aMember set only info about completed subscriptions in session. For not completed you have to code query to amember_payments table in database: {php} $payments= $db->get_user_payments($_SESSION[_amember_id], 0); // This will return all subscriptions that user have(both completed and not completed) {php}
What's puzzling to me is how do you pull that if/else statement off for multiple product IDs in the same line without replicating the if in_array statement for each...