shopp('customer.registration-form')

Used on a Shopp customer registration form to output the action attribute.

shopp('customer', 'registration-form', 'options')

@param string $object the object or object.tag combination, if object.tag is used, the tag parameter can be omitted
@param string $tag the tag, can be hyphenated or not. Prefix with 'get' as shorthand for the return=true option
@param mixed $options associative array, or url-style name=value pairs separated by ampersands (&). Each pair is passed to the theme api tag as an option.
@returns void by default, the current request uri when the return option is used.

Alternative Forms

shopp('customer.registration-form', 'options');

Description

Used on a Shopp customer registration form to output the action attribute.

This theme api function also has the side effect of inserting the address regions table into the javascript environment. Use shopp(‘customer.register’) to output a submit button input to cause the registration form to be processed.

Universal Options

All Theme API calls have these options.

  • return: when set to true, 1, or on, this option forces the tag to return the value instead of displaying/echoing the value to the page. Alternatively, prefix the tag parameter with get to get the same effect. All theme api tags that return a boolean value will return by default.
  • echo: when set to false, 0, or off, this option forces the tag to display the value to the page. This is the default for all non-boolean tags.
  • is: when set to true, 1, or on, this option will evaluate the return of the theme api call as a boolean true or false value. See how values are converted to boolean.

Options

none

Examples



<form action="<?php shopp('customer.registration-form'); ?>" method="post">
<?php shopp('customer.register'); ?>
</form>


Example Registration Template Page Template

<?php
/**
 * Template Name: Store Registration
 */
wp_enqueue_style('shopp.catalog');
wp_enqueue_style('shopp');
shopp_enqueue_script('checkout');

get_header(); ?>



<div id="container">
        <div id="content" role="main">

        <?php
        /* Run the loop to output the page.
         * If you want to overload this in a child theme then include a file
         * called loop-page.php and that will be used instead.
         */
        get_template_part( 'loop', 'page' );
        ?>

        </div><!-- #content -->
        <div id="shopp">
        <form action="<?php shopp('customer.registration-form'); ?>" method="post" class="shopp validate" id="checkout">
            <?php shopp('customer.registration-errors'); ?>
            <?php shopp('checkout','function'); ?>
            <ul>
            <li>
                <label for="firstname"><?php _e('Contact Information','Shopp'); ?></label>
                <span><?php shopp('customer.firstname','required=true&minlength=2&size=8&title='.__('First Name','Shopp')); ?><label for="firstname"><?php _e('First','Shopp'); ?></label></span>
                <span><?php shopp('customer.lastname','required=true&minlength=3&size=14&title='.__('Last Name','Shopp')); ?><label for="lastname"><?php _e('Last','Shopp'); ?></label></span>
                <span><?php shopp('customer.company','size=22   &title='.__('Company/Organization','Shopp')); ?><label for="company"><?php _e('Company/Organization','Shopp'); ?></label></span>
            </li>
            <li>
            </li>
            <li>
                <span><?php shopp('customer.phone','format=phone&size=15&title='.__('Phone','Shopp')); ?><label for="phone"><?php _e('Phone','Shopp'); ?></label></span>
                <span><?php shopp('customer.email','required=true&format=email&size=30&title='.__('Email','Shopp')); ?><label for="email"><?php _e('Email','Shopp'); ?></label></span>
            </li>
        <?php if (shopp('customer.get-accounts') != "none"): ?>
            <li>
                <span><?php shopp('customer.loginname','required=true&size=16&title='.__('Login name','Shopp')); ?>
                <label for="email"><?php _e('Login name','Shopp'); ?></label></span>
            </li>
            <li>
                <span><?php shopp('customer.password','required=true&format=passwords&size=16&title='.__('Password','Shopp')); ?>
                <label for="email"><?php _e('Password','Shopp'); ?></label></span>
                <span><?php shopp('customer.confirm-password','required=true&format=passwords&size=16&title='.__('Password Confirmation','Shopp')); ?>
                <label for="email"><?php _e('Confirm Password','Shopp'); ?></label></span>
            </li>
        <?php endif; ?>
                <li></li>
                <li class="half" id="billing-address-fields">
                    <label for="billing-address"><?php _e('Billing Address','Shopp'); ?></label>
                    <div>
                        <?php shopp('customer.billing-address','required=true&title='.__('Billing street address','Shopp')); ?>
                        <label for="billing-address"><?php _e('Street Address','Shopp'); ?></label>
                    </div>
                    <div>
                        <?php shopp('customer.billing-xaddress','title='.__('Billing address line 2','Shopp')); ?>
                        <label for="billing-xaddress"><?php _e('Address Line 2','Shopp'); ?></label>
                    </div>
                    <div class="left">
                        <?php shopp('customer.billing-city','required=true&title='.__('City billing address','Shopp')); ?>
                        <label for="billing-city"><?php _e('City','Shopp'); ?></label>
                    </div>
                    <div class="right">
                        <?php shopp('customer.billing-state','required=true&title='.__('State/Provice/Region billing address','Shopp')); ?>
                        <label for="billing-state"><?php _e('State / Province','Shopp'); ?></label>
                    </div>
                    <div class="left">
                        <?php shopp('customer.billing-postcode','required=true&title='.__('Postal/Zip Code billing address','Shopp')); ?>
                        <label for="billing-postcode"><?php _e('Postal / Zip Code','Shopp'); ?></label>
                    </div>
                    <div class="right">
                        <?php shopp('customer.billing-country','required=true&title='.__('Country billing address','Shopp')); ?>
                        <label for="billing-country"><?php _e('Country','Shopp'); ?></label>
                    </div>
                    <div class="inline"><?php shopp('customer.same-shipping-address'); ?></div>
                </li>
                <li class="half right" id="shipping-address-fields">
                    <label for="shipping-address"><?php _e('Shipping Address','Shopp'); ?></label>
                    <div>
                        <?php shopp('customer.shipping-address','required=true&title='.__('Shipping street address','Shopp')); ?>
                        <label for="shipping-address"><?php _e('Street Address','Shopp'); ?></label>
                    </div>
                    <div>
                        <?php shopp('customer.shipping-xaddress','title='.__('Shipping address line 2','Shopp')); ?>
                        <label for="shipping-xaddress"><?php _e('Address Line 2','Shopp'); ?></label>
                    </div>
                    <div class="left">
                        <?php shopp('customer.shipping-city','required=true&title='.__('City shipping address','Shopp')); ?>
                        <label for="shipping-city"><?php _e('City','Shopp'); ?></label>
                    </div>
                    <div class="right">
                        <?php shopp('customer.shipping-state','required=true&title='.__('State/Provice/Region shipping address','Shopp')); ?>
                        <label for="shipping-state"><?php _e('State / Province','Shopp'); ?></label>
                    </div>
                    <div class="left">
                        <?php shopp('customer.shipping-postcode','required=true&title='.__('Postal/Zip Code shipping address','Shopp')); ?>
                        <label for="shipping-postcode"><?php _e('Postal / Zip Code','Shopp'); ?></label>
                    </div>
                    <div class="right">
                        <?php shopp('customer.shipping-country','required=true&title='.__('Country shipping address','Shopp')); ?>
                        <label for="shipping-country"><?php _e('Country','Shopp'); ?></label>
                    </div>
                </li>
                <li>
                    <div class="inline"><label for="marketing"><?php shopp('customer.marketing'); ?> <?php _e('Yes, I would like to receive e-mail updates and special offers!','Shopp'); ?></label></div>
                </li>
            </ul>
            <p><?php shopp('customer.register'); ?></p>
        </form>
        </div><!-- #shopp -->
    </div>

<!-- #container -->
<?php
    get_sidebar();
    get_footer();

See Also

  1. Avatar of jiajiagreetings

    does this still work with shopp 1.2.3?

    October 30th   #

  2. Avatar of wbickley

    As of Shopp 1.3 you no longer need the following functions as the registration process is now separate to checkout.

    shopp_enqueue_script(‘checkout’);

    shopp(‘checkout’,’function’);

    October 30th   #

You must be logged in to post a comment.

© Ingenesis Limited. Shopp™ is a registered trademark of Ingenesis Limited.

Skip to toolbar