Common view variables

Notando eCommerce template engine is based on Smarty template engine. To access data, such as product information or user details, template variables are used. There are variables specific for each page and common variables, accessable at all webshop pages. You can see the list of avaiable common view variables below. Other variables described at page descriptions they belongs to. (see at Pages, Blocks and View parts sections)
In order to add some variable into your template write the following:

{$variable_name}
The variable output can be processed by Smarty modifiers according to rules written at variable modifiers page.

Common view variables list

Please notice, to render errors or status messages in your template you can use view variables or include corresponding file as it is described in view part

To view variable structure — you can use zend_debug variable modifier when output variable.

Pages

Pages or page content blocks — are templates representing page main content. For more easy-to-use naming of pages terms 'action' and 'controller' are used.

Action — is name of program part producing a separate content part. Related actions grouped under controller. For exapmle, we can talk about 'news_list' or 'view_order' actions page content. In layout structure page content block placed in content structural block as you can see at this example.
Which exactly page content block will be rendered in content structural block depends on webshop page url. , which is placed as 'controllers/category/products.phtml' in folder stucture.

Listed below pages description includes:

If you want to customize 404 error page - put 404.phtml into your templates folder. Note that main.phtml layout will be used by default. To change 404 page layout add
<page controller="error" action="404" layout="custom_layout_name"/>
into layouts_definition section of blocks.xml file.

Default theme page templates list:

Action Description

controller: cart

add

Add product to cart

template path: controllers/cart/add.phtml

For general products product will be added (or not added) into cart, also status or error message will be produced and user will be redirected back.
For metacategories product details with attribute selection form will be shown. Only after selecting all required attributes price will be calculated and product will be added to cart (or not added with error message). After adding product to cart user will be redirected to cart view.

Request parameters:

  • product_id - product id
  • qty - product quantity. default: 1

Included templates:

checkout

Checkout page

template path: controllers/cart/checkout.phtml

At this page user review order and select payment method. For non logged in user status message with login request will be shown. If shipping required set to true in backoffice - user will be redirected back to cart/view and asked to select shipping method.

Template variables:

  • $shipping_info - shipping method information
  • $client - instance of UserMode. Client information
  • $cart_view_cart_info - array of cart products
  • $shipping_address - shipping address object
  • $payment_methods - list of available payment methods

Included templates:

history

Orders history

template path: controllers/cart/history.phtml

This page used to show list of paid and unpaid orders.

Template variables:

  • $orders - list of orders
  • $order_history_pager - instance of Notando_Pager for orders list
view-order

View Order

template path: controllers/cart/view-order.phtml

View order from orders history.

Request patameters:

  • order_id - integer. id of order
  • is_actual - integer. is_actual property of order object at orders history page

Template variables:

  • $order - order object
  • $client - instance of UserModel. Client who own order
view

Cart view page

template path: controllers/cart/view.phtml

At this page user can view cart, change products quantity, select shipping method and process to checkout.

Template variables:

  • $cart_view_cart_info - cart information
  • $shipping_enabled - boolean, is shipping enabled
  • $shipping_methods - list of shipping methods
  • $selected_shipping_method_id - id of previously selected shipping method id

Included templates:

controller: category

products

Category products list

template path: controllers/category/products.phtml

At this page user can view list of products under some category.

Template variables:

  • $category_products_list - products list
  • $category_id - id of selected category
  • $category_products_pager - instance of Notando_Pager for $category_products_list
  • $category_info - selected category information

Included templates:

controller: content

about-us

About us page

template path: controllers/content/about-us.phtml

This page used to show information about company. If no custom information provided will be shown information based on company registration information.

Template variables:

  • $customContent - custom information about company
  • $companyFields - array of company information fields
news-list

News list

template path: controllers/content/news-list.phtml

This page used to show list of content with type news in user's language.

Included templates:

news-view

News content

template path: controllers/content/news-view.phtml

This page used to show content with type news in user's language.

Included templates:

static-pages-list

Static pages list

template path: controllers/content/pages-list.phtml

This page used to show list of content with type static-pages in user's language.

Included templates:

static-pages-view

Static page content

template path: controllers/content/pages-view.phtml

This page used to show content with type static-pages in user's language.

Included templates:

show

Static page render

template path: controllers/content/show.phtml

This page used to show content by group_id or shortcut in user's language.

To access special page by it's shortcut you may use url /page/:shortcut

Request parameters:

  • group_id - content group id
  • page - special page shortcut name (for example "terms_and_conditions")

Included templates:

controller: index

index

Main store page

template path: controllers/index/index.phtml

This is home page of the store.

Included specials:

  • main_page - special content for main page

controller: login

index

Login form

template path: controllers/login/index.phtml

Template variables:

  • $ref - URL of refereal page
remind-password

Remind password form

template path: controllers/login/remind-password.phtml

This page used to render remind password form.

controller: payment

cancel-request

Cancel offer request page

template path: controllers/payment/cancel-request.phtml

This page used to show order cancel confirmation dialog.

Request parameters:

  • system - payment processor key
  • order_id - order id
  • is_actual - is actual trigger

Template variables:

  • $payment_processor - payment processor key
  • $order_id - order id
  • $is_actual - is actual trigger
cancel

Cancel offer page

template path: controllers/payment/cancel.phtml

This page used to show order canceling status.

Request parameters:

  • system - payment processor key
  • order_id - order id
  • is_actual - is actual trigger

Template variables:

  • $cancel_success - boolean, is order cancel successful
confirm

Payment confirmation page

template path: controllers/payment/confirm.phtml

This page used to show payment confirmation. Here is the best place to say thank you.

Request parameters:

  • system - payment processor key
  • order_id - order id
  • is_actual - is actual trigger

Template variables:

  • $confirmation_success - boolean, is order confirmed
  • $order_id - order id

Included specials:

  • payment_received_page - special content for payment confirmed page
pay-later

Pay later page

template path: controllers/payment/pay-later.phtml

At this page user may select payment method and process to payment page.

Request parameters:

  • system - payment processor key
  • order_id - order id
  • is_actual - is actual trigger

Template variables:

  • $payment_methods - list of available payment methods
pay

Payment page

template path: controllers/payment/pay.phtml

This page used to render payment processor template and may vary for different payment processors. If payment processor does not selected or payment processor failed user will be redirected to /cart/checkout page.

Request parameters:

  • payment_processor_type - payment processor key
  • address_id - user address id
  • shipping_method_id - shipping menthod id

Template variables:

  • $payment_processor - payment processor instance
  • $payment_template - payment processor template

controller: product

details

Product page

template path: controllers/product/details.phtml

This page used to show product details. If product is a metacategory then attribute selection form will be shown.

Request parameters:

  • product_id - product id
  • category_id - product category id. default: $product->category_id

Template varables:

  • $category_id - product category id
  • $product - object, product information
  • $product_categories - list of categories which include product

Included templates:

search-by-name

Product search results

template path: controllers/product/search-by-name.phtml

At this page user can view results of product search.

Template variables:

  • $category_products_list - products list
  • $category_products_pager - instance of Notando_Pager for $category_products_list
  • $product_search_string - search string

Included templates:

compare

Compare products

template path: controllers/product/compare.phtml

At this page user can view compared products

Template variables:

  • $compare_products - compared products list
  • $mergedAttributes - merged list of products attributes

Included templates:

with-attribute

Product search by attribute

template path: controllers/product/with-attribute.phtml

At this page user can view products filtered by some attribute.
For example, you can use this page to display products with same attribute value (brand, size, etc.)

Template variables:

  • $category_products_list - products list
  • $category_products_pager - instance of Notando_Pager for $category_products_list

Included templates:

controller: user

manage-address

User address book

template path: controllers/user/manage-address.phtml

This page used to show and manage user addresses.

Request parameters:

  • ref - URL of refereal page

Template variables:

  • $default_address - default user address
  • $client_addresses - user addresses list
  • $address_fields - address form fields

Included templates:

profile

User profile page

template path: controllers/user/profile.phtml

This page used to show user profile.

Template variables:

  • $profile_fields - user profile fields

Included templates:

registration

New user registration page

template path: controllers/user/registration.phtml

Template variables:

  • $registration_fields - user profile fields

Included templates:

Blocks

Blocks, or content blocks — are self-contained blocks representing some page functionality such as: category list, top menu, product cart, etc. Main pages functionality are described in page content blocks above. The listed below content blocks mostly includes auxiliary data.

Another difference between page content block and content block is — to include the last one into layout you must write proper rules in blocks.xml file. See how use them in block definition section. Blocks also can be loaded directly form URL '/blocks/controller_name/action_name' you may use this method to update some template part by means AJAX or to view some content block as separate part during developing. If block loaded with XmlHttpRequest only rendered block template as HTML without layout will be returned as result. The block list describes block properties such as template variables, request parameters etc. What they mean details are here.

Content blocks list

Action Description

controller: cart

short

Minicart

template path: blocks/cart/short.phtml
content block: cart/short

This block used to show minicart.

Template variables:

  • cart_info - cart information

controller: category

breadcrumbs

Category breadcrumbs

template path: blocks/category/breadcrumbs.phtml
content block: category/breadcrumbs

This block used to show path to current category or product throw categories.

Request parameters:

  • category_id - category id
  • product_id - product id

Template variables:

  • $cart_info - cart information
menu-header-categories

Menu with header categories only

template path: blocks/category/menu-header-categories.phtml
content block: category/menu-header-categories

This block used to render header categories as menu.

Request parameters:

  • category_id - category id

Template variables:

  • $block_category_menu_selected_top_category - selected top category id
  • $category_id - current category id
  • $block_category_menu_categories - header categories list
menu-tree

Categories menu

template path: blocks/category/menu-tree.phtml
content block: category/menu-tree

This block used to render categories as menu with rendering path to selected category as tree.

Request parameters:

  • category_id - category id

Template variables:

  • $block_category_menu_selected_top_category - selected top category id
  • $block_category_menu_categories - header categories list
subcategories

Category subcategories

template path: blocks/category/subcategories.phtml
content block: category/subcategories

This block used to render category subcategories.

Request parameters:

  • category_id - category id

Template variables:

  • $block_category_subcategories_list - 2 level subcategories list

controller: content

footer-menu-links

Footer menu links

template path: blocks/content/footer-menu-links.phtml
content block: content/footer-menu-links

This block used to render footer menu links.

Block parameters:

  • enable_cache - is caching for this block enabled
  • page - page to show, default: 1
  • on_page - how many items to show per page, default: 10
  • sort_field - sort field
  • sort_order - sort order (asc|desc)

Template variables:

  • $content_list - footer menu content list
get

Render static content

template path: blocks/content/get.phtml
content block: content/get

This block used to render some static content by given group or shortcut.

Block parameters:

  • shortcut - content shortcut, OR
  • group_id - content group id

Template variables:

  • $content_data - some static content
google-analytics

Google analytics

template path: blocks/content/google-analytics.phtml
content block: content/google-analytics

This block used to add google analytics.

Template variables:

  • $google_analythics_id - google analytics id
header

Page header

template path: blocks/content/header.phtml
content block: content/header

This block used to render header content.

languages

Languages

template path: blocks/content/languages.phtml
content block: content/languages

This block used to render store available languages. For rendering it use common templete variables.

news

News

template path: blocks/content/news.phtml
content block: content/news

This block used to render news.

Block parameters:

  • enable_cache - is caching for this block enabled
  • page - page to show, default: 1
  • on_page - how many items to show per page, default: 10
  • sort_field - sort field
  • sort_order - sort order (asc|desc)

Template variables:

  • $content_list - news list
promo

Promotional

template path: blocks/content/promo.phtml
content block: content/promo

This block used to render some promotional content.

top-menu-links

Top menu links

template path: blocks/content/top-menu-links.phtml
content block: content/top-menu-links

This block used to render top menu links.

Block parameters:

  • enable_cache - is caching for this block enabled
  • page - page to show, default: 1
  • on_page - how many items to show per page, default: 10
  • sort_field - sort field
  • sort_order - sort order (asc|desc)

Template variables:

  • $content_list - top menu links list
useful-links

News

template path: blocks/content/useful-links.phtml
content block: content/useful-links

This block used to render useful links.

Block parameters:

  • enable_cache - is caching for this block enabled
  • page - page to show, default: 1
  • on_page - how many items to show per page, default: 10
  • sort_field - sort field
  • sort_order - sort order (asc|desc)

Template variables:

  • $content_list - useful links list

controller: currency

select

Currency selection block

template path: blocks/currency/select.phtml
content block: currency/select

This block used to currency select form.

Template variables:

  • $block_selected_currency_name - currenctly selected currency name
  • $block_currency_list - list of available webshop currencies

controller: filter

form

Product filter form

template path: blocks/filter/form.phtml
content block: filter/form

This block used to render product filter form in some category. Filter form will consists of name, price and category attributes fields.

Template variables:

  • $block_filter_form_filters - form fields list
  • $category_id - id of selected category
  • $block_filter_form_sort_field - sort field name
  • $block_filter_form_sort_order - sort order (asc or desc)
search-by-name

Quick search

template path: blocks/filter/search-by-name.phtml
content block: filter/search-by-name

This block used to render product quick search form.

Template variables:

  • $block_filter_searchByName_nameField - field object
custom

Custom product filter

template path: blocks/filter/custom.phtml
content block: filter/custom

This block used to render list of values of choosen attributes.
With this block you can create additional menu, like Brand or Size.
Example may be found in default theme.

Use this block when you need to create menu like "Brand" or "Size"
To do this create in your administrative interface Attribute "Brand" with type set and assign it to some categories. Then create some products in those categories and set "Brand" attribute value.
To create menu (for example in left structural block) that will show list of Brands add next line into your structural_block

<content_block position="0">
<![CDATA[filter/custom?filterBy=Brand]]>
</content_block>

Block parameters:

  • filterBy - list of attributes names to create filter. Comma separated or single value.

Template variables:

  • $block_filter_custom_attributes - choosen attributes information

controller: product

new-grid

New products

template path: blocks/product/new-grid.phtml
content block: product/new-grid

This block used to render latest added products.

Block parameters:

  • products_number - number of products to show, default: 4

Template variables:

  • $block_product_new_grid_products_list - list of new products

Included templates:

popular-grid

Popular products

template path: blocks/product/popular-grid.phtml
content block: product/popular-grid

This block used to render on promotional products.

Block parameters:

  • products_number - number of products to show, default: 4

Template variables:

  • $block_product_popular_grid_products_list - list of popular products

Included templates:

recent

Recently viewed products

template path: blocks/product/recent.phtml
content block: product/recent

This block used to render recently viewed products.

Block parameters:

  • products_number - number of products to show, default: 4

Template variables:

  • $block_product_recent_products_list - list of popular products

Included templates:

compare-list

Products compare list

template path: blocks/product/compare-list.phtml
content block: product/compare-list

This block used to render products compare list.

Template variables:

  • $block_product_compare_list_products_list - list of products

controller: user

login-box

Login links/User information

template path: blocks/user/login-box.phtml
content block: user/login-box

This block used to render Sing in or Sign up links for new users and greatings for existing.

login-form

Login form

template path: blocks/user/login-form.phtml
content block: user/login-form

This block used to render user login form.

Included templates:

View parts

Common view parts — are default theme common content blocks, which can be used as auxilary tool in your layouts. To add some view part into page, your should directly include it:

{include file="common/view_parts/grid_builder.phtml" items=$products template="product_in_grid" cells=3}
You can assing template variables to view part using smarty as it is shown at example above, or just define necessary variables in template, view part included to.

Remember that common view part templates are created for cases when you do not want to change view that they provide.

Common view part list

Template Description
cart_products

Cart products

template path: common/view_parts/cart_products.phtml

This template used to render products list in cart.

Template variables:

  • $view_mode - view mode (1 or 0). In view mode user can not edit product quantity or remove it from cart.
  • $products - products in cart list
content_list

Content list

template path: common/view_parts/content_list.phtml

This template used to render CMS content list.

Template variables:

  • $cms_content_list - content list
  • $cms_content_pager - instance of Notando_Pager for $cms_content_list
draw_user_address

User address

template path: common/view_parts/draw_user_address.phtml

This template used to render user address.

Template variables:

  • $address - address information
menu_tree

Categories menu

template path: common/view_parts/menu_tree.phtml

This template used to render categories as menu.

Template variables:

  • $tree - categories list
  • $selected_category - id of selected category
product_attributes_form

Product attributes form

template path: common/view_parts/product_attributes_form.phtml

This template used to render product attributes selection form.

Template variables:

  • $is_metacategory - is product a metacategory
  • $product_id - product id
  • $attributes - product attributes
product_header

Product basic information

template path: common/view_parts/product_header.phtml

This template used to render product basic information.

Template variables:

  • $product - product information

Included templates:

product_in_grid

Product in grid view

template path: common/view_parts/product_in_grid.phtml

This template used to render product in grid view.

Template variables:

  • $product - product information
product_in_grid_wide

Product in grid view. Wide

template path: common/view_parts/product_in_grid_wide.phtml

This template used to render product in grid view. Wide version.

Template variables:

  • $product - product information
product_in_grid_wide

Product in grid view. Minimal

template path: common/view_parts/product_in_grid_minimal.phtml

This template used to render product in grid view. Minimal version include onlu product name, image and price

Template variables:

  • $product - product information
product_in_list

Product in list view

template path: common/view_parts/product_in_list.phtml

This template used to render product in list view.

Template variables:

  • $product - product information
grid_builder

Grid view renderer

template path: common/view_parts/grid_builder.phtml

This template used to render grids.

Template variables:

  • $items - grid items
  • $template - template to render cells content
  • $cells - number of cell
product_price_detailed

Product detailed price information drawer

template path: common/view_parts/product_price_detailed.phtml

This template used to render product detailed price.

Template variables:

  • $product - product information