---
name: fotopiastore
description: "Expose Fotopia Store browser-console methods under `window._web_skills.fotopiaStore` for storefront automation and debugging."
---

# Fotopia Store storefront console API for product search, order preparation, and inventory-based wish list automation

Use the browser console entrypoint:

```js
window._web_skills.fotopiaStore
```

Available functions:

## `findProduct(input)`

Purpose: Search storefront product or stock rows and return normalized matches. `query` uses the storefront keyword search only: it is not vector search, not blurry/fuzzy search, and not intent/semantic search. Do not put natural-language shopping requests into `query`. Use short literal keywords that are likely to appear in product names or codes, for example `"Leica M6"`, `"35mm"`, or `"Summicron"`. If the user is asking for a category such as "wide angle lens for Leica", do not use that phrase as `query`; use `categoryKey: "lenses_wide_angle_lens_for_leica"` instead, then filter the results. Use `excludeKeywords` to remove matches containing unwanted literal terms in product name, code, description, serial, included text, note, or remark. Available category keys: cameras_leica_film, cameras_leica_digital, cameras_others, lenses_wide_angle_lens_for_leica, lenses_standard_lens_for_leica, lenses_telephoto_lens_for_leica, lenses_lenses_for_leica_s_system, lenses_others, accessories_tom_abrahamson, accessories_viewfinders, accessories_lens_hoods, accessories_caps, accessories_books, accessories_cases_and_straps, accessories_others, filters, arte_di_mano_leather_cases, arte_di_mano_leather_straps, arte_di_mano_leather_case_and_strap, cameras_leica_r_cameras, cameras_leica_r_lens, cameras_leica_t_system, nikon_system, nikon_lenses, nikon_accessories, fujifilm_cameras, fujifilm_lenses, jay_tsujimura_tokyo, adapters, cameras_medium_format, lenses_lenses_for_leica_sl_system.

Input:

```ts
{
  query?: string | null;
  stockId?: string | null;
  productId?: string | null;
  categoryKey?: string | null;
  excludeKeywords?: string[] | null;
  productName?: string | null;
  productCode?: string | null;
  serialNumber?: string | null;
  status?: number; // int | null
  purchasableOnly?: boolean;
  hasPrice?: boolean;
  limit?: number; // int | null
}
```

Output:

```ts
({
  source: "store" | "search";
  tabIndex: number; // int | null
  tabKey: string | null;
  sectionIndex: number; // int | null
  sectionKey: string | null;
  productId: string;
  productLegacyId: number; // int | null
  productName: string;
  productCode: string | null;
  productDescription: string | null;
  productRoute: string | null;
  categoryIndex: number; // int
  categoryKey: string | null;
  categoryName: string | null;
  stockId: string;
  status: string;
  serialNumber: string | null;
  condition: string;
  includedText: string | null;
  note: string | null;
  remark: string | null;
  quantity: number; // int
  soldQuantity: number; // int
  unitPrice: string | null;
  images: string[];
  isNewArrival: boolean;
  isBrandNewHighlight: boolean;
})[]
```

## `prepareOrder(input)`

Purpose: Clear the current cart, populate it from the supplied items, hydrate checkout state, and navigate to checkout by default.

Input:

```ts
({
  cart: ({
    stockId: string;
    quantity?: number; // gt: 0
  })[];
  navigateToCheckout?: boolean;
  fulfillmentMethod: "PICKUP";
  phone: string;
  note?: string | null;
}) | ({
  cart: ({
    stockId: string;
    quantity?: number; // gt: 0
  })[];
  navigateToCheckout?: boolean;
  fulfillmentMethod: "DELIVERY";
  phone: string;
  countryCode: string;
  postalCode?: string | null;
  stateOrRegion?: string | null;
  city: string;
  addressLine1: string;
  addressLine2?: string | null;
  note?: string | null;
  selectedServiceType?: string | null;
})
```

Output:

```ts
void
```

## `addWishlist(input)`

Purpose: Upsert multiple inventory-scoped wish list entries in local storage and navigate to the wish list page by default.

Input:

```ts
{
  items: ({
    stockId: string;
    comment?: string | null;
  })[];
  navigateToWishlist?: boolean;
}
```

Output:

```ts
void
```
