The shop object
The shop
object has the following attributes:
shop.address
You can add attributes to shop.address
to return information about a shop's address.
shop.address.city
Returns the city in the shop's address:
Ottawa
shop.address.country
Returns the country in the shop's address:
Canada
shop.address.country_upper
Returns the country in the shop's address using uppercase letters:
CANADA
The result is identical to using the upcase filter on shop.address.country
.
shop.address.province
Returns the state or province in the shop's address:
Ontario
shop.address.province_code
Returns an abbreviated form of the state or province in the shop's address:
ON
shop.address.street
Returns the shop's street address:
150 Elgin Street
shop.address.summary
Returns a summary of the shop's address:
150 Elgin Street, Ottawa, Ontario, Canada
The summary takes the form street, city, state/province, country.
shop.address.zip
Returns the ZIP or postal code in the shop's address:
K2P 1L4
shop.collections_count
Returns the number of collections in a shop.
shop.currency
Returns the store currency (in ISO 4217 format. For example, USD. This is the currency that is used in your Shopify admin (including in your reports).
If your store doesn't use multi-currency, then the store currency is the same as the customer's local (presentment) currency. If your store uses multi-currency then the store currency can be different from the customer's currency.
To return the currency of the cart, see the cart.currency object.
To return the list of currency objects that the store accepts, see the shop.enabled_currencies object.
shop.description
Returns the description of the store.
shop.domain
Returns the primary domain of the shop.
shop.email
Returns the shop's email address.
shop.enabled_currencies
Returns the list of currency objects that the store accepts.
To return the currency of the cart, see the cart.currency object.
To return the store currency, see the shop.currency object.
shop.enabled_payment_types
Returns an array of the shop's accepted credit cards, cryptocurrencies, and other payment types. The list of payment types is based on those accepted by your store's enabled payment providers.
To show a logo of the payment type, use the payment_type_svg_tag filter to display an inline SVG. Alternatively, you can use the payment_type_img_url filter for a link to the SVG image.
shop.locale
Returns the language locale that the store is currently displayed in. For example, en
, fr
, or pt-BR
. See the documentation on theme translations for more details on this feature.
shop.metafields
Returns the shop's metafields. Metafields can only be set using the Shopify API .
shop.money_format
Returns a string that is used by Shopify to format money without showing the currency.
shop.money_with_currency_format
Returns a string that is used by Shopify to format money while also displaying the currency.
shop.name
Returns the shop's name.
shop.password_message
Returns the shop's password page message.
shop.permanent_domain
Returns the .myshopify.com URL of a shop.
shop.phone
Returns the shop's phone number.
shop.policies
Returns an array of your store's policies. You can set these policies in your store's Legal settings in your Shopify admin.
Input
<ul>
{% for policy in shop.policies %}
<li>{{ policy.title }}</li>
{% endfor %}
</ul>
Output
<ul>
<li>Privacy policy</li>
<li>Refund policy</li>
<li>Terms of service</li>
</ul>
Each shop policy has the following properties:
policy.body
Returns the policy's content.
Input
{% for policy in shop.policies %}
{{ policy.body }}
{% endfor %}
Output
PRIVACY STATEMENT
----
SECTION 1 - WHAT DO WE DO WITH YOUR INFORMATION?
When you purchase something from our store...
Referencing just the policy object will also return the policy's content.
Example
{% for policy in shop.policies %}
{{ policy }}
{% endfor %}
policy.title
Returns the title of the policy.
Input
{% for policy in shop.policies %}
{{ policy.title }}
{% endfor %}
Output
Privacy policy
Refund policy
Terms of service
policy.url
Returns the relative URL of the policy.
Input
{% for policy in shop.policies %}
{{ policy.url }}
{% endfor %}
Output
/policies/privacy-policy
/policies/refund-policy
/policies/terms-of-service
Referencing shop policies directly
An individual policy can be referenced directly on the shop
object. Each policy has its own policy object.
Input
{{ shop.privacy_policy.title }}
Output
Privacy policy
The following policies can be set in your store's Legal settings in your Shopify admin.
shop.privacy_policy
Returns a policy object for your store's privacy policy.
shop.refund_policy
Returns a policy object for your store's refund policy.
shop.terms_of_service
Returns a policy object for your store's terms of service.
shop.products_count
Returns the number of products in a shop.
shop.secure_url
Returns the full URL of a shop prepended by the https
protocol.
Input
{{ shop.secure_url }}
Output
https://johns-apparel.com
shop.taxes_included
Returns true
if taxes are included in your products' prices. Otherwise, returns false
.
This can be set in your store's Tax settings.
Input
{% if shop.taxes_included %}
Taxes included
{% else %}
Excluding taxes
{% endif %}
Output
Taxes included
shop.types
Returns an array of all unique product types in a shop.
{% for product_type in shop.types %}
{{ product_type | link_to_type }}
{% endfor %}
shop.url
Returns the full URL of a shop.
Input
{{ shop.url }}
Output
http://johns-apparel.com
shop.vendors
Returns an array of all unique vendors in a shop.
{% for product_vendor in shop.vendors %}
{{ product_vendor | link_to_vendor }}
{% endfor %}