Jump to content

[solved] Info after Submit registration form


Recommended Posts

Hi,

 

As I would like to register customers manually i turned off login after registration - so bassicly after user Submit registration form Presta doesn't log him in automatticly.

 

Now i'd like to add a info for a user after submiting registration form. Something like:

Thx for registration, we will send You and emeil...blah...blah.

 

So i've tried to add some onSubmit action to my input in authentication.tpl, but unfortunatly without any succes.

 

Thx for any help or suggestions.

Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...

Hi, 

In authentication.tpl file, line 158 (can be different because of some javascripts at the top of the file):

<form action="{$link->getPageLink('authentication', true)}" method="post" onsubmit="greeting()" id="account-creation_form" class="std">

so as You can see i've added

onsubmit="greeting()"

where greeting is my js function.

Link to comment
Share on other sites

hi i have insert:

<form action="{$link->getPageLink('authentication', true)}" method="post"onsubmit="greeting( New registration requires the approval of the site owner.We will review and activate your account shortly and email when you can start using our shop)" id="create-account_form" class="std">

 

but nothing happen

Link to comment
Share on other sites

Hi,

It wont work like that. "greeting" is java script function, You need to write this function at the top of the page, where the java script code is located. The simplest example:

<script>
function greeting()
{
alert("New registration requires the approval of the site owner.We will review and activate your account shortly and email when you can start using our shop")
}
</script>

of course this function doesnt have to show an alert. For ex. it could show some hidden div - if You are looking for good looking solution as alerts are always displayed in system windows.

Link to comment
Share on other sites

Try to replace greeting funciotn code to:

window.location="http://www.newlocation.com";

where You can specify page url that You want redirect to.

Another more elegant solution is prepare a message box - a div that You can style with css.

Ex. 

showroom.konkretpr.pl - try to download a photo witohout loging in - You will see a message window with proper info - styled with css.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...