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
    • 6. FAQ
    • 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
      • Offer
      • ProductAttachments
      • ProductAttributes
      • ProductComparison
      • ProductDocumentation
      • ProductMixList
      • ProductsBlock
      • ProductsCarousel
      • ProductSingle
      • Profile
      • Quote
      • Register
      • RelatedProducts
      • SingleBlog
      • Stores
      • TextWithImage
      • ThankYouPage
      • TopBar
      • Wishlist
    • 3. Reusables
      • _Overview
      • Addresses
      • AddressForm
      • AnnouncementModal
      • BackToTop
      • BillingRetail
      • Company
      • General
      • Login
      • LoginModal
      • MonthlyTransactions
      • Offers
      • Orders
      • Payment
      • ProductAttachments
      • ProductAttributes
      • ProductComparisonButton
      • ProductComparisonFloatingButton
      • ProductGridItem
      • ProductListItem
      • ProductModal
      • ProfileInfo
      • PromptModal
      • Quotes
      • Register
      • Services
      • Shipping
      • ShoppingLists
      • ShoppingListsButton
      • ShoppingListsNavbar
      • Toast
      • Transactions
      • Users
      • VariantContent
      • WishlistButton
    • 4. Assets
      • Fonts
      • Images
      • Templates
      • Javascript
        • _Overview
        • theme.js
      • Css - Scss
        • _Overview
        • ThemeClasses
    • 5. SDK
      • _Overview
      • LiquidGlobals
      • ServicesSDK
  1. 3. Reusables

Offers

Purpose#

Offers is the Profile-tab reusable that lists customer offers with status/sort filtering and pagination.
It renders responsive offer tables/cards and keeps filter/page state in URL query parameters.

Where it's rendered#

In Components/Profile/Default.liquid:
{% render 'Reusables\\Offers\\Default', offerData: offerData %}

Inputs (Liquid render parameters)#

Offers is rendered with a single parameter:
offerData

Model shape (storefront example)#

Sanitized example of the payload used by this reusable:
{
  "offerData": {
    "status": "Open",
    "sort": "expiresAt_desc",
    "pagination": {
      "pageNumber": 1,
      "numberOfPages": 3
    },
    "availableStatuses": [
      "All",
      "Draft",
      "Open",
      "Accepted",
      "Expired",
      "Rejected"
    ],
    "availableSorts": [
      "expiresAt_desc",
      "expiresAt_asc",
      "insertdate_desc",
      "insertdate_asc"
    ],
    "list": [
      {
        "id": "Offer Id",
        "title": "Sample title",
        "customerName": "Sample name",
        "status": "Open",
        "insertDate": "2026-05-10T09:15:00Z",
        "expiresAt": "2026-06-10T09:15:00Z"
      }
    ]
  }
}

Required fields#

offerData.pagination.pageNumber
offerData.pagination.numberOfPages
offerData.list

Optional fields#

offerData.status
offerData.sort
offerData.availableStatuses
offerData.availableSorts

Template behavior (Liquid + Alpine)#

Source: Reusables/Offers/Default.liquid.
Computes a Liquid sliding-window pagination list.
Mounts Alpine via:
x-data="offersreusabledefault.initComponent(currentPage, totalPages, offerData)"
Status and sort selectors call redirectToState(1) on change.
If offerData is empty/null, it renders a no-data/no-results message.
Offer rows link to /offer/{id} in a new tab.

Data contract (JS runtime)#

Document runtime state shape, factories, and main state fields.

JavaScript#

Source: Reusables/Offers/Default.js.

initComponent#

Factory that returns reusable state (currentPage, totalPages, offerData, status, sort) and handlers.

redirectToState#

Builds query-string state (offerPage, offerStatus, offerSort) and redirects to the same path.

Global Alpine stores#

No direct Alpine store dependencies are used by this reusable.

Services / API calls#

No direct API/service calls are made by this reusable.

Dependencies#

List template/JS/JSON files and other real dependencies.

Notes#

The reusable keeps filtering/pagination state in URL params, so refresh/share preserves current view.
Translation labels are read from Reusables/Offers/Default.json (Reusables.Offers.Translations.*).
Modified at 2026-06-15 06:42:31
Previous
MonthlyTransactions
Next
Orders
Built with