Membership ID

  • Stephen Monaghan
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 3 months ago #140128 by Stephen Monaghan
Membership ID was created by Stephen Monaghan
Hello! :D

In the confirmation e-mail a user gets after signing up for a plan, there is a Membership ID shown in the Subscription details syntax.

However, the Membership ID shown there is not the same as the Membership ID generated in the users subscription profile.
It looks like a randomly generated value.

Is there a way to make the Membership ID in subscription details syntax identical in the user profile Membership ID?

I have attached a couple of screenshots to illustrate.

Thanks in advance!

Stephen

Please Log in or Create an account to join the conversation.

More
3 years 3 months ago #140147 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Membership ID
Hi Stephen

It should be the same. Could you please try to use [MEMBERSHIP_ID] tag? It should show Membership ID instead of random string as you said

I think what you are seeing (random string) might be Transaction ID, not Membership ID

Tuan

Please Log in or Create an account to join the conversation.

  • Stephen Monaghan
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 3 months ago #140153 by Stephen Monaghan
Replied by Stephen Monaghan on topic Membership ID
Hi Tuan.

Actually the Transaction ID is also in the subscription details syntax in the confirmation email. Just below the membership ID. It has also a random value not the same as the Membership ID. So it's not that I think.

I am not sure where I edit the [SUBSCRIPTION_DETAIL] tag. Can you point me in the right direction? And maybe I can try some things.

Thanks!

Stephen

Please Log in or Create an account to join the conversation.

More
3 years 3 months ago #140169 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Membership ID
Hi Stephen

The file to edit is components/com_osmembership/view/emailtemplates/tmpl/email.php

Once the modification is done, you should move the modified file to PATH_TO_TEMPLATE/html/com_osmembership/emailtemplates folder so that the change won't be lost when you update to future releases of the extension

Regards,

Tuan

Please Log in or Create an account to join the conversation.

  • Stephen Monaghan
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 2 months ago #140288 by Stephen Monaghan
Replied by Stephen Monaghan on topic Membership ID
Hello Tuan.

That's working. I changed this line in the email.php:
<?php echo $row->subscription_id ; ?>
To
<?php echo $row->membership_id ; ?>

However one small issues remains. The membership_id is correct, but it does not include the Membership ID Prefix, which I kind of need.
This does show when using the [MEMBERSHIP_ID] tag elsewhere so I am not sure why its not included here.

Any ideas?

Thanks!

Stephen

Please Log in or Create an account to join the conversation.

More
3 years 2 months ago #140314 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Membership ID
Hello Stephen

Use this code:


echo OSMembershipHelper::formatMembershipId($row, $config);

and the formatted membership id should be displayed

Tuan

Please Log in or Create an account to join the conversation.

  • Stephen Monaghan
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 2 months ago #140480 by Stephen Monaghan
Replied by Stephen Monaghan on topic Membership ID
Hello Tuan.

That did the trick. Thanks so much!

Stephen

Please Log in or Create an account to join the conversation.

  • Stephen Monaghan
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 2 months ago #140481 by Stephen Monaghan
Replied by Stephen Monaghan on topic Membership ID
Hi Again.
One small issue.

The path:
PATH_TO_TEMPLATE/html/com_osmembership/emailtemplates
Does not exist in my template folder.
Is that with certainty the right path to place the edited email.php ? Or am I looking in the wrong place?

tnx
Stephen

Please Log in or Create an account to join the conversation.

More
3 years 2 months ago #140482 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Membership ID
Hello

PATH_TO_TEMPLATE is path to the template which you are using on your site, for example templates/protostar

The folder com_osmembership and emailtemplates are not available by default, you will have to create these folders manually yourself

Tuan

Please Log in or Create an account to join the conversation.

  • Stephen Monaghan
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 2 months ago #140492 by Stephen Monaghan
Replied by Stephen Monaghan on topic Membership ID
Ahaa.

Got it. I missed the fact that I should create these folders manually.

Thanks again!

Stephen

Please Log in or Create an account to join the conversation.