@infrab4a/connect-angular 3.9.2-beta1 → 3.9.2-beta2
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.
|
@@ -856,7 +856,7 @@
|
|
|
856
856
|
slug: slug !== null && slug !== void 0 ? slug : product.slug,
|
|
857
857
|
sku: sku !== null && sku !== void 0 ? sku : product.sku,
|
|
858
858
|
stock: stock,
|
|
859
|
-
price: price,
|
|
859
|
+
price: this.roundPrice(price),
|
|
860
860
|
image: image,
|
|
861
861
|
weight: weight !== null && weight !== void 0 ? weight : product.weight,
|
|
862
862
|
quantity: (item.quantity || 0) + (quantity || 0),
|
|
@@ -977,7 +977,7 @@
|
|
|
977
977
|
CartService.prototype.roundPrice = function (productPrice) {
|
|
978
978
|
var price = productPrice.price, fullPrice = productPrice.fullPrice;
|
|
979
979
|
var round = function (value) { return Math.round((value + Number.EPSILON) * 100) / 100; };
|
|
980
|
-
return Object.assign(Object.assign(Object.assign({}, productPrice), { price: Number(price.toFixed(2)), fullPrice: Number(
|
|
980
|
+
return Object.assign(Object.assign(Object.assign({}, productPrice), { price: Number(price.toFixed(2)), fullPrice: Number(fullPrice.toFixed(2)) }), (productPrice.subscriberPrice && { subscriberPrice: Number(productPrice.subscriberPrice.toFixed(2)) }));
|
|
981
981
|
};
|
|
982
982
|
CartService.prototype.getProductData = function (productId) {
|
|
983
983
|
return __awaiter(this, void 0, void 0, function () {
|