@moonbase.sh/vue 0.3.6 → 0.3.8
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/index.cjs +10 -0
- package/dist/index.js +10 -0
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -662,6 +662,16 @@ function useCart(context) {
|
|
|
662
662
|
}
|
|
663
663
|
} else {
|
|
664
664
|
lineItem.quantity += 1;
|
|
665
|
+
if (!lineItem.variation && variation)
|
|
666
|
+
lineItem.variation = variation;
|
|
667
|
+
if (!lineItem.price && variation)
|
|
668
|
+
lineItem.price = variation.price;
|
|
669
|
+
if (!lineItem.appliedDiscount && variation.discount)
|
|
670
|
+
lineItem.appliedDiscount = variation.discount;
|
|
671
|
+
if (lineItem.type === "Product" && item.type === "product" && !lineItem.product)
|
|
672
|
+
lineItem.product = item;
|
|
673
|
+
if (lineItem.type === "Bundle" && item.type === "bundle" && !lineItem.bundle)
|
|
674
|
+
lineItem.bundle = item;
|
|
665
675
|
}
|
|
666
676
|
const _ = storefront.pushOrderContent();
|
|
667
677
|
return lineItem;
|
package/dist/index.js
CHANGED
|
@@ -632,6 +632,16 @@ function useCart(context) {
|
|
|
632
632
|
}
|
|
633
633
|
} else {
|
|
634
634
|
lineItem.quantity += 1;
|
|
635
|
+
if (!lineItem.variation && variation)
|
|
636
|
+
lineItem.variation = variation;
|
|
637
|
+
if (!lineItem.price && variation)
|
|
638
|
+
lineItem.price = variation.price;
|
|
639
|
+
if (!lineItem.appliedDiscount && variation.discount)
|
|
640
|
+
lineItem.appliedDiscount = variation.discount;
|
|
641
|
+
if (lineItem.type === "Product" && item.type === "product" && !lineItem.product)
|
|
642
|
+
lineItem.product = item;
|
|
643
|
+
if (lineItem.type === "Bundle" && item.type === "bundle" && !lineItem.bundle)
|
|
644
|
+
lineItem.bundle = item;
|
|
635
645
|
}
|
|
636
646
|
const _ = storefront.pushOrderContent();
|
|
637
647
|
return lineItem;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moonbase.sh/vue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.8",
|
|
5
5
|
"description": "Package to let you build vue.js storefronts with Moonbase.sh as payment and delivery provider",
|
|
6
6
|
"author": "Tobias Lønnerød Madsen <m@dsen.tv>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@vue/devtools-api": "^6.6.3",
|
|
20
20
|
"uuid": "^9.0.1",
|
|
21
21
|
"zod": "^3.23.8",
|
|
22
|
-
"@moonbase.sh/storefront-api": "0.3.
|
|
22
|
+
"@moonbase.sh/storefront-api": "0.3.8"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/uuid": "^9.0.8",
|