# Tema nesneleri

> Bir tema şablonunun kullanabildiği nesneler ve alanları.

Bu liste tema motorunun kodundan çıkarılmıştır: her nesnenin burada yazan alanları motorun yanıtladığı alanlardır. Fiyatlar kuruş cinsinden tam sayıdır; `money` filtreleriyle yazdırın.

## Her sayfada

| Nesne | Ne | Örnek |
| :--- | :--- | :--- |
| `shop` | Mağaza. | `{{ shop.name }}` |
| `settings` | Temanın genel ayarları (`config/settings_data.json`). | `{{ settings.color_background }}` |
| `request` | İstek. | `{{ request.locale.iso_code }}` |
| `routes` | Vitrinin adresleri. | `{{ routes.cart_url }}` |
| `template` | Çizilen şablon. | `{{ template.name }}` |
| `theme` | Tema. | `{{ theme.name }}` |
| `localization` | Mağazanın ülkeleri ve dilleri. | `{{ localization.language.iso_code }}` |
| `cart` | Ziyaretçinin sepeti. | `{{ cart.item_count }}` |
| `customer` | Giriş yapmış müşteri; giriş yoksa boş. | `{% if customer %}{{ customer.first_name }}{% endif %}` |
| `collections` | Koleksiyonlar; tanıtıcıyla da okunur. | `{{ collections.all.products_count }}` |
| `all_products` | Tanıtıcıyla bir ürün. Bir sayfada en çok 20 farklı ürün yükler. | `{{ all_products['kupa'].title }}` |
| `linklists` | Menüler, tanıtıcıyla. | `{% for link in linklists['main-menu'].links %}` |
| `pages` | İçerik sayfaları, tanıtıcıyla. | `{{ pages['hakkimizda'].content }}` |
| `blogs` | Bloglar; tanıtıcıyla da okunur. | `{% for article in blogs['haberler'].articles limit: 3 %}` |
| `articles` | Blog yazıları, `blog/yazı` tanıtıcısıyla. | `{{ articles['haberler/ilk-yazi'].title }}` |
| `images` | Mağazanın dosyalarındaki görseller, adla. | `{{ images['logo.png'] \| image_url: width: 200 }}` |
| `content_for_header` | Platformun `<head>` içeriği; düzende zorunlu. | `{{ content_for_header }}` |
| `content_for_layout` | Şablonun çıktısı; düzende zorunlu. | `{{ content_for_layout }}` |
| `canonical_url` | Sayfanın asıl adresi. | `<link rel="canonical" href="{{ canonical_url }}">` |
| `page_title` | Sayfanın başlığı. | `<title>{{ page_title }}</title>` |
| `page_description` | Sayfanın açıklaması. | `{{ page_description \| escape }}` |
| `page_image` | Sayfanın paylaşım görseli. | `{{ page_image \| image_url: width: 1200 }}` |
| `current_page` | Sayfalamadaki sayfa numarası. | `{{ current_page }}` |
| `current_tags` | Koleksiyon ve blog sayfasında seçili etiketler. | `{% if current_tags contains tag %}` |
| `handle` | Sayfadaki kaynağın tanıtıcısı. | `{{ handle }}` |
| `powered_by_link` | Platformun bağlantısı. | `{{ powered_by_link }}` |
| `country_option_tags`, `all_country_option_tags` | Ülke seçimi için `<option>` öğeleri. | `<select>{{ country_option_tags }}</select>` |
| `recommendations` | Ürün önerileri (`/recommendations/products` ile çizilen bölümde dolu). | `{% if recommendations.performed %}` |
| `closest` | Sayfaya en yakın kaynaklar: `closest.product`, `closest.collection`, `closest.page`, `closest.blog`, `closest.article`. | `{{ closest.product.title }}` |

`scripts` tanımlıdır ama boştur; `additional_checkout_buttons` her zaman yanlıştır.

Şablonun kendi nesnesi de her dosyadan görülür: ürün sayfasında `product`, koleksiyon sayfasında `collection`, içerik sayfasında `page`, blog sayfasında `blog`, yazı sayfasında `blog` ve `article`, aramada `search`, hediye kartı sayfasında `gift_card`, arama önerilerinde `predictive_search`.

## Bölüm ve blok

| Nesne | Alanlar |
| :--- | :--- |
| `section` | `id`, `settings`, `blocks`, `index`, `index0`, `location` |
| `block` | `id`, `type`, `settings`, `blocks`, `biticaret_attributes` |

```liquid
<h2>{{ section.settings.heading | escape }}</h2>
```

## Etiketlerin verdiği nesneler

| Nesne | Nerede | Alanlar |
| :--- | :--- | :--- |
| `forloop` | `{% for %}` içinde | `name`, `length`, `parentloop`, `index`, `index0`, `rindex`, `rindex0`, `first`, `last` |
| `tablerowloop` | `{% tablerow %}` içinde | `length`, `col`, `col0`, `row`, `index`, `index0`, `rindex`, `rindex0`, `first`, `last`, `col_first`, `col_last` |
| `paginate` | `{% paginate %}` içinde | `current_page`, `current_offset`, `items`, `pages`, `page_size`, `page_param`, `parts`, `previous`, `next` |
| `form` | `{% form %}` içinde | `id`, `posted_successfully?`, `errors`, `set_as_default_checkbox`, `password_needed` ve formun kendi alanları |

**Form hataları** (`form.errors`): `messages`, `translated_fields`, `size`.

```liquid
{%- paginate collection.products by 24 -%}
  {%- if paginate.pages > 1 %}{{ paginate | default_pagination }}{% endif -%}
{%- endpaginate -%}
```

## Mağaza

**`shop`**: `id`, `name`, `description`, `email`, `phone`, `domain`, `permanent_domain`, `url`, `secure_url`, `currency`, `money_format`, `money_with_currency_format`, `locale`, `taxes_included`, `address`, `password_message`, `customer_accounts_enabled`, `customer_accounts_optional`, `accepts_gift_cards`, `enabled_payment_types`, `enabled_currencies`, `published_locales`, `enabled_locales`, `policies`, `privacy_policy`, `refund_policy`, `shipping_policy`, `terms_of_service`, `subscription_policy`, `contact_information`, `legal_notice`, `products_count`, `collections_count`, `types`, `vendors`, `search_types`, `metafields`, `brand`.

**Politika** (`shop.privacy_policy` ve diğerleri): `id`, `title`, `body`, `url`, `handle`.

**`request`**: `design_mode`, `visual_preview_mode`, `host`, `origin`, `path`, `page_type`, `locale`.

**`routes`**: `root_url`, `account_url`, `account_login_url`, `account_logout_url`, `account_register_url`, `account_recover_url`, `account_addresses_url`, `account_profile_url`, `storefront_login_url`, `collections_url`, `all_products_collection_url`, `search_url`, `predictive_search_url`, `cart_url`, `cart_add_url`, `cart_change_url`, `cart_clear_url`, `cart_update_url`, `product_recommendations_url`.

```liquid
<a href="{{ routes.cart_url }}">{{ 'general.cart' | t }} ({{ cart.item_count }})</a>
```

**`template`**: `name`, `suffix`, `directory`.

**`theme`**: `id`, `name`, `role`.

**`localization`**: `available_countries`, `available_languages`, `country`, `language`, `market`.

**Ülke** (`localization.country`): `iso_code`, `name`, `continent`, `currency`, `unit_system`, `popular?`, `available_languages`, `market`.

**Pazar** (`localization.market`): `id`, `handle`, `name`, `metafields`.

## Ürün

**`product`**: `id`, `handle`, `title`, `type`, `vendor`, `description`, `content`, `tags`, `template_suffix`, `url`, `created_at`, `published_at`, `updated_at`, `price`, `price_min`, `price_max`, `price_varies`, `compare_at_price`, `compare_at_price_min`, `compare_at_price_max`, `compare_at_price_varies`, `available`, `variants`, `variants_count`, `has_only_default_variant`, `first_available_variant`, `selected_variant`, `selected_or_first_available_variant`, `options`, `options_with_values`, `options_by_name`, `featured_image`, `featured_media`, `images`, `media`, `collections`, `metafields`, `category`, `gift_card?`, `selling_plan_groups`, `selected_selling_plan`, `selected_selling_plan_allocation`, `selected_or_first_available_selling_plan_allocation`, `requires_selling_plan`, `quantity_price_breaks_configured?`.

Bir ürünün en çok 2 048 varyantı olabilir. `product.variants` ve `product | json` ilk 250 varyantı verir; `variants_count`, fiyatlar, seçenek değerleri ve `?variant=` parametresi bütün varyantları kapsar, `/products/<ürün>.js` hepsini listeler.

Ürün, varyant ve sepet satırındaki abonelik ve adet fiyatı alanları (`selling_plan_…`, `requires_selling_plan`, `quantity_price_breaks…`) yanıtlanır ama boştur; platformda abonelik satışı yoktur.

```liquid
{%- assign current = product.selected_or_first_available_variant -%}
<h1>{{ product.title }}</h1>
<p>
  {{ current.price | money }}
  {%- if current.compare_at_price > current.price %} <s>{{ current.compare_at_price | money }}</s>{% endif %}
</p>
```

**Varyant** (`product.variants`): `id`, `title`, `sku`, `barcode`, `available`, `selected`, `matched`, `url`, `price`, `compare_at_price`, `unit_price`, `unit_price_measurement`, `inventory_management`, `inventory_policy`, `inventory_quantity`, `image`, `featured_image`, `featured_media`, `options`, `options_with_values`, `option1`, `option2`, `option3`, `requires_shipping`, `taxable`, `weight`, `weight_unit`, `weight_in_unit`, `metafields`, `product`, `position`, `quantity_rule`, `store_availabilities`, `incoming`, `next_incoming_date`, `selected_selling_plan_allocation`, `selling_plan_allocations`, `requires_selling_plan`, `quantity_price_breaks`, `quantity_price_breaks_configured?`.

**Seçenek** (`product.options_with_values`): `name`, `position`, `values`, `selected_value`.

**Seçenek değeri**: `id`, `name`, `selected`, `available`, `variant`, `product_url`, `swatch`.

**Görsel** (`product.featured_image`, `product.images`): `id`, `alt`, `src`, `width`, `height`, `aspect_ratio`, `presentation`, `media_type`, `position`, `product_id`, `variants`, `attached_to_variant?`, `preview_image`, `url`.

**Odak noktası** (`image.presentation.focal_point`): `x`, `y`.

**Medya** (`product.media`): `id`, `alt`, `media_type`, `position`, `preview_image`, `aspect_ratio`, `host`, `external_id`, `duration`, `sources`.

**Video adresi** (`video_url` türündeki ayar): `id`, `type`.

## Koleksiyon

**`collection`**: `id`, `handle`, `title`, `description`, `url`, `published_at`, `updated_at`, `template_suffix`, `image`, `featured_image`, `metafields`, `products`, `products_count`, `all_products_count`, `all_tags`, `all_types`, `all_vendors`, `tags`, `current_type`, `current_vendor`, `default_sort_by`, `sort_by`, `sort_options`, `filters`, `next_product`, `previous_product`.

`next_product` ve `previous_product`, `/collections/<koleksiyon>/products/<ürün>` adresiyle açılan ürün sayfasında doludur.

**Filtre** (`collection.filters`, `search.filters`): `label`, `param_name`, `type`, `operator`, `presentation`, `values`, `active_values`, `inactive_values`, `true_value`, `false_value`, `min_value`, `max_value`, `range_max`, `url_to_remove`.

**Filtre değeri**: `active`, `value`, `label`, `count`, `param_name`, `image`, `swatch`, `url_to_add`, `url_to_remove`.

## İçerik ve menüler

**`page`**: `id`, `handle`, `title`, `content`, `author`, `url`, `published_at`, `created_at`, `updated_at`, `template_suffix`, `metafields`.

**`blog`**: `id`, `handle`, `title`, `url`, `articles`, `articles_count`, `all_tags`, `tags`, `comments_enabled?`, `moderated?`, `next_article`, `previous_article`, `template_suffix`, `metafields`.

`blog.articles` en yeniden eskiye sıralıdır ve `paginate` ile sayfalanır; `/blogs/<blog>/tagged/<etiket>` adresinde yalnızca o etiketli yazıları verir ve `blog.tags` seçili etiketlerdir. `next_article` (daha eski) ve `previous_article` (daha yeni) yazı sayfasında doludur.

**`article`**: `id`, `handle`, `title`, `author`, `content`, `excerpt`, `excerpt_or_content`, `image`, `tags`, `url`, `published_at`, `created_at`, `updated_at`, `template_suffix`, `user`, `comments`, `comments_count`, `comments_enabled?`, `moderated?`, `comment_post_url`, `metafields`.

Yorumlar yoktur: `comments` boştur, `comments_count` sıfırdır, `comments_enabled?` yanlıştır.

**Yazar** (`article.user`): `name`, `first_name`, `last_name`, `account_owner`, `bio`, `email`, `homepage`, `image`. Adlar yazının yazar alanından gelir; ötekiler boştur.

```liquid
{%- paginate blog.articles by 6 -%}
  {%- for article in blog.articles -%}
    <h2><a href="{{ article.url }}">{{ article.title }}</a></h2>
    {{ article.excerpt_or_content | strip_html | truncate: 160 }}
  {%- endfor -%}
  {{ paginate | default_pagination }}
{%- endpaginate -%}
```

**Menü** (`linklists['<tanıtıcı>']`): `handle`, `title`, `id`, `links`, `levels`.

**Bağlantı** (`linklist.links`): `title`, `url`, `handle`, `links`, `levels`, `active`, `current`, `child_active`, `child_current`, `type`, `object`, `data_sharing_opt_out_icon`.

```liquid
{%- for link in section.settings.menu.links -%}
  <li><a href="{{ link.url }}"{% if link.current %} aria-current="page"{% endif %}>{{ link.title }}</a></li>
{%- endfor -%}
```

## Sepet

**`cart`**: `items`, `item_count`, `empty?`, `items_subtotal_price`, `original_total_price`, `total_price`, `checkout_charge_amount`, `total_discount`, `discount_applications`, `cart_level_discount_applications`, `discounts`, `attributes`, `note`, `currency`, `requires_shipping`, `taxes_included`, `duties_included`, `total_weight`, `token`, `company_location`.

**Sepet satırı** (`cart.items`): `id`, `key`, `quantity`, `product`, `product_id`, `variant`, `variant_id`, `title`, `sku`, `vendor`, `url`, `url_to_remove`, `image`, `options_with_values`, `properties`, `original_price`, `price`, `original_line_price`, `line_price`, `final_price`, `final_line_price`, `line_level_total_discount`, `total_discount`, `discount_allocations`, `line_level_discount_allocations`, `discounts`, `tax_lines`, `message`, `unit_price`, `unit_price_measurement`, `error_message`, `components`, `gift_card`, `requires_shipping`, `taxable`, `grams`, `selling_plan_allocation`, `fulfillment`, `fulfillment_service`, `successfully_fulfilled_quantity`.

**Şirket konumu** (`cart.company_location`, şirket adına alışverişte): `id`, `name`, `company_name`, `payment_terms`, `tax_exempt`.

## Müşteri

**`customer`**: `id`, `email`, `first_name`, `last_name`, `name`, `phone`, `accepts_marketing`, `accepts_sms_marketing`, `has_account`, `tax_exempt`, `b2b?`, `tags`, `orders_count`, `total_spent`, `default_address`, `addresses`, `addresses_count`, `orders`, `last_order`, `store_credit_account`, `gift_cards`, `metafields`.

**Müşterinin siparişi** (`customer.orders`): `id`, `name`, `order_number`, `created_at`, `cancelled`, `cancelled_at`, `financial_status`, `fulfillment_status`, `total_price`, `cash_total_price`, `installment_count`, `installment_markup`, `customer_url`, `shipping_method` (`title`, `delivery_method`), `delivery_method` (`shipping`, `pickup` veya `local_delivery`), `pickup_location` (mağazadan teslim alınacak siparişte konumun `name`, `address`, `instructions`, `ready_in` alanları), `payment_terms`, `attributes` (siparişin sepet özellikleri; hediye siparişinde `Hediye`, `Hediye notu`, `Fiyatları gizle`).

**Adres** (`customer.default_address`, `shop.address`): `id`, `first_name`, `last_name`, `name`, `company`, `address1`, `address2`, `street`, `city`, `province`, `province_code`, `zip`, `country`, `country_code`, `phone`, `summary`.

## Arama

**`search`**: `performed`, `terms`, `results`, `results_count`, `types`, `filters`, `sort_by`, `default_sort_by`, `sort_options`.

**`predictive_search`**: `performed`, `terms`, `types`, `resources` (`products`, `collections`, `pages`, `articles`, `queries`).

**`recommendations`**: `performed`, `performed?`, `products`, `products_count`, `intent`.

## Hediye kartı

**`gift_card`** (`/gift_cards/<jeton>` sayfasında): `balance`, `initial_value`, `currency`, `enabled`, `expired`, `expires_on`, `last_four_characters`, `code`, `url`, `qr_identifier`, `pass_url`, `customer`, `product`, `send_on`, `message`, `recipient`, `template_suffix`, `properties`, `created_at`.

**Hediye kartının müşterisi** (`gift_card.customer`): `name`.

**Mağaza kredisi** (`customer.store_credit_account`): `balance`, `currency`.

## Meta alanlar

`product`, varyant, `collection`, `blog`, `article`, `customer` ve `shop` nesnelerinin `metafields` alanı ad alanı ve anahtarla okunur. `page.metafields` boştur.

`value`, türüne göre değerdir: sayı, doğru/yanlış, tarih veya metin; `json` ve `rating` türlerinde nesne. Başvuru türlerinde (`product_reference`, `variant_reference`, `collection_reference`, `page_reference`, `blog_reference`, `article_reference`, `file_reference`, `metaobject_reference` ve `list.` ile başlayan liste halleri) `value` başvurulan nesnedir, liste türlerinde nesnelerin listesidir; mağazada bulunamayan kayıtlar atlanır. `file_reference` bir görsel veya video medyasıdır. `customer_reference` vitrinde her zaman boştur: bir müşterinin kaydı başkasına gösterilmez.

**Meta alan**: `value`, `type`, `namespace`, `key`, `list?`.

```liquid
{{ product.metafields.custom.care_guide.value }}
```

**`app`** (uygulama bloklarında): `metafields`, uygulamanın kendi meta alanları.

## Özel veriler

Mağazanın özel veri türleri (Ayarlar → Özel veriler) `metaobjects.<tür>` ile okunur: `metaobjects.<tür>.<kayıt adresi>` bir kayıt, `metaobjects.<tür>.values` türün kayıtları (en çok 250). Vitrin yalnızca etkin kayıtları gösterir; taslaklar bulunmaz.

**Özel veri kaydı** (`metaobject`): `system`.

**Kaydın sistem alanları** (`metaobject.system`): `handle`, `type`, `id`, `url`.

Kaydın her alanı anahtarıyla bir meta alandır: `.value` türüne göre değerdir, alanın kendisi de değerini yazar. `url` yalnızca türün web sayfaları açıksa doludur.

`metaobject_reference` türündeki bir meta alanın `value` değeri kaydın kendisidir; `list.metaobject_reference` için kayıtların listesidir. Web sayfaları açık bir türün kaydı `/pages/<tür adresi>/<kayıt adresi>` adresinde `templates/metaobject/<tür>.json` (ya da `.liquid`) şablonuyla çizilir; şablonda kayıt `metaobject` nesnesidir. Şablon yoksa adres 404 verir.

```liquid
{% for book in metaobjects.book.values %}{{ book.title.value }}{% endfor %}
{{ metaobjects.book.dune.author }}
{% for b in product.metafields.custom.books.value %}<a href="{{ b.system.url }}">{{ b.title }}</a>{% endfor %}
```

## Ayar değerleri

**Renk** (`color` türündeki ayar): `red`, `green`, `blue`, `alpha`, `hue`, `saturation`, `lightness`, `chroma`, `color_space`, `rgb`, `rgba`, `oklch`, `oklcha`.

**Renk şeması** (`color_scheme` türündeki ayar): `id`, `settings`.

**Yazı tipi** (`font_picker` türündeki ayar): `family`, `fallback_families`, `style`, `weight`, `baseline_ratio`, `system?`, `system`, `variants`.
