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

VM2 Customer registration

Started by jamedia, January 11, 2012, 00:12:17 AM

Previous topic - Next topic

cas

#30
I'm using VM2.0.6 & Joomla 2.5.4.  When I set the New User Activation = None, it does allow the customer to register and buy at the same time, but it does NOT include the required tax.  I also noticed when registering & buying from the VM cart it does NOT log the user into Joomla during that initial VM registration time.  It only logs the user into VM.  If the customer logs out using the VM cart and then logs back in from the VM cart or the Joomla login, it does log into both VM & Joomla, and then the tax is applied properly.  So this problem only occurs during the initial registration & buy from the VM cart.   Is there a fix for this problem?   

cas


cas

Guys, help us!  Read my post from May 19th.  VM is not charging tax when user first registers from the shopping cart when buying for the first time.  Since VM does not log user into Joomla at the time user first registers, VM does not charge tax for that state.  This is a critical issue.  Please let us know if this is being fixed. 

cas


JohnnyC

It is a little complicated as you describe it and to be honest I haven't seen the problem clearly. My advice is, check the tax in products (when the final price is computed) and in user groups. Maybe you have a group with different tax rule than you want. Use the Joomla login and registration only for email, username and password fields (only these are "copied" to VM user when registering) and the VM registration for the rest account. So, every time the user logins, it will be through VM.
I cann't think anything more as I am not an expert... Hope the above will help...

cas

Hi Johnny,

The problem is with the initial VM registration from the cart.  The VM team needs to fix this bug.  The tax works fine when the user logs back in after their initial registration, so the VM needs to make the initial registration from the cart set things to work like when the user logs back in.   

JohnnyC

So, when a user registers and logs in directly from cart, the taxes rules don't be applied?? I think the user is anonymous till the first login that becomes "default" or any other group you have. Are you sure "anonymous" and "default" have the same tax rules?
If you are pretty sure this is a bug you should pm the developers or post your question at http://forum.virtuemart.net/index.php?board=127.0 and then publish the ansewr here for us...

cas

Hi Johnny,

That is correct... when the user first registers from within the VM cart, the user shows logged in within the VM cart, but the Joomla login module does not show the user is logged in.  And the result is that user is not charged tax if they register and buy in the same session.  If they login with the Joomla login module, or login with the VM cart login after registering in a previous session, then they are logged in to Joomla & VM and then VM charges tax correctly.   

And I cannot set tax rules for "anonymous" because then tax is added for everyone just visiting my store, even if they live in a state where tax would not be changed.  Charging tax for everyone was a previous bug I  reported and the answer from the VM team was to only set tax rules for "default" shopper group.  But maybe you hit on where the bug is... maybe VM is not changing the user to "default" shopper group when the user first registers.  Milbo, could this be the bug?   

bogusj

Hi,

At the top of the shopping cart, there is the login without the new user registration link.
This confuses people who are trying to register. Of course when you click on check out, it automatically takes you to the new user registration, however most people, don't get that. Is there any way to add the new user registration at the login inside the cart?

Thanks in advance.

pbc278

Please fix this bug! VM2 team... registering as new shopper and the auto login needs to log the user in properly, so also into Joomla!


Quote from: cas on June 02, 2012, 07:27:44 AM
Hi Johnny,

That is correct... when the user first registers from within the VM cart, the user shows logged in within the VM cart, but the Joomla login module does not show the user is logged in.  And the result is that user is not charged tax if they register and buy in the same session.  If they login with the Joomla login module, or login with the VM cart login after registering in a previous session, then they are logged in to Joomla & VM and then VM charges tax correctly.   

And I cannot set tax rules for "anonymous" because then tax is added for everyone just visiting my store, even if they live in a state where tax would not be changed.  Charging tax for everyone was a previous bug I  reported and the answer from the VM team was to only set tax rules for "default" shopper group.  But maybe you hit on where the bug is... maybe VM is not changing the user to "default" shopper group when the user first registers.  Milbo, could this be the bug?   

pbc278

 :P I fixxed the issue in my Virtuemart 2.06 / Joomla 2.5.4 config, after registration in the checkoutprocess you are not correctly logged into Joomla...
with this post you can fix the problem....

go to the file: components\com_virtuemart\controllers\user.php
find this part:
if($currentUser->id==0){
$msg = (is_array($ret)) ? $ret['message'] : $ret;
$usersConfig = &JComponentHelper::getParams( 'com_users' );
$useractivation = $usersConfig->get( 'useractivation' );
if (is_array($ret) && $ret['success'] && !$useractivation) {
// Username and password must be passed in an array
$credentials = array('username' => $ret['user']->username,
  'password' => $ret['user']->password_clear
);
$return = $mainframe->login($credentials);


This part should do the correct login, but it is skipped completely because when it reaches this part the variable '$currentUser' is never '0', but has the value of the new user ID that is created when the entered userdata is stored... SO, first change the first line to:

if($currentUser->id!=0){

then you can see the return of this part sould be the login action, but the line '$return = $mainframe->login($credentials);' does not do anything, change it also to:

return $mainframe->login($credentials);

After this you are correctly logged into Joomla and Virtuemart 2!

I'm not a VM developer, but I hope this fix makes any sense and I also hope my logic is correct !?
Also I hope this bug can be resolved in future updates of VM2!


pbc278

Quote from: pbc278 on June 15, 2012, 01:31:16 AM
then you can see the return of this part sould be the login action, but the line '$return = $mainframe->login($credentials);' does not do anything, change it also to:

This part was correct, sorry, did not know do a 'return' this way...
I was learned to write "return bla bla bla;" and not "$return = bla bla bla;"

sorry  :-[

cas

Thanks pbc.

Can someone on the VM team confirm this is being fixed in the next release?

Genius WebDesign

@pbc278

I have tried using your code, but it doesnt work for me. Im also using Virtuemart 2.0.6 with Joomla 2.5.4

Whenever a new customer completes an order and creates an account the completion page is shown but the login-module says that the customer is not logged in even though he/she is logged into Virtuemart. Another thing is that the cart is not empty after order completion either..

I hope you can help me with this.

Genius WebDesign

@pbc278

Update.. The thing about the cart not emptying was related to the payment plugin. Thats solved now.
The login after registration-issue is still a problem, though