• Getting Started
    • Prerequisites
    • Download and Installation
    • Change Log
  • Developer Guide
    • EvenCart Plugins
      • Development Environment Setup
      • Plugin Structure
      • EvenCart MVC
      • Dependency Injection
      • Domain Entities
      • Database Versions
      • Plugin Settings
      • Data Provider Plugin
      • Payment Processing Plugin
      • Shipping Provider Plugin
      • Authentication Provider
      • Widget Plugin
    • EvenCart API
      • Authentication
      • Requests & Responses
      • API EndPoints
    • Caching
  • Designer Guide
    • How to create a theme
    • Extended Tags
      • Layout Tag
      • Widget Tag
      • Json Tag
      • Css Tag
      • Js Tag
      • Bundle Tag
      • Partial Tag
      • Control Tag
      • Route Tag
      • Global Tag
      • Component Tag
    • Extended Filters
    • Global Objects
  • Packaging & Distribution

Global Objects

Global objects are special variables which are available across EvenCart theme. They can be used just like any other liquid object.

The following Global objects are available in EvenCart.

Object Name Description Fields
breadcrumb Stores the breadcrumb array of the current page See Fields
cart Represents the cart of the current user See Fields
currentUser Represents the current user See Fields
navigation Stores the navigation of the website See Fields
store Represents the current store See Fields

How to use Global Objects?

The usage of global object properties is similar to any other liquid object. The names of objects and properties are always camel case.

Examples

<!--Display the name of store -->
{{store.name}}

<!--To display different strings for logged in and non logged in users-->
{% if currentUser.isVisitor %}
<p>{{"Login and you can do a lot more..."}}</p>
{% else %}
<p>
{{"Welcome "}} {{currentUser.name}}
</p>
{% endif %}
ON THIS PAGE
  • How to use Global Objects?

Related Pages

  • How to create a theme
  • Extended Tags
  • Extended Filters
© 2022 Sojatia Infocrafts Pvt. Ltd. All rights reserved. Powered by onlyDoc.