Appearance
Checkout tag
The Checkout tag. This is the tag that is responsible for the whole checkout process.
The moulde is shipped with a ready-to-go template, however, you can still change everything to your needs.
The tag
{exp:reinos_store:checkout}
Tag Parameters
Below are the Tag Parameters. Those parameters can be used in the tag described above
customer_phone_required
Set the customer phone as required.
customer_phone_required="false"
customer_company_required
Set the customer company name as required.
customer_company_required="false"
return_url
The return url, default to the current url
return_url=""
form_class
Set the form class
form_class=""
form_id
Set the form id
form_id=""
enable_billing_address
Control wether the billing address fields are required or not.
enable_billing_address="yes" (default)
enable_shipping_address
Control wether the shipping address fields are required or not.
enable_shipping_address="yes" (default)
default fields
For all of the input fields you can define a default value via the default_<field_name>
param
default_billing_address="Your default billing_address"
default_billing_address2="Your default billing_address2"
default_billing_city="Your default billing_city"
default_billing_country="Your default billing_country"
default_billing_zip="Your default billing_zip"
default_billing_state="Your default billing_state"
default_shipping_address="Your default shipping_address"
default_shipping_address2="Your default shipping_address2"
default_shipping_city="Your default shipping_city"
default_shipping_country="Your default shipping_country"
default_shipping_state="Your default shipping_state"
default_shipping_zip="Your default shipping_zip"
default_customer_first_name="Your default customer_first_name"
default_customer_last_name="Your default customer_last_name"
default_customer_email="Your default customer_email"
default_customer_phone="Your default customer_phone"
default_customer_company="Your default customer_company"
default_customer_tax_no="Your default customer_tax_no"
Tag Variable
Below are the Tag Variables. Those Variables can be used in the tag described above
global_errors
Global errors
{global_errors}
{global_errors:error}
{/global_errors}
But we also have them as separated error variables
{global_error:no_items_to_checkout}
{global_error:gateway_not_exists}
{global_error:no_gateway_selected}
{global_error:transaction_error}
{global_error:shipping_type_missing} // coming from the shipping module
has_global_errors
Check for global errors
{if has_global_errors}
{global_error}
{/if}
has_field_errors
Check for field errors
{if has_field_errors}
...
{/if}
field_name:error
Error, if there is one, per field
{customer_first_name:error}
{customer_last_name:error}
{customer_email:error}
{customer_phone:error}
{customer_company:error}
{billing_address:error}
{billing_address2:error}
{billing_zip:error}
{billing_city:error}
{billing_country:error}
{shipping_address:error}
{shipping_address2:error}
{shipping_zip:error}
{shipping_city:error}
{shipping_country:error}
{!-- for example --}
{if customer_company:error != ''}<span class="text-red">{customer_company:error}</span>{/if}
field_name:value
Values, if there is something, per field
{customer_first_name:value}
{customer_last_name:value}
{customer_email:value}
{customer_phone:value}
{customer_company:value}
{billing_address:value}
{billing_address2:value}
{billing_zip:value}
{billing_city:value}
{billing_country:value}
{shipping_address:value}
{shipping_address2:value}
{shipping_zip:value}
{shipping_city:value}
{shipping_country:value}
Custom fields
Add custom/extra fields to your checkout process.
You need to define the field names in custom_fields
and in the body of {exp:reinos_store:checkout} you can add the actual HTML
{exp:reinos_store:checkout
custom_fields="agree_with_terms|name|email"
}
<input name="name" placeholder="custom_fields[name]" />
<input name="email" type="custom_fields[email]" placeholder="email" />
<input type="checkbox" name="custom_fields[agree_with_terms]" value="yes"/> Agree with the terms
{/exp:reinos_store:checkout}
Steps
The example templates are using the stepping technique. Each step Personal and billing and shipping adress
, Shipping
and payment
are a step in the order process. We enable this by adding the name name="step-1"
name="step-2"
or name="step-3"
to the next button as you can seen in the example template
<button name="step-2" type="submit" class="button">Next step</button>