- Posts: 14
- Thank you received: 0
Problem using URL Parameter when Logged In
- Gilberto Sayegh
- Topic Author
- Offline
- New Member
-
Less
More
8 years 8 months ago #85405
by Gilberto Sayegh
Problem using URL Parameter when Logged In was created by Gilberto Sayegh
Hi friends,
We use to pass a value fee using an URL Parameter, so we can make the member pre-select the value in a previous screen of the site and them go to the Membership Pro form. This works great in the site if the user is not logged on, but once the user IS logged, the magic stop working.
I thought that it was due to some change in the last versions of Membership Pro, Joomla! or some other component, but I just checked an old test site, not updated, and found the same problem there. Maybe it was there since ever, but just passed unnoticed.
Can you please try to help me to find out why this happens? I think maybe it's something inside the PHP code.
You can test the behavior here:
teste.svb.org.br/ J! version 3.4.8 and Membership Pro 2.2.1
Please select a value and click "Enviar Dados". See that I attached "?osm_Valor_da_Contribuio=30" to the URL and it works, selecting the value in the form.
Now try to login using the user/pass jaburani/jaburani and find that the process is broken.
If you need the admin access to the site, just ask me.
Thank you!
We use to pass a value fee using an URL Parameter, so we can make the member pre-select the value in a previous screen of the site and them go to the Membership Pro form. This works great in the site if the user is not logged on, but once the user IS logged, the magic stop working.
I thought that it was due to some change in the last versions of Membership Pro, Joomla! or some other component, but I just checked an old test site, not updated, and found the same problem there. Maybe it was there since ever, but just passed unnoticed.
Can you please try to help me to find out why this happens? I think maybe it's something inside the PHP code.
You can test the behavior here:
teste.svb.org.br/ J! version 3.4.8 and Membership Pro 2.2.1
Please select a value and click "Enviar Dados". See that I attached "?osm_Valor_da_Contribuio=30" to the URL and it works, selecting the value in the form.
Now try to login using the user/pass jaburani/jaburani and find that the process is broken.
If you need the admin access to the site, just ask me.
Thank you!
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
8 years 8 months ago #85413
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Problem using URL Parameter when Logged In
Hi Gilberto
Did that user has any subscription record on your site before? If you have an existing subscription record, the system will get the data from his previous subscription (when he logged in). I think it might be the reason causing the error
Could you please go to Membership Pro -> Subscriptions, check to see whether he has any existing subscription records? If it is correct, delete the records and try again to see whether it fixed the issue?
Tuan
Did that user has any subscription record on your site before? If you have an existing subscription record, the system will get the data from his previous subscription (when he logged in). I think it might be the reason causing the error
Could you please go to Membership Pro -> Subscriptions, check to see whether he has any existing subscription records? If it is correct, delete the records and try again to see whether it fixed the issue?
Tuan
Please Log in or Create an account to join the conversation.
- Gilberto Sayegh
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 14
- Thank you received: 0
8 years 8 months ago #85440
by Gilberto Sayegh
Replied by Gilberto Sayegh on topic Problem using URL Parameter when Logged In
Hi Tuan,
I thought about that too, but there's no register of subscription to that user (jaburani).
Actually I found that - if the user is logged on AND:
- the user has NO subscription plan, the value shown is the DEFAULT value to that Subscription Plan.
- the user HAS a subscription plan, the value shown is the value of the USER subscription.
(You can test it with user/pass jojojoxxx/jojojoxxx, select the value 20 in previous screen and see that it will show 30 in the MP form.)
In both cases it would be good that I could overwrite the value using the URL Parameter. But, at least, I would need to overwrite it in the case the user has NO subscription.
Thank you.
I thought about that too, but there's no register of subscription to that user (jaburani).
Actually I found that - if the user is logged on AND:
- the user has NO subscription plan, the value shown is the DEFAULT value to that Subscription Plan.
- the user HAS a subscription plan, the value shown is the value of the USER subscription.
(You can test it with user/pass jojojoxxx/jojojoxxx, select the value 20 in previous screen and see that it will show 30 in the MP form.)
In both cases it would be good that I could overwrite the value using the URL Parameter. But, at least, I would need to overwrite it in the case the user has NO subscription.
Thank you.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
8 years 8 months ago #85467
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Problem using URL Parameter when Logged In
Hi Gilberto
I haven't tried but I think you can make it works like that with small modification:
1. Open the file components/com_osmembership/view/register/html.php
2. Find this line of code;
Add these lines of code after that line:
Please try that and let me know if it works
Tuan
I haven't tried but I think you can make it works like that with small modification:
1. Open the file components/com_osmembership/view/register/html.php
2. Find this line of code;
Code:
if (!isset($data['country']) || !$data['country'])
{
$data['country'] = $config->default_country;
}
Add these lines of code after that line:
Code:
$data = array_merge($data, $_GET);
Please try that and let me know if it works
Tuan
The following user(s) said Thank You: Gilberto Sayegh
Please Log in or Create an account to join the conversation.
- Gilberto Sayegh
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 14
- Thank you received: 0
8 years 8 months ago #85476
by Gilberto Sayegh
Replied by Gilberto Sayegh on topic Problem using URL Parameter when Logged In
Yes Tuan!
Thank you, it made the magic.
Do you think you are going to add that to next versions, or I'll need to take care and replace it there always?
Thank you again.
Thank you, it made the magic.
Do you think you are going to add that to next versions, or I'll need to take care and replace it there always?
Thank you again.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
8 years 8 months ago #85491
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Problem using URL Parameter when Logged In
Hi Gilberto
For now, please maintain this change yourself. I will have to think about it before making the decision
Tuan
For now, please maintain this change yourself. I will have to think about it before making the decision
Tuan
The following user(s) said Thank You: Gilberto Sayegh
Please Log in or Create an account to join the conversation.
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.