Created
September 14, 2016 13:12
-
-
Save lukeholder/5a96b75cce50790c518a3f0dc9029d1f to your computer and use it in GitHub Desktop.
simple address form
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form method="post"> | |
{% set model = cart.shippingAddress %} | |
<input type="hidden" name="action" value="commerce/cart/updateCart"> | |
<input type="hidden" name="redirect" value="placeyourredirecturlhere"/> | |
{{ getCsrfInput() }} | |
<div class="row"> | |
<div class="six columns"> | |
<label>First Name *</label> | |
<input type="text" id="shippingAddress-firstName" class="u-full-width" name="shippingAddress[firstName]" value="{{ model.firstName ?? "" }}"> | |
{% if model and model.getErrors('firstName') %} | |
<span class="flash">{{ model.getErrors('firstName')|join }}</span> | |
{% endif %} | |
</div> | |
<div class="six columns"> | |
<label for="shippingAddress-lastName">Last Name *</label> | |
<input type="text" id="shippingAddress-lastName" class="u-full-width" name="shippingAddress[lastName]" value="{{ model.lastName ?? "" }}"> | |
{% if model and model.getErrors('lastName') %} | |
<span class="flash">{{ model.getErrors('lastName')|join }}</span> | |
{% endif %} | |
</div> | |
</div> | |
<input type="hidden" name="sameAddress" value="1"> | |
<input type="submit" class="button button-primary" value="Save Address"> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment