# Store Tags These tags are used for accessing and displaying store-related data in Liquid templates. They help you render store information, product details, and other dynamic store content. Use these tags to build dynamic storefronts and display store data. ## block Include blocks in sections. Static include using name as id ```liquid {% block 'name' %} ``` Static multiple include using custom ids for settings ```liquid {% block 'name' id:'custom-id' %} ``` --- ## container Wraps a block container. To create a default container just use the plain `container` tag without the name. ```liquid {% container %} ``` You can also create block containers dynamically as names can be defined as variables: ```liquid {% for i in (1..10) %} {% assign name = 'my-block-container-' | append: i %} {% container name %} {% endfor %} ``` --- ## form The `form` tag is used to render various types of forms for store functionality, such as product add-to-cart, customer login, newsletter signup, and more. Each form type injects specific properties into the Liquid context and accepts certain POST or GET variables. ### General Usage ```liquid {% form 'form_type', object %} {% endform %} ``` - `'form_type'`: The type of form (see below). - `object`: Optional. Context object (e.g., `product`, `article`) for forms that require it. ### Supported Form Types | Type | Purpose / Accepts / Exposes | |---------------------------|-----------------------------| | `product` | Add product to cart. Accepts: `quantity`, customizations. Requires: `product`. | | `review` | Submit product review. Accepts: `title`, `comment`, `name`, `rating`. Requires: `product`, optional `variant`. | | `comment` | Submit article comment. Accepts: `name`, `comment`. Requires: `article`, optional `reply_to`. Exposes: `name`. | | `customer` | Newsletter signup or restock notification. Accepts: `email`, `accepts_marketing`. Requires: optional `product`. Exposes: `email`, `product`. | | `create_customer` | Customer registration. Accepts: `email`, `password`, `password_confirm`, `first_name`, `last_name`, `address_1`, `city`, etc., `accepts_marketing`. | | `edit_customer` | Edit customer profile. Accepts: registration fields. Exposes: all customer fields. | | `login` | Customer login. Accepts: `email`, `password`. | | `recover_customer_password`| Request password reset email. Accepts: `email`. | | `reset_customer_password` | Reset customer password. Accepts: `password`, `confirm_password`, `email`, `key`. Exposes: `key`, `email`. | | `change_customer_password`| Change password (when logged in). Accepts: `password`, `confirm_password`. | | `contact` | Contact merchant. Accepts: `email`, `name`, `message`, optional `phonenumber`, `subject`. | | `search` | Product search. Accepts: `q`, `sort-by` (GET). Exposes: `sort_by`, `sort_column`, `default_sort_column`. | | `localization` | Change language/currency/country. Accepts: `locale_code`, `currency_code`, `country_code`. Exposes: `current_currency`, `current_language`, `current_country`, `current_locale`, `available_currencies`, `available_languages`, `available_locales`, `available_countries`. | | `cookie_policy` | Set cookie policy. Accepts: `cookie_policy`, `cookie_policy_consents[]`. Exposes: `policy`, `consents`, `consents_param`. | ### Notes - All forms inject a `form` object into the context with error/success/submitted data. - Some forms (like `product`, `review`, `comment`) require an object as the second argument. - Use `{% form 'form_type', object %}` for forms that need context (e.g., product, article). - Hidden fields and CSRF protection are handled automatically. ### Example: Product Form ```liquid {% form 'product', product %} {% if form.error %}