flowrix 1.0.1-beta.154 → 1.0.1-beta.156

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.154",
4
+ "version": "1.0.1-beta.156",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -147,6 +147,10 @@ export default function() {
147
147
  cartInfo.totals = checkoutStore?.config?.calculations ? checkoutStore?.config?.calculations : "";
148
148
  let shippingmethods = checkoutStore.config?.shippingmethods;
149
149
  let shipping_method = shippingmethods?.filter((method) => method.selected == true)[0];
150
+ let quotationData = checkoutStore.config?.quotation || {};
151
+ if (Object.keys(quotationData).length > 0) {
152
+ inputData.value.email = quotationData.email;
153
+ }
150
154
  let deliverymethods = checkoutStore.config.preferences;
151
155
  let deliverymethod = false;
152
156
  let delivery_method = deliverymethods?.filter((method) => method.selected == true)[0];
@@ -27,14 +27,14 @@ export default function() {
27
27
  const pageslug = route.params.slug;
28
28
  delete route.query.page;
29
29
  const timestamp = Date.now();
30
- router.push({
30
+ window.location.href = router.resolve({
31
31
  path: targetRouteName,
32
32
  params: {
33
33
  slug: pageslug,
34
34
  pagenumber: pageNumber
35
35
  },
36
- query: { ...route.query, _t: timestamp }
37
- });
36
+ query: { ...route.query }
37
+ }).href;
38
38
  };
39
39
  const isChecked = (slug, dynamicQueryParam) => {
40
40
  if (route.query !== void 0) {
@@ -37,6 +37,7 @@ async function request(method, config = {}, endpoint, options = {}) {
37
37
  ...options,
38
38
  headers,
39
39
  onResponse({ response: response2 }) {
40
+ console.log(response2);
40
41
  const token = response2.headers.get("x-session-token");
41
42
  if (token) {
42
43
  if (process.client) {
@@ -1,10 +1,11 @@
1
- import { defineEventHandler } from "h3";
1
+ import { defineEventHandler, getQuery } from "h3";
2
2
  import { flowrixApi } from "../../../middleware/flowrix.js";
3
3
  import { useRuntimeConfig } from "#imports";
4
4
  import { existsSync } from "fs";
5
5
  import { join } from "path";
6
6
  import { rm } from "fs/promises";
7
7
  export default defineEventHandler(async (event) => {
8
+ let query = getQuery(event);
8
9
  const slug = event.context.params._;
9
10
  const config = useRuntimeConfig();
10
11
  const rawCookies = event.req.headers.cookie || "";
@@ -15,7 +16,8 @@ export default defineEventHandler(async (event) => {
15
16
  const options = {
16
17
  headers: {
17
18
  "x-api-secret": apiConfig?.FLOWRIX_API_SECRET || ""
18
- }
19
+ },
20
+ query
19
21
  };
20
22
  const page = await flowrixApi.get(`permalink/${slug}`, apiConfig, options);
21
23
  if (config.FLOWRIX_CACHE != "true" || config.public?.FLOWRIX_CACHE != "true") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowrix",
3
- "version": "1.0.1-beta.154",
3
+ "version": "1.0.1-beta.156",
4
4
  "description": "Plug-and-play Nuxt eCommerce cart powered by FLOWRiX. Subscription required.",
5
5
  "license": "MIT",
6
6
  "type": "module",