News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

account activation link problem

Started by rafipl, March 17, 2012, 19:58:54 PM

Previous topic - Next topic

dnlvsci

Yeah. I think this too. In VM1 wasn't problem the registration and the activation....

jack19

Hi to all,
in .htaccess add this rule


RewriteBase /
RewriteCond %{HTTP_HOST}   ^youdomain\.com [NC]
RewriteRule (.*) http://www.youdomain.com/$1 [R=301,L]
RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com
RewriteRule (.*) http://www.yourdomain.com/$1 [R=301,L]
Best regards

Joomla! 2.5.9
Virtuemart 2.0.18a

matbeard

Quote from: jack19 on January 14, 2013, 15:12:14 PM
Hi to all,
in .htaccess add this rule


RewriteBase /
RewriteCond %{HTTP_HOST}   ^youdomain\.com [NC]
RewriteRule (.*) http://www.youdomain.com/$1 [R=301,L]
RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com
RewriteRule (.*) http://www.yourdomain.com/$1 [R=301,L]


This doesn't solve the problem.

Is there a definitive solution/workaround for this yet?

Cheers

jamajlo

I found the solution. If user / admin has to activate the new account, user id is set to 0.

In administrator/components/com_virtuemar/models, line 682
add this:

if ($doUserActivation)
$user->set("id",'0');


It`s not the best solution, but it`s working.

The only one remaining problem is that VM is still showing address data for new registered user. Any ideas?

skul2

Hi there,

Am using VM 2.0.12 and joomla 2.57, when someone register on my my site and receive an activation link, after clicking the link they are not still activated. The strange thing is that when activate through a mobile phone it gets activated. I have tried different browser, still the same problem. Any assistant will be appreciated.

Best regard
Skul2

tikhonov

#50
Hi!

From my experience, the problem is related to the session that VM2 establishes in the browser. So, if at the same time  the same shopper try to activate his account, Joomla! refuses, since Joomla! considers him as being logged in. Note that when the session expires, e.g. clear cache, or if we use a different browser, e.g. mobile browser, the shopper is able to activate his account.

In my setup I have commented lines 34-37 of the activate() public function of components\com_users\controllers\registration.php file.
// If the user is logged in, return them back to the homepage.
/*if ($user->get('id')) {
$this->setRedirect('index.php');
return true;
}*/

Certainly, the above is not the optimum solution, since although a customer is able to activate, he is not able to log in before the session expire.  (Note also that in my setup I always redirect www links to non-www ones, through the .htaccess file)

The VM2 - Joomla! conflict is a critical issue that VM2 developers should address in future versions, since this inconsistency degrades the confidence of a potential shopper to the e-shop. This is really unfair for VM2, since in fact, it is a great component!

As mentioned before, all the above is what I have realized from my experience with the problem. So, if there is anything more, that a website administrator can do to avoid the problem, I would kindly suggest the VM2 developers to give some specific advices and explanations.

Thanks,
Nikos

Joomla! 2.5.8
VM 2.0.18a

iwoh

I wan't to remove the activation link from the e-mail user receives after registration. Wher can I do it? My Joomla 2.5.8, Virtuemart 2.0.18a

skul2

Hi guys,

All I did was to follow above instructions by  tikhonov and it work great for me, so will advice you to do the same, very simple.

Good luck.

jenkinhill

@iwoh I don't believe any shop should require account activation, this is easy to set in Joomla. See http://forum.virtuemart.net/index.php?topic=112548.msg378905#msg378905
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

broll

Quote from: jenkinhill on February 03, 2013, 18:51:35 PM
@iwoh I don't believe any shop should require account activation, this is easy to set in Joomla. See http://forum.virtuemart.net/index.php?topic=112548.msg378905#msg378905

I'm sorry, I simply do not agree.

I am currently struggling with a B2B wholesale site on this very issue. The end client wishes to be able to manually activate accounts after vetting his customers.

An automatic registration, or the lack of such account activation would merely serve their wholesale prices to the general web public. This would, of course, be of no use to their wholesale business at all.

Without a solution I will be forced to use alternative cart software and move away from Joomla altogether.

Please do not read this as a direct criticism of the hard work done to bring VM2 to the market, for straightforward single priced items I cannot fault it. However, for any site requiring multiple prices or admin control over account activation I am forced to use an alternative.

jenkinhill

broll, "The end client wishes to be able to manually activate accounts after vetting his customers." I have done a couple of those for a large furniture wholesaler's website and intranet. This is not a normal retail "shop".

There I use Allow User Registration = Yes and  New User Account Activation = Admin.
On receiving the registration email the storeadmin logs into the site,  double checks their address etc and VAT number, sets the shopper group of the user and  enables/activates them in the Joomla user manager, then mails them a one time discount coupon (ie inviting them back to buy). The last site I did had 5 different prices for users depending on their shopper group. This is now so easy to set up in VM2.0.18a
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

werian

Hello there,

check my solution based on .htaccess & plugin written by myself - http://forum.virtuemart.net/index.php?topic=113802.0 .

templeton

This is much simpler:

1)  Comment out the following lines in components/com_users/controllers/registration.php (line 34 for me):

      if ($user->get('id')) {
         $this->setRedirect('index.php');
         return true;
      }

So like this:

      /*if ($user->get('id')) {
         $this->setRedirect('index.php');
         return true;
      }*/


2) Modify the following line of code in components/com_users/models/registration.php (line 47 for me):

         ' AND '.$db->quoteName('lastvisitDate').' = '.$db->Quote($db->getNullDate())

So like this:

         '' //' AND '.$db->quoteName('lastvisitDate').' = '.$db->Quote($db->getNullDate())


It's a Joomla com_users hack but it's pretty simple to execute.

Stonedfury

Quote from: werian on March 10, 2013, 15:29:30 PM
Hello there,

check my solution based on .htaccess & plugin written by myself - http://forum.virtuemart.net/index.php?topic=113802.0 .

Perfect fix. No hack not muss and no fuss. Thank you sir. Maybe VM will get this implemented
No such thing as a stupid question, only a stupid answer. I won't ask if I know the answer or found it using the search as you suggested.

Daroch

Thank you very much, templeton.
A geat solution in a large post...   ;)