News:

Support the VirtueMart project and become a member

Main Menu

How to redirect "Register and checkout" button in VM2

Started by fenilananinicar, December 12, 2011, 19:12:49 PM

Previous topic - Next topic

fenilananinicar

Hi,

question:How to redirect "Register and checkout" button in VM2

I looked in com_virtuemart/views/user but there's noting there which saying where to redirect page.

I read on forum that I must change some code in ps_shopper.php, but in VM2 I cant find such a file.

Which code I must change, which file, which folder?

Please, can someone help me?

PRO


fenilananinicar

HI, tnx for a reply.

I want to redirect user to the same page where he fill the registration form :

/index.php?option=com_virtuemart&view=user&task=editaddresscheckout&addrtype=BT

, and write him a message that his registered now, and ask him to login.

Can you explain me where I must change the code?


Milbo

He logs in automatically, when you allow that in your joomla settings.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

fenilananinicar

Hi,

If I understand right, in Joomla settings I must set "New user activation" to NO, for that. Is it? Or I must set something else?

I set it like I explained and user isn't logged in after registration.

By the way, I also redirected new user to:

/index.php?option=com_virtuemart&view=user&task=editaddresscheckout&addrtype=BT

when they click on ADD_TO_CART  button, in case there are guests. So there they can login if they have an account, or register if they don't.

Just to mention, I'm using Joomla 1.5.  and VM2 RC2.

So, where I show put a code for redirection? Or you have another suggestion?


Milbo

?
the cart itself shows the possibility to login. I do not really understand your idea of the mod.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

fenilananinicar

My cart doesn't have possibility to login. I use version RC2G.

All I want is that user login before they start shopping, and if they do not have account, to register and then login.

Because I do not use Joomla login and registration form ( bacause lack of information needed for shop) I need to redirect users who do register to the same page where they filled a registration form, and ask them to login. A assume that this isn't hard to do with code.

So if you just can tell me where I should look for that in a files?

Really appreciate.

Milbo

You must update to M, you cant update to the final without the M version. This is very important!
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

fenilananinicar

I already changed a lot of files, I can't update now, or I loose all that, wont I?

So I just want to redirect register page, "Register and checkout" button actually, can you explain me how?


Milbo

It depends which files. All file layouts can be put in a template and use the joomla template override method. You should update to the final and then start to mod vm2. And you must learn how to use template overrides.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

PRO


fenilananinicar

:)

This start to look like Monty Python scene dialog.

We have discussion already, but you all guys seems to avoid answering on my very_strait_forward question which I asked few times till now:

How to redirect "Register and checkout" button in VM2??

So I need to repeat that.

I'm using VM RC2 version and Joomla 1.5.

I read on forum that I must change ps_shopper.php, in folder classes. But in this version of VM there is no such folder and such file.

So, please, can someone explain that to me?

PRO

I guess you can TRY to change the form

<button class="button vm-button-correct" type="submit" onclick="javascript:return callValidatorForRegister(userForm);" title="Register And Checkout">Register And Checkout</button>

Milbo

#13
Quote from: fenilananinicar on December 13, 2011, 16:29:45 PM
How to redirect "Register and checkout" button in VM2??

I must admit, that I do not understand your question. From my point of view it is like someone asking for the pedals sitting on a motorbike and therefore I cant answer it.

Because the Register and checkout button IS doing a redirect. So when you do not understand this simple fact, why you start to mod files? sorry.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

alatak

Hi,

QuoteI read on forum that I must change ps_shopper.php, in folder classes. But in this version of VM there is no such folder and such file.
There are 2 versions of VirtueMart. The version 1, and the one you installed which is version 2.
The file ps_shopper.php comes from version 1, and NOT from version 2.
So the solutions that you migth have read saying that you should change that file are not valid for VM2.

QuoteHow to redirect "Register and checkout" button in VM2
where do you want to redirect the user?
It should be to the cart, and it is done like that.