Announcement

Collapse
No announcement yet.

LOGIN form on OCST page?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    LOGIN form on OCST page?

    Is it possible to put a LOGIN form at the top of the OCST page? I've tried copying the code from the other login pages, but it did not work.

    We'd like to have customers go straight to this page, bypassing the OINF screen, and either entering billing/shiping info or logging in - rather than choosing whether or not to enter info or login or checkout without account. Then use phosphormedia's EasyAccount module at the end to encourage account signup.

    Does anyone have the code snippet for making the form function on this page? Below is what I tried

    Code:
    <h3>Sign In</h3>
                        <mvt:if expr="l.settings:messages:error_message_count">
                        <div class="error-message">
                        <mvt:foreach iterator="error" array="messages:error_messages">
                            &mvt:error;
                        </mvt:foreach>
                        </div>
                        <mvt:elseif expr="l.settings:messages:information_message_count">
                        <div class="information-message">
                        <mvt:foreach iterator="message" array="messages:information_messages">
                            &mvt:message;
                        </mvt:foreach>
                        </div>
    
                        </mvt:if>
                        
                        <div class="form_row">
    Username OR Email:
    
    <mvt:if expr="('Invalid Password' CIN g.Error_Messages) AND g.Customer_Email_Login">
    <input type="text" size="28" name="Customer_Login" value="&mvte:global:Customer_Email_Login;">
    <mvt:else>
    <input type="text" size="28" name="Customer_Login" value="&mvte:global:Customer_Login;">
    </mvt:if>
    
                        </div>
                        <div class="form_row">
                            <label for="Customer_Password">Password:</label><input type="password" name="Customer_Password" id="Customer_Password" class="textfield logn-input" />
                        </div>
                        <div class="clear"></div>
                        <div class="sign-in-buttons"><mvt:item name="buttons" param="login" /></div>
                        <div class="forgot-password"><a href="javascript:document.forms[ 'logn' ].elements[ 'Action' ].value = 'EMPW'; document.forms[ 'logn' ].submit();">Forgot password?</a></div>
    Thanks!

    #2
    Re: LOGIN form on OCST page?

    I'm fairly confident this is achievable (it's something on my short list to do on our website), but you haven't given me enough of the code you are using to see where the problem is. Where's the <form> part of your code?

    Comment


      #3
      Re: LOGIN form on OCST page?

      Here's the full thing.
      I think the hidden values SCREEN and ACTION may need to be changed?
      Brandon, in your setup, do you plan on skipping the shipping/billing info or just reloading that page once logged in? For us, it is probably best to reload the OCST screen so they can change shipping info if needed...

      Code:
      <form name="logn" action="&mvt:global:secure_sessionurl;" method="post">
                      <input type="hidden" name="Store_Code" value="&mvte:store:code;" />
                      <input type="hidden" name="Screen" value="OCST" />
                      <input type="hidden" name="Action" value="LOGN" />
      <h3>Sign In</h3>
                          <mvt:if expr="l.settings:messages:error_message_count">
                          <div class="error-message">
                          <mvt:foreach iterator="error" array="messages:error_messages">
                              &mvt:error;
                          </mvt:foreach>
                          </div>
                          <mvt:elseif expr="l.settings:messages:information_message_count">
                          <div class="information-message">
                          <mvt:foreach iterator="message" array="messages:information_messages">
                              &mvt:message;
                          </mvt:foreach>
                          </div>
      
                          </mvt:if>
                          
                          <div class="form_row">
      Username OR Email:
      
      <mvt:if expr="('Invalid Password' CIN g.Error_Messages) AND g.Customer_Email_Login">
      <input type="text" size="28" name="Customer_Login" value="&mvte:global:Customer_Email_Login;">
      <mvt:else>
      <input type="text" size="28" name="Customer_Login" value="&mvte:global:Customer_Login;">
      </mvt:if>
      </div>
                          <div class="form_row">
                              <label for="Customer_Password">Password:</label><input type="password" name="Customer_Password" id="Customer_Password" class="textfield logn-input" />
                          </div>
                          <div class="clear"></div>
                          <div class="sign-in-buttons"><mvt:item name="buttons" param="login" /></div>
                          <div class="forgot-password"><a href="javascript:document.forms[ 'logn' ].elements[ 'Action' ].value = 'EMPW'; document.forms[ 'logn' ].submit();">Forgot password?</a></div>
                          
                      </div>
      </form>

      Comment


        #4
        Re: LOGIN form on OCST page?

        One other thing, you would want a conditional to HIDE the login form if already logged in, right?

        Comment


          #5
          Re: LOGIN form on OCST page?

          That's exactly the way I would have tried it, josiahjg. Try changing <input type="hidden" name="Screen" value="OCST" /> to <input type="hidden" name="Screen" value="OINF" />

          I would choose to still keep them on the OCST screen so that they can review the address before continuing.

          To hide the login form if they are already signed in, just wrap it in with <mvt:if expr="g.basket:cust_id NE 0"></mvt:if>

          Comment


            #6
            Re: LOGIN form on OCST page?

            Thanks!
            <mvt:if expr="g.basket:cust_id NE 0"></mvt:if>
            Actually hides it when NOT logged in, and shows it when logged in? The opposite of what we want to do. I tried NE 1 and that is not it.

            Comment


              #7
              Re: LOGIN form on OCST page?

              Sorry, Friday just before a holiday break. Go for this: <mvt:if expr="g.basket:cust_id EQ 0"> .. customer is not logged in .. </mvt:if>

              Comment


                #8
                Re: LOGIN form on OCST page?

                Thanks, that works great!

                One more thing, I want to change the text for Order Details if they ARE logged in (as in, after they login), what would that code be? Below is what I have now, for the final product in case it helps anyone.

                The only thing left is <mvt:if expr="g.basket:cust_id EQ 1"> (instead of EQ 0) doesn't work for logged in customers.


                Code:
                <mvt:if expr="g.basket:cust_id EQ 0"><h1>Enter Billing/Shipping Address</h1></mvt:if>
                <mvt:if expr="g.basket:cust_id EQ 1"><h1>Confirm Billing/Shipping Address</h1></mvt:if>
                
                <mvt:if expr="g.basket:cust_id EQ 0">
                <div class="ocst-signin-div">
                <div class="ocst-sign-in-buttons">
                <form name="logn" action="&mvt:global:secure_sessionurl;" method="post">
                                <input type="hidden" name="Store_Code" value="&mvte:store:code;" />
                                <input type="hidden" name="Screen" value="OINF" />
                                <input type="hidden" name="Action" value="LOGN" />
                <font size="-2">Already have an account? Sign In here. <br>
                If not, continue checking out and <br>you can create an account later.</font>
                                    <mvt:if expr="l.settings:messages:error_message_count">
                                    <div class="error-message">
                                    <mvt:foreach iterator="error" array="messages:error_messages">
                                        &mvt:error;
                                    </mvt:foreach>
                                    </div>
                                    <mvt:elseif expr="l.settings:messages:information_message_count">
                                    <div class="information-message">
                                    <mvt:foreach iterator="message" array="messages:information_messages">
                                        &mvt:message;
                                    </mvt:foreach>
                                    </div>
                
                                    </mvt:if>
                                    
                                    <div class="ocst_form_row">
                <i>Username OR Email:</i>
                
                <mvt:if expr="('Invalid Password' CIN g.Error_Messages) AND g.Customer_Email_Login">
                <input type="text" size="28" name="Customer_Login" value="&mvte:global:Customer_Email_Login;">
                <mvt:else>
                <input type="text" size="28" name="Customer_Login" value="&mvte:global:Customer_Login;">
                </mvt:if>
                </div>
                                    <div class="ocst_form_row">
                                        <label for="Customer_Password"><i>Password:</i> </label><input type="password" name="Customer_Password" id="Customer_Password" class="textfield logn-input" />
                                    </div>
                                    <div class="clear"></div>
                                    <div class="ocst-sign-in-buttons"><mvt:item name="buttons" param="login" /></div>
                                    <div class="ocst-forgot-password"><a href="javascript:document.forms[ 'logn' ].elements[ 'Action' ].value = 'EMPW'; document.forms[ 'logn' ].submit();">Forgot password?</a></div>
                                    
                                </div>
                </form>
                </div>
                </div>
                <br><br><br><br><br>
                </mvt:if>

                Comment


                  #9
                  Re: LOGIN form on OCST page?

                  Got it, just needed an <mvt:else> of course!

                  Comment


                    #10
                    Re: LOGIN form on OCST page?

                    <mvt:if expr="g.basket:cust_id EQ 0"> .. customer is not logged in .. </mvt:if>
                    <mvt:if expr="g.basket:cust_id GT 0"> .. customer is logged in .. </mvt:if>

                    Or use <mvt:else> if it makes sense.

                    Comment


                      #11
                      Re: LOGIN form on OCST page?

                      How are you handling error messaging?

                      I found that if g.customer_login_invalid OR g.customer_password_invalid then user is redirected to LOGN (if screen = OINF) or ORDL (if screen = OCST).

                      I've tried a PREACTION_OCST_LOGN redirect but that didn't work.

                      I would like to keep the user on the OCST with error messaging. I don't want to kick them out of the checkout funnel.
                      http://www.alphabetsigns.com/

                      Comment


                        #12
                        Re: LOGIN form on OCST page?

                        I haven't found a good way to keep them on the OCST screen when errors are encountered with logging in.

                        Anyone have any ideas?

                        Comment


                          #13
                          Re: LOGIN form on OCST page?

                          Originally posted by alphabet View Post
                          How are you handling error messaging?

                          I found that if g.customer_login_invalid OR g.customer_password_invalid then user is redirected to LOGN (if screen = OINF) or ORDL (if screen = OCST).

                          I've tried a PREACTION_OCST_LOGN redirect but that didn't work.

                          I would like to keep the user on the OCST with error messaging. I don't want to kick them out of the checkout funnel.
                          Certain screens are hardcoded in Miva Merchant. I think regardless where you were when you submitted the log in form, if there are errors Miva Merchant will render the LOGN screen to display errors. You'd have to get creative (AJAX could be one option) to avoid kicking users back to LOGN.

                          Comment


                            #14
                            Re: LOGIN form on OCST page?

                            @josiahjg @Brandon_MUS

                            Thank you for your replies. I thought it might be a hardcoded redirect.

                            OCST-Login may be useful for merchants that have many logged-in users or a products base with many consumabales/repeat orders.

                            My product has a high guest checkout rate. Anecdotally, I have already had a few customers call and ask what their password was. We determined that they were confused by the OCST-Login.

                            I decided to add event tracking to the Login button to see what effect the OCST-Login would have to my checkout funnel.

                            Other merchants may be using different tags but I included:

                            Code:
                            // to track logged in customers
                            
                            <mvt:if expr="g.customer">
                            <script type="text/javascript">
                            var dataLayer =  dataLayer || [];
                            dataLayer.push({'login': '&mvt:global:customer:id;'});
                            </script>
                            </mvt:if>
                            
                            // to track OCST-Login submit event
                            
                            <input type="submit" value="Login" onclick="dataLayer.push({'event': 'GAevent', 'eventCategory' : 'OCST-Login', 'eventAction' : 'submit', 'eventLabel' : 'Returning Customer Login'});">
                            I'll be able to see what percentage of users click OCST-Login and how many become logged-in or get the redirect. I will also be able to see the effects to the check-out funnel.


                            I'll run the test for two weeks and report back for the craic of it. The point I'd like to make is that each merchant store is unique so should use analytics to see how OCST-Login affects their store.
                            http://www.alphabetsigns.com/

                            Comment


                              #15
                              Re: LOGIN form on OCST page?

                              How did this work out?
                              We are using AJAX/PHP and the customer's bill_email & bill_zip to populate the OCST page from the Orders table or Customer table. Customer isn't logged in but for our purposes it isn't necessary. Customer can still checkout.
                              Just installed a few days ago, looking for the results of this change now.
                              Larry
                              Last edited by wajake41; 02-28-13, 02:50 PM.
                              Larry
                              Luce Kanun Web Design
                              www.facebook.com/wajake41
                              www.plus.google.com/116415026668025242914/posts?hl=en


                              Comment

                              Working...
                              X