Akinon Release Notes (06/09/2025) are now live! Click here to learn what's new.
LogoLogo
API Reference
  • Home
  • Quick Start
  • Tutorials
  • Technical Guides
  • Release Notes
  • Glossary
  • Welcome to Akinon Technical Guides
  • ACC
    • ACC CLI
    • Create Application via CLI
    • Deploy Environment Variables
    • App Store for Developers
  • Omnitron
    • Product Types
    • Product Categorization
    • Splitting a Merged Order Item
  • Commerce
    • Shipping Rules Calculator
    • Data Source Shipping Options
    • Attribute Based Shipping Options
    • Filtering Products
    • Conversation & Messages
    • Sitemap Configuration
    • Weight-Based Product Sales
    • Group Attribute Sets
    • Contract Management
    • Find in Store for Whippy Ware
    • Plugins
    • Remote Price
    • E-mail Templates
    • Loyalty Accounts
    • Search Structure
    • User Segmentation & Rules
    • Configuring User Segmentation
    • Promotions
    • Email Redirection in Multi-Frontend Structure
  • OMS
    • Getting Started with OMS
    • Basic Setup
    • Scenarios
    • Capacity Feature
    • Package Management
      • Packages
      • Transfer
      • States
    • Commands
      • Packages
        • Package Command Parameters
        • DeAllocate Package Reservations Command
        • Channel Based Complete Packaging without Shipment Command
        • Complete Packaging with Shipment Command
        • Complete Packaging without Shipment Command
        • Package Refuse with Denial Reason Command
        • Product Not Found & Wrong Product Command
        • Product Not Found & Wrong Product Command Advanced
        • Package Packed for Refund Command
        • Block The Package For Action Command
        • Unblock the Package For Action Command
        • Update The Package’s Invoice
        • Manual Planning Command
      • Transfer
        • Transfer Order Advanced Command
        • Product for Transfer Not Found & Wrong Product Command
        • Transfer Delivered Command
        • Transfer Dispatch Command
        • Transfer Ready for Dispatch Command
        • Transfer Out Of Stock
      • Shipment
        • Shipment Order Command
        • Package Advanced Shipment Command
        • Ship The Package Command
        • Ship The Package without Shipment Integration Command
        • Update The Package’s Shipment Status Command
        • Update Shipment Info of Package Command
    • Inventory Locations & Engine
      • Properties & Domain Relation
      • Customization
      • Inventory Engine
    • Fulfillment
      • Shipments
      • Invoice Integration
    • Webhooks
      • Webhook Examples
        • Order Webhook
        • Package Webhook
        • Shipment Webhook
        • Stock Location Webhook
        • Transfer Webhook
    • Integrating OMS with Seller Center
  • Instore
    • Getting Started
    • Cash Register Integration
    • OTP (One Time Password) Process
    • Services
      • Password Reset Services
  • Marketplace Dashboard
    • N11 Marketplace Setup Configurations
    • Trendyol Marketplace Setup Configurations
    • Walmart Marketplace Setup Configurations
    • Amazon Marketplace Setup Configurations
    • Hepsiburada Marketplace Setup Configurations
    • Fashfed Marketplace Setup Configurations
    • Mono Marketplace Setup Configurations
    • Passo Marketplace Setup Configurations
    • Package Splitting Flow
    • Marketplace Dashboard Flow Trigger
  • Project Zero
    • Django
      • Basic Setup
      • Project Structure
        • Templates & Components
        • Private Dependencies
        • Omnife Project Submodule
        • Webpack
        • ESLint Rules
        • Bundles
        • Multilanguage & Translation
        • Environmental File
        • Custom Error Pages
        • Icon Font
      • Page Types
        • Static Pages & Flatpages
        • Account Page
          • Template Rendering in Account Pages
          • Forms & Validation
        • Basket Page
          • Redux Basket State
          • Basket Page - View
        • Checkout
          • Redux Checkout State
          • View & Template Rendering
          • Masking & Validation
      • Theming & Styling
      • Widgets
      • SEO Management
      • Extending Project Zero
    • Next.js
      • Basic Setup
      • Deployment
      • Static Assets
      • Icons
      • SEO Management
      • Advanced Usage
      • Plugins
        • Akinon Next
          • Data Fetching
            • Client
              • Account
              • Address
              • Basket
              • Checkout
              • Misc
              • Product
              • User
              • Wishlist
            • Server
              • Category
              • Flat Page
              • Landing Page
              • List
              • Menu
              • Product
              • SEO
              • Special Page
              • Widget
          • Localization
          • Widgets
        • Akifast
        • B2B
        • Basket Gift Package
        • BKM Express
        • Checkout Gift Package
        • Click&Collect
        • Credit Payment
        • GarantiPay
        • Hepsipay
        • Masterpass
        • Multi Basket
        • One Click Checkout
        • OTP
        • Pay on Delivery
        • Saved Card
        • Tabby Payment Gateway
        • Tamara Payment Gateway
  • App Maker
    • Setup Your Environment
    • Plugin Quickstart
    • Create Project
    • Setup Existing Project
    • Deploy Project
    • Users and Roles
    • Add Public Key
    • App Maker CLI
    • Create App on Stores
      • Creating App on Apple App Store
      • Creating App on Google Play Store
    • Mobile App Framework
      • Configuration
      • Framework
      • Project Structure
        • Structure
        • Data Containers
        • Pages
      • Dependency Integration
        • Plugins
        • Akinon Plugin Adapter
  • Akifast
    • HPP
      • Getting Started
      • Authorization
      • Payment Session Creation
        • Key Points Before Creating a Payment Session
        • Creating Payment Session
        • Redirecting to the Payment Page
        • Errors Encountered During Payment Session Creation
      • Merchant Services
        • Shipping Query URL
        • Agreement Query URL
        • Other URLs
  • B2B
    • Getting Started
    • B2B Setup
  • Adds-on
    • Invoicer
      • Introduction
      • Invoice & Pay On Delivery Service
  • Channel App Template
    • Introduction
    • Installation and Usage
    • Development Steps
      • Folder Structure
      • Starting Step
      • Encoding the Sales Channel
        • Introduction
        • Setup
        • Products
        • Product Price
        • Product Stock
        • Product Image
        • Orders
        • Product Data
      • Adding a New Command to Akinon
      • Listening for External Requests
    • Architecture
      • Introduction
      • Integration
      • Services (Flows)
        • Introduction
        • Product Service
        • Price Service
        • Stock Service
        • Image Service
        • Order Service
  • Multi Regional Settings
    • Multi Regional Settings
  • 3rd Party Integration
    • NKolay POS Payment Integration
    • ShipX (Inpost) Shipment Extension
    • Checkout Flow Integration
    • Ngenius Payment Integration
    • ShypV Shipment Extension
    • Masterpass via Craftgate POS
    • Benefit via Tap
    • Tap Credit Card
    • PayU Payment Extension
    • Pay with Iyzico Payment Extension
    • Multisafepay Payment Extension
    • Masterpass Installment Integration
    • Masterpass Iframe Extension
    • Mollie Payment Extension
    • Masterpass REST POS
    • Masterpass Rest Payment Option
    • YooMoney Payment Extension
    • MyFatoorah Payment Installation
    • Checkout Payment Extension
    • CyberSource Credit Card Integration
    • QNBPay Integration
    • KNET Payment Integration
    • MNG Seller Pays Shipment Extension
    • Porter Express Shipment Extension
    • Akbank Installation
    • Fero AI Shipment Extension
    • Horoz Lojistik Satıcı Öder Shipment Extension
    • Kolay Gelsin Shipment Extension
    • Falcon Flex Shipment Extension
    • Tap Saved Card Installation
    • NAPS QPay via Tap Installation
    • Tamara Payment Extension
    • Paywall Payment Integration
    • Horoz Lojistik Shipment Extension
    • Monist Shipment Extension
    • Sipay Integration
    • Nestpay Integration
Powered by GitBook

© 2025 Akinon. All rights reserved.

On this page
  • useGetFavoritesQuery
  • useGetStockAlertsQuery
  • useGetCollectionsOOSQuery
  • useLazyGetCollectionsOOSQuery
  • useLazyDeleteCollectionQuery
  • useLazyDeleteCollectionItemQuery

Was this helpful?

  1. Project Zero
  2. Next.js
  3. Plugins
  4. Akinon Next
  5. Data Fetching
  6. Client

Wishlist

useGetFavoritesQuery

This function is used to fetch a list of favorite products.

The useGetFavoritesQuery function is imported from '@akinon/next/data/client/wishlist'.

import { useGetFavoritesQuery } from '@akinon/next/data/client/wishlist';

To fetch the list of favorite products, create a variable and call the function:

  const { data: favorites } = useGetFavoritesQuery({
    page: Number(searchParams.get('page')),
    limit: Number(searchParams.get('limit'))
  });

Following parameters can be sent to the function:

  • page: This value is used for pagination, indicating the page the user is currently on.

  • limit: It determines the limit of products on page the user is currently on.

Data returned from function:

  • count: It provides the total number of products that have been added to favorites.

  • next: This is used for pagination. If a user is on page 2, it contains the URL of page 3.

  • previous: This is used for pagination. If a user is on page 2, it contains the URL of page 1.

{
  "count": 1,
  "next": null,
  "previous": null,
  "results": [{
    "pk": 12,
    "product": {
      "pk": 39,
      "name": "Product Name",
      "sku": "000000",
      "base_code": "000000",
      "attributes": {
        ...
      },
      "attribute_set": 1,
      "attributes_kwargs": {
        ...
      },
      "extra_attributes": {},
      "productimage_set": [{
        "status": "active",
        "image": "https://image-url.jpg",
        "created_date": "2023-04-18T09:52:55.333304Z",
        "specialimage_set": [],
        "pk": 312,
        "order": 4
      }],
      "price": "59",
      "in_stock": true,
      "currency_type": "aed",
      "retail_price": "85",
      "unit_type": "qty",
      "absolute_url": "/product-url/",
      "productvideo_set": [],
      "product_type": "0",
      "price_type": "default",
      "form_schema": null,
      "is_ready_to_basket": false,
      "stock": 80,
      "data_source": null,
      "basket_offers": [{
        ...
      }],
      "extra_data": {
        "variants": [{
          "attribute_key": "color",
          "options": [{
            "product": {
              "absolute_url": "/url",
              "price": "59",
              "attributes": {
                ...
              },
              "pk": 31,
              "productimage_set": [{
                "status": "active",
                "image": "https://image-url.jpg",
                "created_date": "2023-04-18T09:52:55.333304Z",
                "specialimage_set": [],
                "pk": 312,
                "order": 4
              }]
            },
            "in_stock": true,
            "is_selectable": true,
            "label": "Green"
          }]
        }]
      }
    }
  }]
}

useGetStockAlertsQuery

The useGetStockAlertsQuery function is used to retrieve the list of stock alert subscriptions made by the user (e.g. “notify me when in stock”). It accepts pagination parameters like page and limit.

The useGetStockAlertsQuery function is imported from '@akinon/next/data/client/wishlist'.

import { useGetStockAlertsQuery } from '@akinon/next/data/client/wishlist';

This function can be used like this:

const { data: getStockAlerts, refetch: fetchStockAlerts } = useGetStockAlertsQuery({
   page: 1,
   limit: 1000,
 }, { skip: !isLoggedIn });

useGetCollectionsOOSQuery

Manages the flow where products that were previously added to the cart but later went out of stock are displayed to the user, and removed from the cart after being acknowledged, allowing the user to proceed with their shopping.

The useGetCollectionsOOSQuery function is imported from '@akinon/next/data/client/wishlist'.

import { useGetCollectionsOOSQuery } from '@akinon/next/data/client/wishlist';

This function can be used like this:

const { data: collectionList, isSuccess: isCollectionSuccess } =
   useGetCollectionsOOSQuery(
     {
       search: collectionName // or product_id: someProductId
     },
     {
       skip:
         !basketData || basketData?.unavailable_basket_products?.length === 0
     }
   );

Both search and product_id parameters are optional — the query can be executed with either, both, or none.

useLazyGetCollectionsOOSQuery

The useLazyGetCollectionsOOSQuery function is used to lazily fetch collections associated with out-of-stock products.

Unlike regular queries, it doesn't run automatically on mount — it must be triggered manually, typically in response to user actions or specific conditions.

The useLazyGetCollectionsOOSQuery function is imported from '@akinon/next/data/client/wishlist'.

import { useLazyGetCollectionsOOSQuery } from '@akinon/next/data/client/wishlist';

This function can be used like this:

const [getCollectionsOOS] = useLazyGetCollectionsOOSQuery();
const [oosData, setOosData] = useState(null);

const fetchOOSData = () => {
   if (status !== 'authenticated') {
     return;
   }

   getCollectionsOOS({ search: collectionName })
     .unwrap()
     .then((res) => {
       setOosData(res);
     });
 };

useLazyDeleteCollectionQuery

The useLazyDeleteCollectionQuery function is used to remove products from the cart that were previously added but are now out of stock.

As a lazy query, it doesn't run automatically — it must be triggered manually, typically after the user has seen the out-of-stock item.

The useLazyDeleteCollectionQuery function is imported from '@akinon/next/data/client/wishlist'.

import { useLazyDeleteCollectionQuery } from '@akinon/next/data/client/wishlist';

This function can be used like this:

const [deleteCollection] = useLazyDeleteCollectionQuery();
const [oosData, setOosData] = useState(null);

const removeCollectionAndContinueHandler = () => {
   if (status !== 'authenticated') {
     return;
   }

   if (oosData?.results[0]?.pk) {
     deleteCollection(oosData.results[0].pk)
       .unwrap()
       .finally(() => {
         fetchOOSData();
       });
   }
 };

useLazyDeleteCollectionItemQuery

The useLazyDeleteCollectionItemQuery function is used to remove a single item from a collection, typically a list of out-of-stock products.

Since it's a lazy query, it doesn't execute automatically — it must be triggered manually.

The useLazyDeleteCollectionItemQuery function is imported from '@akinon/next/data/client/wishlist'.

import { useLazyDeleteCollectionItemQuery } from '@akinon/next/data/client/wishlist';

This function can be used like this:

const [deleteCollectionItem] = useLazyDeleteCollectionItemQuery();

await deleteCollectionItem(itemPk).unwrap();
PreviousUserNextServer

Last updated 5 hours ago

Was this helpful?