Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Commit

Permalink
fix: Delete comments, fix interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
rmakara committed Oct 28, 2019
1 parent 12a7371 commit 08f2023
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 21 deletions.
18 changes: 5 additions & 13 deletions rfc/Resolver/CategoryForHeadless.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { Category } from "../../packages/shopware-6-client/src/interfaces/models/content/category/Category";
import { Media } from "@shopware-pwa/shopware-6-client/src/interfaces/models/content/media/Media";
import { CmsPage } from "@shopware-pwa/shopware-6-client/src/interfaces/models/content/cms/CmsPage";
import { Breadcrumb } from "./Breadcrumb";
import { ProductForHeadless } from "./ProductForHeadless";
import { ProductForCategoryPageHeadless } from "./ProductForCategoryPageHeadless";
import { CmsPage } from "../../packages/shopware-6-client/src/interfaces/models/content/cms/CmsPage";
import { Media } from "../../packages/shopware-6-client/src/interfaces/models/content/media/Media";

// PLACEHOLDERS IN CMS PAGES OF SHOPWARE 6
//
Expand All @@ -19,28 +18,21 @@ export interface CategoryForHeadless {
availableSorting: [Sort];
availableFiltering: [Filter];

// basic category data
id: string;
name: string | null;
description: string;
childCount: number;
// type: string;

// structure in a tree
parentId: string | null;
breadcrumb: Breadcrumb[];
level: number;

// child categories and products
children: CategoryForHeadless[] | null;
products: ProductForHeadless[] | null;
products: ProductForCategoryPageHeadless[] | null;

// how to handle cms pages?
// cmsPageId: string | null;
cmsPage: CmsPage | null;

// I guess we do not need media on category level. More like on cms page level?
//mediaId: string | null;
// what is media here? some thumbnail of a category?
media: Media | null;
}

Expand Down
15 changes: 8 additions & 7 deletions rfc/Resolver/ProductForProductPageHeadless.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ProductManufacturer } from "@shopware-pwa/shopware-6-client/src/interfaces/models/content/product/ProductManufacturer";
import { Unit } from "@shopware-pwa/shopware-6-client/src/interfaces/models/system/unit/Unit";
import { ProductPrice } from "@shopware-pwa/shopware-6-client/src/interfaces/models/content/product/ProductPrice";
import { Tax } from "@shopware-pwa/shopware-6-client/src/interfaces/models/system/tax/Tax";
import { Price } from "@shopware-pwa/shopware-6-client/src/interfaces/models/framework/pricing/Price";
import { CalculatedPrice } from "@shopware-pwa/shopware-6-client/src/interfaces/models/checkout/cart/price/CalculatedPrice";
import { ProductManufacturer } from "../../packages/shopware-6-client/src/interfaces/models/content/product/ProductManufacturer";
import { Unit } from "../../packages/shopware-6-client/src/interfaces/models/system/unit/Unit";
import { Price } from "../../packages/shopware-6-client/src/interfaces/models/framework/pricing/Price";
import { CalculatedPrice } from "../../packages/shopware-6-client/src/interfaces/models/checkout/cart/price/CalculatedPrice";
import { Tax } from "../../packages/shopware-6-client/src/interfaces/models/system/tax/Tax";
import { ProductPrice } from "../../packages/shopware-6-client/src/interfaces/models/content/product/ProductPrice";

export interface ProductForProductPageHeadless {
// basic product data
Expand All @@ -26,14 +26,15 @@ export interface ProductForProductPageHeadless {
isNew: boolean;

// whats the difference between calculated and not calculated prices?
// can we get the price objects just to display for given sw-context-token and product page url path?
calculatedPrices: Price[];
calculatedPrice: CalculatedPrice;
price: Price[] | null;
tax: Tax;
prices: ProductPrice[];
parentId: string | null;

// stocks
// warehouse stocks
available: boolean;

// decission on how to display a quantity? as a text field, drop down etc.
Expand Down
2 changes: 1 addition & 1 deletion rfc/ResolverInterface.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ShopwareParams } from "@shopware-pwa/shopware-6-client/src/helpers/searchConverter";
import { ShopwareParams } from "../packages/shopware-6-client/src/helpers/searchConverter";
import { CmsPageForHeadless } from "./Resolver/CmsPageForHeadless";
import { ProductForCategoryPageHeadless } from "./Resolver/ProductForCategoryPageHeadless";
import { ProductForProductPageHeadless } from "./Resolver/ProductForProductPageHeadless";
Expand Down

0 comments on commit 08f2023

Please sign in to comment.