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.checkout.guest_login
Returns true
if customer accounts are optional for completing a checkout and there is a ?checkout_url
parameter in the URL. Otherwise, returns false
.
A checkout_url
parameter is created when a visitor comes to the account login page from a link at checkout.
Example
https://myshopify.com/account/login?checkout_url=https%3A%2F%2Fmyshopify.com%2F7117957%2Fcheckouts%2F87ff64e2e02b16%3Fkey%3D9b3ee8823%26step%3Dcontact_information
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 currency of the checkout, see the checkout.currency object.
To return the list of currency objects that the store accepts, see the shop.enabled_currencies object.
shop.customer_accounts_enabled
Returns true
when a customer account is required to complete a checkout. Otherwise, returns false
.
shop.customer_accounts_optional
Returns true
when a customer account is optional to complete a checkout. Otherwise, returns false
.
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 currency of the checkout, see the checkout.currency object.
To return the currency of the store, 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.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 shop's policy objects. 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>Shipping policy</li>
<li>Terms of service</li>
</ul>
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
shop.privacy_policy
Returns a policy object for your store's privacy policy.
shop.published_locales
Returns an array of shop_locale objects. Each object represents a shop locale that's published on the shop.
{% for locale in shop.published_locales %}
{{ locale.name }} ({{ locale.iso_code }})
{% endfor %}
shop.refund_policy
Returns a policy object for your store's refund policy.
shop.shipping_policy
Returns a policy object for your store's shipping policy.
shop.subscription_policy
Returns a policy object for your store's subscription 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 %}