flowrix 1.0.1-beta.115 → 1.0.1-beta.117

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "flowrix",
3
3
  "configKey": "flowrix",
4
- "version": "1.0.1-beta.115",
4
+ "version": "1.0.1-beta.117",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -1,4 +1,4 @@
1
- export declare const useCategoryIndex: (props: any, ProductTypes?: string[]) => {
1
+ export declare const useCategoryIndex: (props: any, ProductTypes?: never[]) => {
2
2
  catData: any;
3
3
  pending: any;
4
4
  error: any;
@@ -1,12 +1,23 @@
1
1
  import { useHead, useRoute, useAsyncData } from "#imports";
2
2
  import { computed } from "vue";
3
- export const useCategoryIndex = (props, ProductTypes = ["custom", "simple", "bundle"]) => {
3
+ export const useCategoryIndex = (props, ProductTypes = []) => {
4
4
  const route = useRoute();
5
5
  const slug = route.params.slug;
6
6
  let query = {
7
- ...route.query,
8
- "ProductType[]": ProductTypes
7
+ ...route.query
9
8
  };
9
+ if (ProductTypes.includes("custom")) {
10
+ query.custom = "true";
11
+ }
12
+ if (ProductTypes.includes("simple")) {
13
+ query.simple = "true";
14
+ }
15
+ if (ProductTypes.includes("bundle")) {
16
+ query.bundle = "true";
17
+ }
18
+ if (ProductTypes.includes("sample")) {
19
+ query.sample = "true";
20
+ }
10
21
  const { data: catData, pending, error, refresh } = useAsyncData(
11
22
  `category-${slug}-${JSON.stringify(route.query)}`,
12
23
  () => $fetch(`/api/category/${slug}`, { query })
@@ -62,10 +62,15 @@ export function useProductComponent(product) {
62
62
  });
63
63
  }
64
64
  useHead({
65
+ title: product?.meta_title || product?.name || "",
65
66
  meta: [
66
67
  {
67
68
  name: "robots",
68
69
  content: product?.robots || ""
70
+ },
71
+ {
72
+ name: "description",
73
+ content: product?.meta_description || ""
69
74
  }
70
75
  ],
71
76
  script: [
@@ -12,7 +12,7 @@ export default function(props) {
12
12
  () => import("@/components/Samples/Template01/TopBar.vue")
13
13
  );
14
14
  const SampleCard = defineAsyncComponent(
15
- () => import("@/components/Samples/Template01/SampleProductCard.vue")
15
+ () => import("@/components/Product/SampleProductCard.vue")
16
16
  );
17
17
  const Pagination = defineAsyncComponent(
18
18
  () => import("@/components/Others/Pagination.vue")
@@ -39,7 +39,7 @@ export default defineEventHandler(async (event) => {
39
39
  };
40
40
  query = {
41
41
  ...query,
42
- "scope[withchildren]": "true"
42
+ "withchildren": "true"
43
43
  };
44
44
  const options = {
45
45
  headers: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowrix",
3
- "version": "1.0.1-beta.115",
3
+ "version": "1.0.1-beta.117",
4
4
  "description": "Plug-and-play Nuxt eCommerce cart powered by FLOWRiX. Subscription required.",
5
5
  "license": "MIT",
6
6
  "type": "module",