Why don't my Customer Registration buttons work

Questions and answers about ShopSite Custom Templates

Why don't my Customer Registration buttons work

Postby Vernontnh » Thu Jul 01, 2010 12:48 pm

Hi:

I created a custom template based on the "Clean" series. As far as i know the only thing I did was put the cotent of eadh "page" or area in a table with a rule and put a hard-coded masthead at the top.

Both of those look right, but every button except "cancel" does not work. Why! Does this template not like tables? Below is an example from the file:

### New Customer Registration Page ###
[-- DEFINE New_Registration --]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
[-- VAR.Title STORE.NewRegistration --]

<table width="935" border="1" cellspacing="0" cellpadding="0">
<tr>
<th width="935"align="center" style="border-collapse: collapse"border="0" valign="top" scope="col"><div align="center"><img src="https://www.mystore.com/store/sj_images/mystore-reg-header.jpg" width="937" height="101"></div>
</tr>
<tr>
<td><table width="935" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000">
<tr>


</th>
</tr>
<table align="center" cellspacing="10">
<tr>
<td align="center">
[-- CR_Name --]
</td>
</tr>
<tr>
<td align="center">
[-- CR_Email_Password --]
</td>
</tr>
<tr>
<td align="center">
[-- CR_Challenge --]
</td>
</tr>
<tr>
<td align="center">
[-- CR_email_type --]
</td>
</tr>
<tr>
<td align="center">
[-- CR_Save_Payment --]
</td>
</tr>
<tr>
<td align="center">
<p align="center">[-- BUTTON Save --]&nbsp;[-- BUTTON Cancel --]</p> [-- END_DEFINE New_Registration --] </td>
</tr>
</table></td>
</tr>
</table>

### Registered Customer Sign-In Page ###
[-- DEFINE Sign_In --]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
[-- Var.title STORE.SignIn --]
<table width="935" border="1" cellspacing="0" cellpadding="0">
<tr>
<th width="935"align="center" style="border-collapse: collapse"border="0" valign="top" scope="col"><div align="center"><img src="https://www.mystore.com/store/sj_images/mystore-reg-header.jpg" width="937" height="101"></div>

</th>
</tr>
<tr>
<td><p><div class="email_div">[-- STORE.UseSignInEmail --]</div></p>

<div class="email_div">[-- CR_Signin_Email_Password --]</div>

<p align="center">[-- BUTTON SignIn --]&nbsp;[-- BUTTON BackToCart --]</p>[-- END_DEFINE Sign_In --]
</td>
</tr>
</table>


### Sign Out "Are you sure?" Page ###
[-- DEFINE Sign_Out_Confirmation --]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
[-- Var.title STORE.SignOutConfirmation --]
<table width="935" border="1" cellspacing="0" cellpadding="0">
<tr>
<th width="935"align="center" style="border-collapse: collapse"border="0" valign="top" scope="col"><div align="center"><img src="https://www.mystore.com/store/sj_images/my-reg-header.jpg" width="937" height="101"></div>

</th>
</tr>
<tr>
<td<p>[-- STORE.SignOut? --]</p>

<p align="center">[-- BUTTON Yes --]&nbsp;[-- BUTTON No --][-- END_DEFINE Sign_Out_Confirmation --]</p></td>
</tr>
</table>

Thanks,

Vernon
Vernontnh
 
Posts: 59
Joined: Wed Nov 05, 2008 6:50 am
Location: USA

Postby Jim » Thu Jul 01, 2010 1:39 pm

The code must be complete html pages between the [-- DEFINE xx --] and [-- END_DEFINE xx--] Your code does not have the code to do that. Also Items submitted from a form must be in <form> </form> and I don't see any form tags in your code.

In the Clean theme there is a section [-- INCLUDE Clean-crHeader.sst PROCESS --] which puts all of the beginning html code and opens a <form> . At the end of each section is [-- INCLUDE Clean-crFooter.sst PROCESS --] which closes the </form> and the html page. So if you are going to leave those tags out you must put in the html code that they include that opens or closes the html page.


Also all html code must be between the [-- DEFINE xx --] and [-- END_DEFINE xx--] tags. In the code you posted you have
Code: Select all
<p align="center">[-- BUTTON Save --]&nbsp;[-- BUTTON Cancel --]</p> [-- END_DEFINE New_Registration --] </td>
</tr>
</table></td>
</tr>
</table>

so some of the html code is outside of the [-- END_Define XX --] so will probably not be included on the page which may result in broken tables, images or what ever is in the table.

I also believe that the [-- DEFINE xx --] and [-- END_DEFINE xx--] need to start on lines by themselves and not be a continuation of a line of code. I.E.

Code: Select all
 [-- DEFINE xx --]
# all your code goes here
 [-- END_DEFINE xx--]


and not
Code: Select all
[-- DEFINE xx --] your code here on the same line [-- END_DEFINE xx--]

In order to verify that my opening and closing tags match I like to put the start tag on one line and have the end tag on a different line but indented to the same level so I can easily see when the tags match up. If there is something missing it is easy to spot. For example
Code: Select all
#
# Sign In
#
#  This is a comment that has a # as the first character of the line 
[-- DEFINE SIGN_IN --]
    [-- INCLUDE xx process --]
    [-- IF VAR.xx --]
         do this code
    [-- ELSE --]
         [-- IF VAR.YY --]
              do this code here
        [-- ELSE --]
              do this
        [-- END_IF --]
    [-- END_IF --]
    more code goes here
[-- END_DEFINE SIGN_IN --]
#

I realize that the forum may have messed up your code indentation so you may already be doing the above. To display code in the forum and keep its formatting you can select the block of code and click the "Code" button above the edit box.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah


Return to Custom Template Questions

Who is online

Users browsing this forum: No registered users and 28 guests

cron