'Send Registration' redirecting to index.php? for new VirtueMart accounts

Hi,

For some reason when a new user hits the 'Send registration' button to register a new account, they are redirected to index.php with nothing but the confirmation message displayed.

The account is setup & everything works fine, only the index page has lots of images and the message is actually pushed below the users view. This is unnerving and confusing.

How can I make the button redirect to a different page?

I run joomla 1.5, virtuemart 1.14, new account activation is turned on.

I have been searching for a while, seems a common problem but no common fix available.

Please help, 500 up for grabs
TonyCaboneAsked:
Who is Participating?
 
Jesse MatlockUX EngineerCommented:
I hear ya.. wish I had better news (eg. a solution) but glad to hear you were able to use a 'fix' by allowing auto registration!


In the future, for ecommerce, I would highly recommend you check out these other carts,.. they each have their pros and cons.. but they work. Which is key :D

http://foxycart.com (hosted, so costs each mo.)
http://nano-cart.com (similar to above, but you purchase a license, no monthly fees)
http://dragdropcart.com/  (a cheap, simple cart..)

All the above are obviously for light ecommerce, and not intended for high end commercial use where QuickBooks sync, gift certs and the like are used. For that, go with Interspire Shopping Cart.. hands down the best, most reliable eCommerce platform this side of 10 figure carts.
0
 
Jesse MatlockUX EngineerCommented:
Hey Tony.. what version of Joomla are you running ? (1.5.??)
0
 
TonyCaboneAuthor Commented:
1.5.15
0
Network Scalability - Handle Complex Environments

Monitor your entire network from a single platform. Free 30 Day Trial Now!

 
TonyCaboneAuthor Commented:
FYI
 - optional account registration
 - account activation ON
 - secure url & home page url are the same (http//www.....)
 - HOMEPAGE: shop.index
 - ERRORPAGE: shop.error
0
 
Jesse MatlockUX EngineerCommented:
Great.. ok..
You should be able to open:
components/com_virtuemart/themes/default/templates/common/login_form.tpl.php
(change the name of the theme if you're NOT using the default one, of course)

and at the bottom.. change this:
      <input type="hidden" name="return" value="<?php echo $return_url ?>" />
To:
      <input type="hidden" name="return" value="URL_WHERE_YOU_WANT_TO_REDIRECT" />

TEST and let me know how it goes... ;)
0
 
TonyCaboneAuthor Commented:
Sorry cloud9, same problem still exists. We go to a page where VM component & modules appear underneath the images I have on the index page.
0
 
Jesse MatlockUX EngineerCommented:
And you changed the URL to where you WANT the user to be redirected? Ok.. do you have a link to your site?
0
 
Jesse MatlockUX EngineerCommented:
Also, are you using the Joomla reg/login form or VM reg/login form?
0
 
TonyCaboneAuthor Commented:
The same site you helped me with on the last thread.

VM reg/login form & VM login module (where there is a 'register' link that takes you to the form)
0
 
TonyCaboneAuthor Commented:
re
"And you changed the URL to where you WANT the user to be redirected? Ok.. do you have a link to your site?"

I tried relative & absolute url, neither made a difference so I've reverted to original code for now.
0
 
Jesse MatlockUX EngineerCommented:
OK. great.. then we're looking at the VM module.. makes sense.

Ok, first.. check in the VM login module settings itself. for what u have set for the redirection.. set it to 'same page' and let me know what that does..

Alternatively, if we can connect directly (email or IM) we can run through this more quickly,.. and reply here with solution once solved.. what ever you're comfortable with.
0
 
TonyCaboneAuthor Commented:
Has always been set to same page. It doesn't seem to effect anything no matter what I change it to.

tonycabone@gmail.com

thank you
0
 
TonyCaboneAuthor Commented:
Merry Christmas to you by the way! Probably time for us to take a break from coding! :D
0
 
Jesse MatlockUX EngineerCommented:
Merry Christmas to you as well Tony! Yes, I think a break is very appropriate.. I'll connect with you after the weekend.. and we'll get this cleared up.
0
 
TonyCaboneAuthor Commented:
Happy new year!!

Any more ideas on possible solutions for this problem?
0
 
Jesse MatlockUX EngineerCommented:
Hi Tony.. Happy New Year to you too!

ok, back in the game, lets this:
Go to:
administrator/components/com_virtuemart/html/checkout_register_form.php
Open that file and on line 32 or there about, you should see this:

      vmRedirect( $sess->url( 'index.php?page='.HOMEPAGE, true, false ), $msg );


Try changing the url to something absolute, just to see if this is creating the desired effect, like your contact page - something like this:

      vmRedirect( $sess->url( 'index.php?option=com_aicontactsafe&view=message&layout=message&pf=1&Itemid=54, true, false ), $msg );


And let me know if that works.. this is just to let us know we're on the correct piece of code to track this down..

Boy, this is one reason why we stopped using VM, it is just unpredictable.. one install works, another doesn't, another yet again breaks in a different area lol. good times. !
0
 
TonyCaboneAuthor Commented:
hmm when I change that I get "Parse error: syntax error, unexpected T_DNUMBER...." when I try to navigate to registration form
0
 
TonyCaboneAuthor Commented:
CORRECTION

if I enter a complete url (http://www.site.com.au/page32) the registration form works but still redirects to index page

T
0
 
Jesse MatlockUX EngineerCommented:
Interesting. ok. I will research further and see what we find.
0
 
Jesse MatlockUX EngineerCommented:
Tony,
are you using Joomla SEF or any other .htaccess re-writes on this site?
0
 
Jesse MatlockUX EngineerCommented:
OK, try this:

open this file:
administrator/components/com_virtuemart/classes/ps_shopper.php and at or around line 460, you will see this:
[code]
                  if( !empty( $_SESSION['cart']['idx'])) {
                        $redirect_to_page = 'checkout.index';
                  } else {
                        $redirect_to_page = HOMEPAGE;
                  }
                  vmRedirect( $sess->url( 'index.php?page='.$redirect_to_page, false, false ), $VM_LANG->_('REG_COMPLETE') );
            }
[/code]


Change this part:
[code]
vmRedirect( $sess->url( 'index.php?page='.$redirect_to_page, false, false ), $VM_LANG->_('REG_COMPLETE') );
[/code]

To this:
[code]
vmRedirect( $sess->url( 'http://www.domain.com/page-to-redirect-to/', false, false ), $VM_LANG->_('REG_COMPLETE') );
[/code]
0
 
TonyCaboneAuthor Commented:
Still get the 'Cart' attaching itself to the frontpage template :( Even if I enter "www.google.com", the problem prevails.

Could this be a template issue? If the cart redirected to a page with the default template it be ok but for some reason it always uses the template assigned to the front page. What a pain!

Appreciate your patience & ongoing assistance, surely we're nearly there..
0
 
TonyCaboneAuthor Commented:
What about "$redirect_to_page = HOMEPAGE" ?

Could that have anything to do with it? Please excuse me if it seems a silly question, I'm not an expert coder.

Thanks again.
0
 
Jesse MatlockUX EngineerCommented:
The problem with changing: $redirect_to_page = HOMEPAGE" is that this is only a part of the equation.. if you look at vmRedirect, you will see that HOMEPAGE only inserts a 'page' name.. not the URL.. so, it may insert something like 'page=shop.registration' etc.. so, just changing that variable will break the redirect, it may actually keep you on the same page, but it'll throw errors as well.

Ok, let's try this 'hack' and see if it works.

Create a php file with this content:

<?php
if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' );

header( 'Location: http://www.domain.com/page-to-redirect-to-after-registration/' ) ;
?>

Change the URL to the exact URL you want the person to go to after registration, like the main store page, etc.

and place it in the administrator/components/com_virtuemart/html directory

Then, in VM Admin go to Configuration - Security Tab and change the Homepage field to:
shop.redirect

Test this and see if that works..

0
 
TonyCaboneAuthor Commented:
what should the file be called?
0
 
TonyCaboneAuthor Commented:
i tried calling it shop.redirect.php but the same problem still exists.
0
 
Jesse MatlockUX EngineerCommented:
Hi Tony,
Yes, name the file sop.redirect.php - sorry for not including that in the description.

Well, at this point... and without any response from the VM developers,.. the best I can do is continue to search/try new solutions...

Please double check that your Store and Secure URLs are correct, turn OFF any SEO, set Account Registration to Optional and see if that resolves the error.

I'll hang in here with you and do the best I can ;)
0
 
TonyCaboneAuthor Commented:
Store & Secure URL's are the same, both to the root directory and both http://
SEF/SEO turned off
Still set to optional account registration.

Thanks for your help thus far. I can't believe a solution is proving so difficult!! I will perhaps request some attention from moderators.
0
 
Jesse MatlockUX EngineerCommented:
I hear ya.. to be honest, this is all supposed to be internally controlled within VM, it just never works right lol. Again, I really want to 'love' VM, have even contributed to the project, etc.. but, I stopped using it some time back because of these types of issues, and the Devs not addressing these types of bugs even after major version changes.. But, we'll press on and see what we can find out.. ;D
0
 
TonyCaboneAuthor Commented:
Appreciate your enthusiasm cloud9- I really can't afford to give up on this one :o
0
 
Jesse MatlockUX EngineerCommented:
;) I hear ya.. this is an important user experience piece, part of my frustration with it since UI/UX is my passion.. here for the ling haul.
0
 
Jesse MatlockUX EngineerCommented:
Hey Tony,
Please be sure to revert the changes we've made so far, remove the shop.redirect.php file and return your HOMEPAGE field in VM admin > configuration > security to shop.index

:)
0
 
Jesse MatlockUX EngineerCommented:
I've posted a Bug to the VM tracker.. please let me know if you would like anything added to it:
http://dev.virtuemart.net/cb/issue/2843

Also, just to make sure, what versions of Joomla an VM are installed?
0
 
TonyCaboneAuthor Commented:
Joomla! 1.5.15 Stable [ Wojmamni Ama Mamni ] 05-November-2009 04:00 GMT

VM 1.14
0
 
Jesse MatlockUX EngineerCommented:
Hi Tony..

Well, I have searched, scoured,.. even installed and trouble shot this to no end. I cannot reproduce this error on my new install ALTHOUGH I KNOW we have been faced with this before on another install! As a developer, this is one of the frustrating parts about VM,.. it's highly inconsistent and unreliable. I'll keep looking for the cause,.. but at this point, without feedback from VM on the bug I have submitted.. we're kinda sitting here, waiting.
0
 
TonyCaboneAuthor Commented:
Howdy cloud9,

Yes no one seems to be keen to assist (apart from yourself) so I'm also sitting and waiting! Oh well, the joys of IT.

I've convinced the client to go with automatic registration which eliminates the problem.

T
0
 
TonyCaboneAuthor Commented:
Thanks for the tip, I assume they're not compatible with Joomla!

What about OS commerce?

Noticed you're racking up the points, nice work!
0
 
TonyCaboneAuthor Commented:
Thanks for all your help, looks like we'll have to give up on this one considering the developers won't come to the party.
0
 
Jesse MatlockUX EngineerCommented:
Hey Tony,

Thanks for the accepted answer! Actually, the first two carts I listed are 'inclusion' type carts... so you include them into an existing website/design.. the last one is more of a standard cart with a store front, etc.. that you can restyle to look like your Joomla site, etc.
The inclusion type carts are great because they allow you to include a file (or two) into the head code of you site, and then place forms for each product you wish to sell. They each have an admin area for setting up config settings, payment and shipping vendors, etc. But, basically, they are a more scalable, reliable solution to using Paypal's cart and you keep the buyers on your store.

Nano-cart is still in beta, and is the lighter of the two. The nice thing about Nano-Cart is that you buy a license and own it.. you dont have to pay hosting fees for the cart each month.

FoxyCart has more features, because its been out longer.. but, you have to pay $19 a month for it..  So, depends on what you need, the clients budget, etc..

OsCommerce has been around a LONG time.. and is a decent app.. but it's dated just like VM and has many limitations. One aspect that can't be changed in OSC is the admin interface.. which is AWFUL ! If you decide to go with OSC, then buy the 'customized' version from CRE Loaded. It's costs money, but you actually get the app setup the way it should be, so it works properly and is reliable, etc.

That's our take on commerce apps.. we've been building commerce sites for the last 6-7 years and have really been unimpressed with the available offerings in the 'lower to middle end'. This year our team is planning on introducing a new cart system for Joomla 1.6, but that wont be till year end.

Take care and let me know if you need anything else!
0
 
Amanda WatsonWeb DeveloperCommented:
Did you guys ever find a solution to this?

I have a thread opened with the same question....I just want to change the redirect after some submits registration?

0
 
chiboy007Commented:
Hi Guys,
I too really really need to know the solution to this problem.
Im using the Virturemart registration form, after registering i need the user to be redirected to a "Thank you , please check your email for the activation link" page, but however it gets redirected to index.php.

This is really frustrating, ive tried everything...virtuemart forum has no answers to this issue. Apparently still hasn't been fix.
Basically i done and have everything that Tony has done.
My site is http://www.allstarfitness.com.au/ its live and i really need to fix it asap.

any help would be much appreciated. Thanks in advanced

Chi
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.