Home
Wiki
Home
Wiki
  1. 3. Reusables
  • Back to home
  • 1. Themes
  • Vs Code
    • Getting Started
  • Kitchenware
    • Layout
      • New Layout
      • Legacy Layout
    • Components
      • Announcement
      • Banner Carousel
      • Banner With Products Carousel
      • Blog Category List
      • Blog List
      • Brand List
      • Brands Carousel
      • Breadcrumb
      • Call To Action
      • Cart
      • Categories List
      • Change Password
      • Checkout
      • Cookie Manager
      • Filter list
      • Footer
      • Forgot Password
      • Form
      • Hero Carousel
      • Icon Block
      • Invitation
      • Last Visited Products
      • Layout
      • Login
      • Map
      • Nav Bar
      • Offer
      • Product Attachments
      • Product Attributes
      • Product Documentation
      • Product Expected
      • Product Modal
      • Products Block
      • Products Carousel
      • Product Single
      • Profile
      • Quote
      • Register
      • Related Products
      • Search
      • Stores
      • Subscribe Newsletter
      • Text with Image
      • Top Bar
      • Video
    • Reusables
      • Getting Started
    • Assets
      • Getting Started
    • SDK
      • Products
        • _findProductsByCategory
        • _findProductsByIds
        • _findProductsByTitle
        • _findProductsByFilter
        • _findProductsByCriteria
        • _findProductsAndCalculate
        • _findProductsThenCalculate
        • _getProductAttributeSet
        • _setLastVisited
      • Categories
        • _findCategoryTreeById
        • _findCategoriesByIds
        • _findCategoryByAlias
        • _findCategoryTreeByAlias
        • _getCategoryContent
      • Collections
        • _getCollectionContent
        • _findCollectionsByIds
        • _findCollectionsByIdsThenCalculate
      • Brands
        • _getBrandContent
        • _findBrandsByIds
      • Cart
        • _addToCartMulti
        • _addToCart
        • _setCart
        • _clearCart
        • _setCartListener
        • _removeFromCart
        • _calculateCart
      • Checkout
        • _startCheckout
        • _updateCheckout
        • _completeCheckout
      • Shopping Lists
        • _getShoppingLists
        • _updateShoppingList
        • _createShoppingList
        • _deleteShoppingList
        • _getShoppingListByAlias
      • Navigation
        • _getFooterMenu
        • _getHeaderMenu
      • Users
        • _getUserById
      • Utils
        • _calculateCurrency
        • _getCurrencySymbol
        • _getCulture
        • _subscribeToNewsletter
        • _findUnitsByIds
  • Noir
    • 0. Introduction
    • 1. Structure
      • Overview
      • LayoutA.liquid
      • ComponentsList.liquid
      • Metas.liquid
      • CssVariables.liquid
      • Json.liquid
      • GoogleTagManager.liquid
      • StagingButton.liquid
    • 2. Components
      • Overview
      • Announcement
      • BannerCarousel
      • BlogCategoryList
      • BlogList
      • BrandList
      • Breadcrumb
      • Cart
      • CategoriesList
      • ChangePassword
      • Checkout
      • CookieManager
      • FilterList
      • Footer
      • ForgotPassword
      • Form
      • IconBlock
      • Invitation
      • LastVisitedProducts
      • Login
      • Map
      • NavBar
      • ProductAttachments
      • ProductAttributes
      • ProductComparison
      • ProductDocumentation
      • ProductMixList
      • ProductsBlock
      • ProductsCarousel
      • ProductSingle
      • Profile
      • Register
      • RelatedProducts
      • SingleBlog
      • Stores
      • TextWithImage
      • ThankYouPage
      • TopBar
      • Wishlist
    • 3. Reusables
      • Overview
      • Addresses
      • BillingRetail
      • AddressForm
      • AnnouncementModal
      • BackToTop
      • Company
      • General
      • Login
      • LoginModal
      • Orders
      • Payment
      • ProductAttachments
      • ProductAttributes
      • ProductComparisonButton
      • ProductComparisonFloatingButton
      • ProductGridItem
      • ProductListItem
      • ShoppingListsButton
      • ProductModal
      • ProfileInfo
      • PromptModal
      • Register
      • Shipping
      • ShoppingLists
      • ShoppingListsNavbar
      • Toast
      • Users
      • VariantContent
      • WishlistButton
      • Services
    • 4. Assets
      • Fonts
      • Images
      • Templates
      • Javascript
        • Overview
        • theme.js
      • Css / Scss
        • Overview
        • ThemeClasses
    • 5. SDK
      • Overview
      • LiquidGlobals
      • ServicesSDK
  1. 3. Reusables

ProductAttributes

Purpose#

The ProductAttributes reusable renders a two-column (label/value) list of product attribute items (e.g. Material, Gender, Washing instructions).

Where it's rendered#

This reusable is rendered by parent templates/components that pass an attributes array, typically from product-related views.
(Example pattern used across the theme)
{% render 'Reusables\\ProductAttributes\\Default', attributes: product.attributes %}

Inputs (Liquid render parameters)#

Named parameters:
attributes
The reusable expects attributes to be an array of attribute items.

Template behavior (Liquid + Alpine)#

The template renders a <ul> list and iterates attributes.
Each attribute item is rendered only if item.attributeItemValue is truthy.
For each rendered item it outputs a responsive grid:
left column: item.name
right column: item.attributeItemValue
It applies alternating zebra background styles based on index parity (forloop.index0 | modulo: 2).
There is no Alpine wiring in this reusable (no x-data, no $store usage).

Data contract (JS runtime)#

This reusable is Liquid-only, but it has a strict runtime data contract for each attribute item.

Model shape (storefront example)#

Example (from a real ProductAttributes model dump) keeping only the relevant fields for this reusable:
{
  "attributes": [
    {
      "name": "Sample text",
      "slug": "sample",
      "usedAsFilter": false,
      "displayOnProduct": true,
      "displayOnList": true,
      "displayOnCompare": true,
      "attributeId": "Attribute Id",
      "attributeItemId": "Attribute Item Id",
      "attributeItemValue": "Sample text"
    },
    ...
  ]
}

attributes[] item fields (as consumed by Liquid)#

Required for meaningful rendering:
name
Rendered as the label (left column).
attributeItemValue
Rendered as the value (right column). Also acts as a guard: if falsy, the item is not rendered.
Optional fields (present in real data but not used by the current template):
slug
usedAsFilter
displayOnProduct
displayOnList
displayOnCompare
attributeId
attributeItemId

JavaScript#

Global object#

Global object: productattributesreusabledefault
Notes:
It is currently an empty object ({}) and is not referenced by the Liquid template.

Dependencies#

Liquid: Reusables/ProductAttributes/Default.liquid

Notes#

If attributeItemValue contains long strings, the layout will wrap inside the right column.
This reusable does not currently use translations (Default.json is effectively empty).
Modified at 2026-04-14 13:18:56
Previous
ProductAttachments
Next
ProductComparisonButton
Built with