- CrystalCommerce Liquid Documentation for Designers

Site Drop

This drop is included on this page in with the variable name {{ drop_name }}.

Properties

buylist_mode?

Returns true if the user is browsing in buylist mode. False otherwise.

search_path

Returns the path to the search for the current mode.

multi_search_path

Returns the path to the multi search for the current mode.

buy_order_empty?

Returns true if the current buy order has no line items. False otherwise.

extra_title

Generates a title for the current page. On product browse, it takes the form of “Product Name - Category » Heirarchy”. On category browse, it takes the form of “Category » Heirarchy”. On pages, it uses the seoname.

pagename

Returns “news” if on the news path. Otherwise, returns either the nickname param or the seoname param. Evidently used in some templates to detect what area of the site the user is on.

az_filter_urls

Returns an array of filter links for search filters for letters A-Z.

category_tree

Generates links for all categories as a tree.

controller

Name of the Rails controller handling this request

action

Name of the Rails action handling this request

logged_in?

Returns true if the customer is logged in.

may_add_to_cart?

Returns true if the customer is authorized to add items to their cart.

supported_locales

Returns an array of locales supported by the current site. If a translation of the locale is not available, the locale code will be used for the label.

For example if the supported locales were ‘en’, ‘x-bork’ and ‘i-klingon’:

{{ "{%" }} for locale in site.supported_locales %}
    Code: {{ "{{" }} locale.code }}
    Label: {{ "{{" }} locale.label }}
    {{ "{%" }} endfor %}

Outputs:

Code: en
    Label: English
    
    Code: x-bork
    Label: bork bork bork
    
    Code: i-klingon
    Label: i-klingon
store_name

Returns the store name defined by the admin prefs. Ex: Example Store

recaptcha_tags

Generates tags for captcha verification. Useful for embedding user signup on pages other than the user signup page.

recaptcha_enabled?

Returns true if the store has recaptcha enabled for the current theme. This is the default.

store_locations

Array of store location drops.

cart_json

JSON of the cart for use with a javascript framework like Backbone or Ember.js.

bank_transfers_enabled?

Are bank transfers accepted?

checks_money_orders_enabled?

Are checks/money orders accepted?

coupons_enabled?

Are coupons accepted?

credit_cards_enabled?

Are credit cards accepted?

on_account_enabled?

Are on-account payments accepted?

pay_in_store_enabled?

Are pay-in-store payments accepted?

paypal_enabled?

Are paypal payments accepted?

store_credit_enabled?

Are store credit payments accepted?

visa_enabled?

Are Visa credit card payments accepted?

mastercard_enabled?

Are MasterCard credit card payments accepted?

amex_enabled?

Are American Express credit card payments accepted?

discover_enabled?

Are discover credit card payments accepted?