Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- Copyright of Mophilly Technology Inc.
- Template Name: Shopping Cart
- Version 2.1
- */
- get_header(); ?>
- <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
- <?php get_template_part('includes/breadcrumbs'); ?>
- <?php if (get_option('magnificent_integration_single_top') <> '' && get_option('magnificent_integrate_singletop_enable') == 'on') echo(get_option('magnificent_integration_single_top')); ?>
- <div id="entries">
- <div class="entry post entry-full">
- <div class="border">
- <div class="bottom">
- <div class="entry-content clearfix">
- <h1 class="title"><?php the_title(); ?></h1>
- <?php if (get_option('magnificent_page_thumbnails') == 'on') { ?>
- <?php $thumb = '';
- $width = 218;
- $height = 218;
- $classtext = '';
- $titletext = get_the_title();
- $thumbnail = get_thumbnail($width,$height,$classtext,$titletext,$titletext);
- $thumb = $thumbnail["thumb"]; ?>
- <?php if($thumb <> '') { ?>
- <div class="thumbnail">
- <?php print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext, $width, $height, $classtext); ?>
- <span class="overlay"></span>
- </div> <!-- end .thumbnail -->
- <?php }; ?>
- <?php }; ?>
- <?php // begin custom code
- global $current_user;
- get_currentuserinfo();
- //08/26 2012 mophilly; check for valid user registration
- $isregistered = false;
- $log_text = 'Shopping Cart Page: Current user id is ' . $current_user->ID;
- $mo_debug->log_msg($logText,true);
- echo $log_text;
- if ( isset($current_user->ID) && $current_user->ID == 0 ) { ?>
- <div id="logon-register">
- <p>Please sign on or register a new account to purchase classes and online training.</p>
- <p id="nav">
- <a href="#login-form" class="fancybox sav-nav" id="show-logon">Sign On To Your Account</a><br>
- <a href="#register-form" class="fancybox sav-nav" id="show-register">Create A New Account</a>
- </p>
- <br />
- </div>
- <?php } else {
- $customers = new Customer();
- $cust = $customers->getCustomerByWPid($current_user->ID);
- $log_text = 'Shopping Cart Page: Current customer id is ' . $cust['id'];
- $mo_debug->log_msg($logText,true);
- echo $log_text;
- if ( isset($cust['id']) && $cust['id'] > 0) {
- $registration = $customers->validate($cust, false);
- $log_text = 'Shopping Cart Page: Current registration is ' . $registration;
- $mo_debug->log_msg($logText,true);
- echo $log_text;
- if ( $registration !== '' ) { ?>
- <div id="account-register">
- <p>Your registration is incomplete. Please visit the "My Account" page to complete your registration.</p>
- <p id="nav">
- <a href="<?php echo get_permalink($profile_page_id) ?>" class="sav-nav" id="show-account">View My Account</a>
- </p>
- <br />
- </div>
- <?php }
- }
- }
- // end custom code ?>
- <?php the_content(); ?>
- <div class="fancybox-hidden" style="display:none">
- <div id="register-form">
- <div class="title">
- <h3>Create A New Account</h3>
- <div>
- <form name="registerform" id="registerform" action="<?php echo wp_login_url() ?>?action=register&redirect_to=<?php echo get_permalink() ?>" method="post">
- <input type="hidden" name="redirect_to" value="<?php echo get_permalink() ?>" />
- <div class="alignleft" style="width: 100%;">
- <label for="user_name">User Name<br />
- <input type="text" name="user_login" id="user_login_register" class="input reg_input" placeholder="your account name" value="" /></label> <small>This is the "account" name; keep it short</small>
- <br />
- <label for="user_email">Email Address<br />
- <input type="text" name="user_email" id="user_email" class="input reg_input" placeholder="your email address" value="" /></label> <small>This must be a working address</small>
- <br />
- <ul class="sav-nav">
- <li class="sav-nav" style="font-size: 18px;"><a id="AcceptRegister" href="#" >Register</a></li>
- <li class="sav-nav" style="font-size: 18px;" ><a id="CancelRegister" href="#" >Cancel</a> |</li>
- </ul>
- </div>
- <div class="alignleft" style="width: 100%;">
- <hr />
- <p class="statement">A password will be e-mailed to you.</p>
- <p class="statement">Please check your "junkmail" and "spam" mail box if you don't see it in your inbox.</p>
- </div>
- </form>
- </div>
- </div>
- <div id="login-form">
- <div class="title">
- <h3>Sign On To Your Account</h3>
- </div>
- <div>
- <form name="loginform" id="loginform" action="<?php echo wp_login_url(get_permalink()) ?>" method="post">
- <div class="alignleft" style="width: 100%;">
- <input type="hidden" name="redirect_to" value="<?php echo get_permalink() ?>" />
- <input type="hidden" name="testcookie" value="1" />
- <label for="user_login">Username<br />
- <input type="text" name="log" id="user_login_signon" class="input login_input" placeholder="your user name" value="" />
- </label> <br /> <label for="user_pass">Password<br />
- <input type="password" name="pwd" id="user_pass" class="input login_input" placeholder="your password" value="" />
- </label>
- <ul class="sav-nav">
- <li class="sav-nav" style="font-size: 14px;"><a id="AcceptLogin" href="#" >Sign-In</a></li>
- </ul>
- </div>
- <div class="alignleft" style="width: 100%;">
- <hr />
- <label for="rememberme">
- <input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="90" />
- Remember Me</label>
- </div>
- </form>
- </div>
- <a href="<?php echo wp_lostpassword_url() ?>" title="Password Lost and Found">Lost your password?</a>
- </div>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement