@storepecker/storefront-core 2.9.0 → 2.9.1
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/api/index.cjs +22 -18
- package/dist/api/index.d.cts +16 -8
- package/dist/api/index.d.ts +16 -8
- package/dist/api/index.js +1 -1
- package/dist/{buy-now-B1dkx82V.d.cts → buy-now-BqVWXyy8.d.cts} +1 -1
- package/dist/{buy-now-BgKd5p4J.d.ts → buy-now-DFdnuLjO.d.ts} +1 -1
- package/dist/{cart-BGIsIZdM.d.ts → cart-DZq1ZEnE.d.ts} +1 -1
- package/dist/{cart-CyN2JQTw.d.cts → cart-DwMFBmpC.d.cts} +1 -1
- package/dist/checkout/index.cjs +21 -21
- package/dist/checkout/index.d.cts +3 -3
- package/dist/checkout/index.d.ts +3 -3
- package/dist/checkout/index.js +2 -2
- package/dist/{chunk-TFWTQTWE.cjs → chunk-34Y7Y5FU.cjs} +12 -12
- package/dist/{chunk-CIBMO44U.cjs → chunk-NOT6VKXA.cjs} +18 -15
- package/dist/{chunk-ETXIP5XE.cjs → chunk-NRPK5GCJ.cjs} +8 -0
- package/dist/{chunk-K44JZ5NL.cjs → chunk-NSAHGMS7.cjs} +6 -1
- package/dist/{chunk-SU5LVRZD.js → chunk-QQHQTBAM.js} +12 -9
- package/dist/{chunk-WFDKKOO7.js → chunk-VAU5OL72.js} +6 -1
- package/dist/{chunk-UWW5YIHL.js → chunk-VPTN4YXD.js} +1 -1
- package/dist/{chunk-YMZZCVZ2.js → chunk-ZAWZ3RB6.js} +8 -1
- package/dist/{collections-ycrA2cPL.d.ts → collections-CNh2OGbl.d.ts} +1 -1
- package/dist/{collections-8YdINtUf.d.cts → collections-CXgOv5_G.d.cts} +1 -1
- package/dist/components/digital-product-download-modal.d.cts +2 -2
- package/dist/components/digital-product-download-modal.d.ts +2 -2
- package/dist/components/index.d.cts +5 -5
- package/dist/components/index.d.ts +5 -5
- package/dist/components/share-button.d.cts +1 -1
- package/dist/components/share-button.d.ts +1 -1
- package/dist/components/theme-data-initializer.d.cts +5 -5
- package/dist/components/theme-data-initializer.d.ts +5 -5
- package/dist/hooks/index.cjs +47 -20
- package/dist/hooks/index.d.cts +6 -5
- package/dist/hooks/index.d.ts +6 -5
- package/dist/hooks/index.js +32 -5
- package/dist/{instagram-CqJBZ-0X.d.ts → instagram-BADLnNQ3.d.ts} +1 -1
- package/dist/{instagram-D4JUT4ZU.d.cts → instagram-DalreBu6.d.cts} +1 -1
- package/dist/models/index.d.cts +7 -7
- package/dist/models/index.d.ts +7 -7
- package/dist/{orders-COKWr7K7.d.cts → orders-B3G4CyhH.d.cts} +1 -1
- package/dist/{orders-Cp8qNCrl.d.ts → orders-Bl-Slh72.d.ts} +1 -1
- package/dist/{pixelEvents-BJNH06rS.d.cts → pixelEvents-BtEO5QAR.d.cts} +4 -4
- package/dist/{pixelEvents-2Tb-_fRP.d.ts → pixelEvents-LsealscG.d.ts} +4 -4
- package/dist/{product-CZtFWhxO.d.ts → product-D9liEtl4.d.cts} +1 -0
- package/dist/{product-CZtFWhxO.d.cts → product-D9liEtl4.d.ts} +1 -0
- package/dist/store/index.cjs +7 -7
- package/dist/store/index.d.cts +6 -6
- package/dist/store/index.d.ts +6 -6
- package/dist/store/index.js +2 -2
- package/dist/utils/index.cjs +2 -2
- package/dist/utils/index.d.cts +7 -7
- package/dist/utils/index.d.ts +7 -7
- package/dist/utils/index.js +1 -1
- package/dist/{wishlist-Cx9Vrszq.d.cts → wishlist-BakHvIFN.d.cts} +1 -1
- package/dist/{wishlist-CRNbfFIx.d.ts → wishlist-Cj0sQxiY.d.ts} +1 -1
- package/package.json +1 -1
package/dist/api/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkY46EHRJQ_cjs = require('../chunk-Y46EHRJQ.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkNRPK5GCJ_cjs = require('../chunk-NRPK5GCJ.cjs');
|
|
5
5
|
require('../chunk-NQZ5GUOG.cjs');
|
|
6
6
|
var chunkXFOUNOKO_cjs = require('../chunk-XFOUNOKO.cjs');
|
|
7
7
|
var chunkH6FJYRO3_cjs = require('../chunk-H6FJYRO3.cjs');
|
|
@@ -173,71 +173,75 @@ Object.defineProperty(exports, "updateUserDetails", {
|
|
|
173
173
|
});
|
|
174
174
|
Object.defineProperty(exports, "addToCart", {
|
|
175
175
|
enumerable: true,
|
|
176
|
-
get: function () { return
|
|
176
|
+
get: function () { return chunkNRPK5GCJ_cjs.addToCart; }
|
|
177
177
|
});
|
|
178
178
|
Object.defineProperty(exports, "addWishlist", {
|
|
179
179
|
enumerable: true,
|
|
180
|
-
get: function () { return
|
|
180
|
+
get: function () { return chunkNRPK5GCJ_cjs.addWishlist; }
|
|
181
181
|
});
|
|
182
182
|
Object.defineProperty(exports, "getCart", {
|
|
183
183
|
enumerable: true,
|
|
184
|
-
get: function () { return
|
|
184
|
+
get: function () { return chunkNRPK5GCJ_cjs.getCart; }
|
|
185
185
|
});
|
|
186
186
|
Object.defineProperty(exports, "getCartItemQuantity", {
|
|
187
187
|
enumerable: true,
|
|
188
|
-
get: function () { return
|
|
188
|
+
get: function () { return chunkNRPK5GCJ_cjs.getCartItemQuantity; }
|
|
189
189
|
});
|
|
190
190
|
Object.defineProperty(exports, "getCategories", {
|
|
191
191
|
enumerable: true,
|
|
192
|
-
get: function () { return
|
|
192
|
+
get: function () { return chunkNRPK5GCJ_cjs.getCategories; }
|
|
193
193
|
});
|
|
194
194
|
Object.defineProperty(exports, "getDigitalProductDownloadLink", {
|
|
195
195
|
enumerable: true,
|
|
196
|
-
get: function () { return
|
|
196
|
+
get: function () { return chunkNRPK5GCJ_cjs.getDigitalProductDownloadLink; }
|
|
197
197
|
});
|
|
198
198
|
Object.defineProperty(exports, "getProductCategories", {
|
|
199
199
|
enumerable: true,
|
|
200
|
-
get: function () { return
|
|
200
|
+
get: function () { return chunkNRPK5GCJ_cjs.getProductCategories; }
|
|
201
201
|
});
|
|
202
202
|
Object.defineProperty(exports, "getProductDetail", {
|
|
203
203
|
enumerable: true,
|
|
204
|
-
get: function () { return
|
|
204
|
+
get: function () { return chunkNRPK5GCJ_cjs.getProductDetail; }
|
|
205
205
|
});
|
|
206
206
|
Object.defineProperty(exports, "getProductDetailBySlug", {
|
|
207
207
|
enumerable: true,
|
|
208
|
-
get: function () { return
|
|
208
|
+
get: function () { return chunkNRPK5GCJ_cjs.getProductDetailBySlug; }
|
|
209
209
|
});
|
|
210
210
|
Object.defineProperty(exports, "getProductList", {
|
|
211
211
|
enumerable: true,
|
|
212
|
-
get: function () { return
|
|
212
|
+
get: function () { return chunkNRPK5GCJ_cjs.getProductList; }
|
|
213
213
|
});
|
|
214
214
|
Object.defineProperty(exports, "getProducts", {
|
|
215
215
|
enumerable: true,
|
|
216
|
-
get: function () { return
|
|
216
|
+
get: function () { return chunkNRPK5GCJ_cjs.getProducts; }
|
|
217
217
|
});
|
|
218
218
|
Object.defineProperty(exports, "getWishlist", {
|
|
219
219
|
enumerable: true,
|
|
220
|
-
get: function () { return
|
|
220
|
+
get: function () { return chunkNRPK5GCJ_cjs.getWishlist; }
|
|
221
|
+
});
|
|
222
|
+
Object.defineProperty(exports, "mergeCart", {
|
|
223
|
+
enumerable: true,
|
|
224
|
+
get: function () { return chunkNRPK5GCJ_cjs.mergeCart; }
|
|
221
225
|
});
|
|
222
226
|
Object.defineProperty(exports, "notifyProductStock", {
|
|
223
227
|
enumerable: true,
|
|
224
|
-
get: function () { return
|
|
228
|
+
get: function () { return chunkNRPK5GCJ_cjs.notifyProductStock; }
|
|
225
229
|
});
|
|
226
230
|
Object.defineProperty(exports, "removeFromCart", {
|
|
227
231
|
enumerable: true,
|
|
228
|
-
get: function () { return
|
|
232
|
+
get: function () { return chunkNRPK5GCJ_cjs.removeFromCart; }
|
|
229
233
|
});
|
|
230
234
|
Object.defineProperty(exports, "removeFromWishlist", {
|
|
231
235
|
enumerable: true,
|
|
232
|
-
get: function () { return
|
|
236
|
+
get: function () { return chunkNRPK5GCJ_cjs.removeFromWishlist; }
|
|
233
237
|
});
|
|
234
238
|
Object.defineProperty(exports, "updateCart", {
|
|
235
239
|
enumerable: true,
|
|
236
|
-
get: function () { return
|
|
240
|
+
get: function () { return chunkNRPK5GCJ_cjs.updateCart; }
|
|
237
241
|
});
|
|
238
242
|
Object.defineProperty(exports, "updateDigitalProductDownloadLinkCount", {
|
|
239
243
|
enumerable: true,
|
|
240
|
-
get: function () { return
|
|
244
|
+
get: function () { return chunkNRPK5GCJ_cjs.updateDigitalProductDownloadLinkCount; }
|
|
241
245
|
});
|
|
242
246
|
Object.defineProperty(exports, "applyCoupon", {
|
|
243
247
|
enumerable: true,
|
package/dist/api/index.d.cts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as axios from 'axios';
|
|
2
2
|
import { AxiosInstance, AxiosResponse } from 'axios';
|
|
3
3
|
import { A as Address } from '../address-DwBZHzbI.cjs';
|
|
4
|
-
import { U as User, C as Cart, d as CouponResponse, c as Coupon, b as Category } from '../cart-
|
|
5
|
-
import { d as Product, f as ProductDetail } from '../product-
|
|
6
|
-
import { O as Order } from '../orders-
|
|
7
|
-
import { B as BuyNow, P as PublicCheckout } from '../buy-now-
|
|
8
|
-
import { W as Wishlist } from '../wishlist-
|
|
9
|
-
import { C as CollectionResponse } from '../collections-
|
|
10
|
-
import { R as Review, A as Analytics, a as Booking, B as Blog, I as Instagram } from '../instagram-
|
|
4
|
+
import { U as User, C as Cart, d as CouponResponse, c as Coupon, b as Category } from '../cart-DwMFBmpC.cjs';
|
|
5
|
+
import { d as Product, f as ProductDetail } from '../product-D9liEtl4.cjs';
|
|
6
|
+
import { O as Order } from '../orders-B3G4CyhH.cjs';
|
|
7
|
+
import { B as BuyNow, P as PublicCheckout } from '../buy-now-BqVWXyy8.cjs';
|
|
8
|
+
import { W as Wishlist } from '../wishlist-BakHvIFN.cjs';
|
|
9
|
+
import { C as CollectionResponse } from '../collections-CXgOv5_G.cjs';
|
|
10
|
+
import { R as Review, A as Analytics, a as Booking, B as Blog, I as Instagram } from '../instagram-DalreBu6.cjs';
|
|
11
11
|
import 'react-toastify';
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -55,6 +55,14 @@ declare function addToCart(product: Array<{
|
|
|
55
55
|
customer_input: string;
|
|
56
56
|
product_variant: number;
|
|
57
57
|
}>): Promise<AxiosResponse<Cart.Root>>;
|
|
58
|
+
declare function mergeCart(product: Array<{
|
|
59
|
+
variant_id: number;
|
|
60
|
+
quantity: number;
|
|
61
|
+
}>, customizationInputs?: Array<{
|
|
62
|
+
customization_option: number;
|
|
63
|
+
customer_input: string;
|
|
64
|
+
product_variant: number;
|
|
65
|
+
}>): Promise<AxiosResponse<Cart.Root>>;
|
|
58
66
|
declare function removeFromCart(product: Array<{
|
|
59
67
|
variant_id: number;
|
|
60
68
|
quantity: number;
|
|
@@ -289,4 +297,4 @@ declare function getMultipleBlogsBySlugs(slugs: string): Promise<AxiosResponse<{
|
|
|
289
297
|
*/
|
|
290
298
|
declare function getInstagramMedia(ids: string | (string | number)[]): Promise<AxiosResponse<Instagram.MediaRefreshResponse>>;
|
|
291
299
|
|
|
292
|
-
export { type BookingFilter, type OTPCredentials, type VerifyOTPCredentials, addAddress, addReview, addToCart, addWishlist, applyCoupon, buyNowPreview, checkPhonepePaymentStatus, checkPhonepePaymentStatusPublic, createBooking, deleteAddress, getAddresses, getAffiliateRedirect, getAppliedCoupon, getBlogPostBySlug, getBlogPostsList, getCart, getCartItemQuantity, getCategories, getCollection, getCountries, getCoupons, getDigitalProductDownloadLink, getFilters, getHttpService, getInstagramMedia, getLoginMethod, getMultipleBlogsBySlugs, getMultipleCollections, getNewToken, getOrderDetails, getOrderDetailsByNumber, getOrderDetailsByRef, getOrderDetailsByRefV2, getOrders, getProductCategories, getProductDetail, getProductDetailBySlug, getProductList, getProducts, getPublicOrderDetailsByNumber, getPublicOrderDetailsByRef, getReviewSummary, getReviews, getServerHttpService, getStripePaymentStatus, getStripePaymentStatusPublic, getSubdivisions, getUserBookings, getUserDetails, getWishlist, httpService, makeCODOrder, notifyProductStock, phonepeOrderSuccess, phonepePaymentFailure, phonepePublicOrderSuccess, placeBuyNowOrder, placeGuestBuyNowOrder, placeOrder, placePublicOrder, postAnalytics, publicCheckoutPreview, publicMakeCODOrder, publicPhonepeOrderFailure, publicPlaceOrder, publicRazorpayOrderFailure, publicStripeOrderFailure, razorpayOrderFail, razorpayOrderSuccess, razorpayPublicOrderSuccess, removeCoupon, removeFromCart, removeFromWishlist, resetHttpService, sendOTP, serverHttpService, setSessionExpiredCallback, stripeOrderFail, stripeOrderSuccess, stripePublicOrderSuccess, tabbyPaymentFailure, updateAddress, updateCart, updateDigitalProductDownloadLinkCount, updateOrder, updateOrderCustomization, updateUserDetails, uploadCustomizationImage, uploadReviewImages, verifyOTP, verifyTabbyPayment };
|
|
300
|
+
export { type BookingFilter, type OTPCredentials, type VerifyOTPCredentials, addAddress, addReview, addToCart, addWishlist, applyCoupon, buyNowPreview, checkPhonepePaymentStatus, checkPhonepePaymentStatusPublic, createBooking, deleteAddress, getAddresses, getAffiliateRedirect, getAppliedCoupon, getBlogPostBySlug, getBlogPostsList, getCart, getCartItemQuantity, getCategories, getCollection, getCountries, getCoupons, getDigitalProductDownloadLink, getFilters, getHttpService, getInstagramMedia, getLoginMethod, getMultipleBlogsBySlugs, getMultipleCollections, getNewToken, getOrderDetails, getOrderDetailsByNumber, getOrderDetailsByRef, getOrderDetailsByRefV2, getOrders, getProductCategories, getProductDetail, getProductDetailBySlug, getProductList, getProducts, getPublicOrderDetailsByNumber, getPublicOrderDetailsByRef, getReviewSummary, getReviews, getServerHttpService, getStripePaymentStatus, getStripePaymentStatusPublic, getSubdivisions, getUserBookings, getUserDetails, getWishlist, httpService, makeCODOrder, mergeCart, notifyProductStock, phonepeOrderSuccess, phonepePaymentFailure, phonepePublicOrderSuccess, placeBuyNowOrder, placeGuestBuyNowOrder, placeOrder, placePublicOrder, postAnalytics, publicCheckoutPreview, publicMakeCODOrder, publicPhonepeOrderFailure, publicPlaceOrder, publicRazorpayOrderFailure, publicStripeOrderFailure, razorpayOrderFail, razorpayOrderSuccess, razorpayPublicOrderSuccess, removeCoupon, removeFromCart, removeFromWishlist, resetHttpService, sendOTP, serverHttpService, setSessionExpiredCallback, stripeOrderFail, stripeOrderSuccess, stripePublicOrderSuccess, tabbyPaymentFailure, updateAddress, updateCart, updateDigitalProductDownloadLinkCount, updateOrder, updateOrderCustomization, updateUserDetails, uploadCustomizationImage, uploadReviewImages, verifyOTP, verifyTabbyPayment };
|
package/dist/api/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as axios from 'axios';
|
|
2
2
|
import { AxiosInstance, AxiosResponse } from 'axios';
|
|
3
3
|
import { A as Address } from '../address-DwBZHzbI.js';
|
|
4
|
-
import { U as User, C as Cart, d as CouponResponse, c as Coupon, b as Category } from '../cart-
|
|
5
|
-
import { d as Product, f as ProductDetail } from '../product-
|
|
6
|
-
import { O as Order } from '../orders-
|
|
7
|
-
import { B as BuyNow, P as PublicCheckout } from '../buy-now-
|
|
8
|
-
import { W as Wishlist } from '../wishlist-
|
|
9
|
-
import { C as CollectionResponse } from '../collections-
|
|
10
|
-
import { R as Review, A as Analytics, a as Booking, B as Blog, I as Instagram } from '../instagram-
|
|
4
|
+
import { U as User, C as Cart, d as CouponResponse, c as Coupon, b as Category } from '../cart-DZq1ZEnE.js';
|
|
5
|
+
import { d as Product, f as ProductDetail } from '../product-D9liEtl4.js';
|
|
6
|
+
import { O as Order } from '../orders-Bl-Slh72.js';
|
|
7
|
+
import { B as BuyNow, P as PublicCheckout } from '../buy-now-DFdnuLjO.js';
|
|
8
|
+
import { W as Wishlist } from '../wishlist-Cj0sQxiY.js';
|
|
9
|
+
import { C as CollectionResponse } from '../collections-CNh2OGbl.js';
|
|
10
|
+
import { R as Review, A as Analytics, a as Booking, B as Blog, I as Instagram } from '../instagram-BADLnNQ3.js';
|
|
11
11
|
import 'react-toastify';
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -55,6 +55,14 @@ declare function addToCart(product: Array<{
|
|
|
55
55
|
customer_input: string;
|
|
56
56
|
product_variant: number;
|
|
57
57
|
}>): Promise<AxiosResponse<Cart.Root>>;
|
|
58
|
+
declare function mergeCart(product: Array<{
|
|
59
|
+
variant_id: number;
|
|
60
|
+
quantity: number;
|
|
61
|
+
}>, customizationInputs?: Array<{
|
|
62
|
+
customization_option: number;
|
|
63
|
+
customer_input: string;
|
|
64
|
+
product_variant: number;
|
|
65
|
+
}>): Promise<AxiosResponse<Cart.Root>>;
|
|
58
66
|
declare function removeFromCart(product: Array<{
|
|
59
67
|
variant_id: number;
|
|
60
68
|
quantity: number;
|
|
@@ -289,4 +297,4 @@ declare function getMultipleBlogsBySlugs(slugs: string): Promise<AxiosResponse<{
|
|
|
289
297
|
*/
|
|
290
298
|
declare function getInstagramMedia(ids: string | (string | number)[]): Promise<AxiosResponse<Instagram.MediaRefreshResponse>>;
|
|
291
299
|
|
|
292
|
-
export { type BookingFilter, type OTPCredentials, type VerifyOTPCredentials, addAddress, addReview, addToCart, addWishlist, applyCoupon, buyNowPreview, checkPhonepePaymentStatus, checkPhonepePaymentStatusPublic, createBooking, deleteAddress, getAddresses, getAffiliateRedirect, getAppliedCoupon, getBlogPostBySlug, getBlogPostsList, getCart, getCartItemQuantity, getCategories, getCollection, getCountries, getCoupons, getDigitalProductDownloadLink, getFilters, getHttpService, getInstagramMedia, getLoginMethod, getMultipleBlogsBySlugs, getMultipleCollections, getNewToken, getOrderDetails, getOrderDetailsByNumber, getOrderDetailsByRef, getOrderDetailsByRefV2, getOrders, getProductCategories, getProductDetail, getProductDetailBySlug, getProductList, getProducts, getPublicOrderDetailsByNumber, getPublicOrderDetailsByRef, getReviewSummary, getReviews, getServerHttpService, getStripePaymentStatus, getStripePaymentStatusPublic, getSubdivisions, getUserBookings, getUserDetails, getWishlist, httpService, makeCODOrder, notifyProductStock, phonepeOrderSuccess, phonepePaymentFailure, phonepePublicOrderSuccess, placeBuyNowOrder, placeGuestBuyNowOrder, placeOrder, placePublicOrder, postAnalytics, publicCheckoutPreview, publicMakeCODOrder, publicPhonepeOrderFailure, publicPlaceOrder, publicRazorpayOrderFailure, publicStripeOrderFailure, razorpayOrderFail, razorpayOrderSuccess, razorpayPublicOrderSuccess, removeCoupon, removeFromCart, removeFromWishlist, resetHttpService, sendOTP, serverHttpService, setSessionExpiredCallback, stripeOrderFail, stripeOrderSuccess, stripePublicOrderSuccess, tabbyPaymentFailure, updateAddress, updateCart, updateDigitalProductDownloadLinkCount, updateOrder, updateOrderCustomization, updateUserDetails, uploadCustomizationImage, uploadReviewImages, verifyOTP, verifyTabbyPayment };
|
|
300
|
+
export { type BookingFilter, type OTPCredentials, type VerifyOTPCredentials, addAddress, addReview, addToCart, addWishlist, applyCoupon, buyNowPreview, checkPhonepePaymentStatus, checkPhonepePaymentStatusPublic, createBooking, deleteAddress, getAddresses, getAffiliateRedirect, getAppliedCoupon, getBlogPostBySlug, getBlogPostsList, getCart, getCartItemQuantity, getCategories, getCollection, getCountries, getCoupons, getDigitalProductDownloadLink, getFilters, getHttpService, getInstagramMedia, getLoginMethod, getMultipleBlogsBySlugs, getMultipleCollections, getNewToken, getOrderDetails, getOrderDetailsByNumber, getOrderDetailsByRef, getOrderDetailsByRefV2, getOrders, getProductCategories, getProductDetail, getProductDetailBySlug, getProductList, getProducts, getPublicOrderDetailsByNumber, getPublicOrderDetailsByRef, getReviewSummary, getReviews, getServerHttpService, getStripePaymentStatus, getStripePaymentStatusPublic, getSubdivisions, getUserBookings, getUserDetails, getWishlist, httpService, makeCODOrder, mergeCart, notifyProductStock, phonepeOrderSuccess, phonepePaymentFailure, phonepePublicOrderSuccess, placeBuyNowOrder, placeGuestBuyNowOrder, placeOrder, placePublicOrder, postAnalytics, publicCheckoutPreview, publicMakeCODOrder, publicPhonepeOrderFailure, publicPlaceOrder, publicRazorpayOrderFailure, publicStripeOrderFailure, razorpayOrderFail, razorpayOrderSuccess, razorpayPublicOrderSuccess, removeCoupon, removeFromCart, removeFromWishlist, resetHttpService, sendOTP, serverHttpService, setSessionExpiredCallback, stripeOrderFail, stripeOrderSuccess, stripePublicOrderSuccess, tabbyPaymentFailure, updateAddress, updateCart, updateDigitalProductDownloadLinkCount, updateOrder, updateOrderCustomization, updateUserDetails, uploadCustomizationImage, uploadReviewImages, verifyOTP, verifyTabbyPayment };
|
package/dist/api/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { getUserDetails, updateUserDetails } from '../chunk-WYXT5AAG.js';
|
|
2
|
-
export { addToCart, addWishlist, getCart, getCartItemQuantity, getCategories, getDigitalProductDownloadLink, getProductCategories, getProductDetail, getProductDetailBySlug, getProductList, getProducts, getWishlist, notifyProductStock, removeFromCart, removeFromWishlist, updateCart, updateDigitalProductDownloadLinkCount } from '../chunk-
|
|
2
|
+
export { addToCart, addWishlist, getCart, getCartItemQuantity, getCategories, getDigitalProductDownloadLink, getProductCategories, getProductDetail, getProductDetailBySlug, getProductList, getProducts, getWishlist, mergeCart, notifyProductStock, removeFromCart, removeFromWishlist, updateCart, updateDigitalProductDownloadLinkCount } from '../chunk-ZAWZ3RB6.js';
|
|
3
3
|
import '../chunk-TH7OAMGC.js';
|
|
4
4
|
export { applyCoupon, getAppliedCoupon, getCoupons, removeCoupon } from '../chunk-7M5CVYZJ.js';
|
|
5
5
|
export { buyNowPreview, checkPhonepePaymentStatus, checkPhonepePaymentStatusPublic, getOrderDetails, getOrderDetailsByNumber, getOrderDetailsByRef, getOrderDetailsByRefV2, getOrders, getPublicOrderDetailsByNumber, getPublicOrderDetailsByRef, getStripePaymentStatus, getStripePaymentStatusPublic, makeCODOrder, phonepeOrderSuccess, phonepePaymentFailure, phonepePublicOrderSuccess, placeBuyNowOrder, placeGuestBuyNowOrder, placeOrder, placePublicOrder, publicCheckoutPreview, publicMakeCODOrder, publicPhonepeOrderFailure, publicPlaceOrder, publicRazorpayOrderFailure, publicStripeOrderFailure, razorpayOrderFail, razorpayOrderSuccess, razorpayPublicOrderSuccess, stripeOrderFail, stripeOrderSuccess, stripePublicOrderSuccess, tabbyPaymentFailure, updateOrder, updateOrderCustomization, uploadCustomizationImage, verifyTabbyPayment } from '../chunk-KCLVR6G5.js';
|
package/dist/checkout/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk34Y7Y5FU_cjs = require('../chunk-34Y7Y5FU.cjs');
|
|
4
4
|
require('../chunk-XFOUNOKO.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunkNSAHGMS7_cjs = require('../chunk-NSAHGMS7.cjs');
|
|
6
6
|
var chunkH6FJYRO3_cjs = require('../chunk-H6FJYRO3.cjs');
|
|
7
7
|
var chunkTB72NPRM_cjs = require('../chunk-TB72NPRM.cjs');
|
|
8
8
|
require('../chunk-ECHV2JSY.cjs');
|
|
@@ -112,8 +112,8 @@ async function checkPhonepeReturnStatusWithOrder(transactionId, orderNumber, cal
|
|
|
112
112
|
const order = orderResponse.data;
|
|
113
113
|
callbacks.onOrderLoaded?.(order);
|
|
114
114
|
if (paymentResponse.data.success) {
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
chunkNSAHGMS7_cjs.pixelEvents.purchase(order);
|
|
116
|
+
chunkNSAHGMS7_cjs.pixelEvents.checkoutCompleted(order);
|
|
117
117
|
callbacks.onSuccess(order);
|
|
118
118
|
} else {
|
|
119
119
|
callbacks.onFailure();
|
|
@@ -133,8 +133,8 @@ async function checkStripeReturnStatus(sessionId, orderNumber, paymentLinkUrl, c
|
|
|
133
133
|
const orderResponse = await getOrder(orderNumber);
|
|
134
134
|
const order = orderResponse.data;
|
|
135
135
|
callbacks.onOrderLoaded?.(order);
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
chunkNSAHGMS7_cjs.pixelEvents.purchase(order);
|
|
137
|
+
chunkNSAHGMS7_cjs.pixelEvents.checkoutCompleted(order);
|
|
138
138
|
callbacks.onSuccess(order);
|
|
139
139
|
} catch {
|
|
140
140
|
callbacks.onSuccess(void 0);
|
|
@@ -157,8 +157,8 @@ async function checkTabbyReturnStatus(orderNumber, callbacks, options) {
|
|
|
157
157
|
if (order) callbacks.onOrderLoaded?.(order);
|
|
158
158
|
if (response.data.order_status === "paid" || response.data.order_status === "confirmed" || response.data.status === "paid") {
|
|
159
159
|
if (order) {
|
|
160
|
-
|
|
161
|
-
|
|
160
|
+
chunkNSAHGMS7_cjs.pixelEvents.purchase(order);
|
|
161
|
+
chunkNSAHGMS7_cjs.pixelEvents.checkoutCompleted(order);
|
|
162
162
|
}
|
|
163
163
|
callbacks.onSuccess(order ?? void 0);
|
|
164
164
|
} else {
|
|
@@ -171,55 +171,55 @@ async function checkTabbyReturnStatus(orderNumber, callbacks, options) {
|
|
|
171
171
|
|
|
172
172
|
Object.defineProperty(exports, "applyCheckoutCoupon", {
|
|
173
173
|
enumerable: true,
|
|
174
|
-
get: function () { return
|
|
174
|
+
get: function () { return chunk34Y7Y5FU_cjs.applyCheckoutCoupon; }
|
|
175
175
|
});
|
|
176
176
|
Object.defineProperty(exports, "fetchAppliedCoupon", {
|
|
177
177
|
enumerable: true,
|
|
178
|
-
get: function () { return
|
|
178
|
+
get: function () { return chunk34Y7Y5FU_cjs.fetchAppliedCoupon; }
|
|
179
179
|
});
|
|
180
180
|
Object.defineProperty(exports, "fetchAvailableCoupons", {
|
|
181
181
|
enumerable: true,
|
|
182
|
-
get: function () { return
|
|
182
|
+
get: function () { return chunk34Y7Y5FU_cjs.fetchAvailableCoupons; }
|
|
183
183
|
});
|
|
184
184
|
Object.defineProperty(exports, "handleCODPayment", {
|
|
185
185
|
enumerable: true,
|
|
186
|
-
get: function () { return
|
|
186
|
+
get: function () { return chunk34Y7Y5FU_cjs.handleCODPayment; }
|
|
187
187
|
});
|
|
188
188
|
Object.defineProperty(exports, "handlePhonepePayment", {
|
|
189
189
|
enumerable: true,
|
|
190
|
-
get: function () { return
|
|
190
|
+
get: function () { return chunk34Y7Y5FU_cjs.handlePhonepePayment; }
|
|
191
191
|
});
|
|
192
192
|
Object.defineProperty(exports, "handleRazorpayFail", {
|
|
193
193
|
enumerable: true,
|
|
194
|
-
get: function () { return
|
|
194
|
+
get: function () { return chunk34Y7Y5FU_cjs.handleRazorpayFail; }
|
|
195
195
|
});
|
|
196
196
|
Object.defineProperty(exports, "handleRazorpaySuccess", {
|
|
197
197
|
enumerable: true,
|
|
198
|
-
get: function () { return
|
|
198
|
+
get: function () { return chunk34Y7Y5FU_cjs.handleRazorpaySuccess; }
|
|
199
199
|
});
|
|
200
200
|
Object.defineProperty(exports, "handleStripePayment", {
|
|
201
201
|
enumerable: true,
|
|
202
|
-
get: function () { return
|
|
202
|
+
get: function () { return chunk34Y7Y5FU_cjs.handleStripePayment; }
|
|
203
203
|
});
|
|
204
204
|
Object.defineProperty(exports, "handleStripeSuccess", {
|
|
205
205
|
enumerable: true,
|
|
206
|
-
get: function () { return
|
|
206
|
+
get: function () { return chunk34Y7Y5FU_cjs.handleStripeSuccess; }
|
|
207
207
|
});
|
|
208
208
|
Object.defineProperty(exports, "handleTabbyPayment", {
|
|
209
209
|
enumerable: true,
|
|
210
|
-
get: function () { return
|
|
210
|
+
get: function () { return chunk34Y7Y5FU_cjs.handleTabbyPayment; }
|
|
211
211
|
});
|
|
212
212
|
Object.defineProperty(exports, "openRazorpayCheckout", {
|
|
213
213
|
enumerable: true,
|
|
214
|
-
get: function () { return
|
|
214
|
+
get: function () { return chunk34Y7Y5FU_cjs.openRazorpayCheckout; }
|
|
215
215
|
});
|
|
216
216
|
Object.defineProperty(exports, "processPayment", {
|
|
217
217
|
enumerable: true,
|
|
218
|
-
get: function () { return
|
|
218
|
+
get: function () { return chunk34Y7Y5FU_cjs.processPayment; }
|
|
219
219
|
});
|
|
220
220
|
Object.defineProperty(exports, "removeCheckoutCoupon", {
|
|
221
221
|
enumerable: true,
|
|
222
|
-
get: function () { return
|
|
222
|
+
get: function () { return chunk34Y7Y5FU_cjs.removeCheckoutCoupon; }
|
|
223
223
|
});
|
|
224
224
|
Object.defineProperty(exports, "IP_API_CACHE_KEY", {
|
|
225
225
|
enumerable: true,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Yup from 'yup';
|
|
2
|
-
import { C as Cart, c as Coupon } from '../cart-
|
|
3
|
-
import { O as Order } from '../orders-
|
|
4
|
-
import '../product-
|
|
2
|
+
import { C as Cart, c as Coupon } from '../cart-DwMFBmpC.cjs';
|
|
3
|
+
import { O as Order } from '../orders-B3G4CyhH.cjs';
|
|
4
|
+
import '../product-D9liEtl4.cjs';
|
|
5
5
|
import 'react-toastify';
|
|
6
6
|
|
|
7
7
|
/**
|
package/dist/checkout/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Yup from 'yup';
|
|
2
|
-
import { C as Cart, c as Coupon } from '../cart-
|
|
3
|
-
import { O as Order } from '../orders-
|
|
4
|
-
import '../product-
|
|
2
|
+
import { C as Cart, c as Coupon } from '../cart-DZq1ZEnE.js';
|
|
3
|
+
import { O as Order } from '../orders-Bl-Slh72.js';
|
|
4
|
+
import '../product-D9liEtl4.js';
|
|
5
5
|
import 'react-toastify';
|
|
6
6
|
|
|
7
7
|
/**
|
package/dist/checkout/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { applyCheckoutCoupon, fetchAppliedCoupon, fetchAvailableCoupons, handleCODPayment, handlePhonepePayment, handleRazorpayFail, handleRazorpaySuccess, handleStripePayment, handleStripeSuccess, handleTabbyPayment, openRazorpayCheckout, processPayment, removeCheckoutCoupon } from '../chunk-
|
|
1
|
+
export { applyCheckoutCoupon, fetchAppliedCoupon, fetchAvailableCoupons, handleCODPayment, handlePhonepePayment, handleRazorpayFail, handleRazorpaySuccess, handleStripePayment, handleStripeSuccess, handleTabbyPayment, openRazorpayCheckout, processPayment, removeCheckoutCoupon } from '../chunk-VPTN4YXD.js';
|
|
2
2
|
import '../chunk-7M5CVYZJ.js';
|
|
3
|
-
import { pixelEvents } from '../chunk-
|
|
3
|
+
import { pixelEvents } from '../chunk-VAU5OL72.js';
|
|
4
4
|
import { checkPhonepePaymentStatusPublic, checkPhonepePaymentStatus, getPublicOrderDetailsByNumber, getOrderDetailsByNumber, getStripePaymentStatusPublic, getStripePaymentStatus, verifyTabbyPayment } from '../chunk-KCLVR6G5.js';
|
|
5
5
|
export { IP_API_CACHE_KEY, addressFormInitialValues, addressValidationSchema, buildAddressPayload, buildSubmitPayload, clearAddressFormSession, decodeAddress, encodeAddress, isValidPhoneNumber, loadAddressFormFromSession, parseEditAddress, sanitizePhoneNumber, saveAddressFormToSession } from '../chunk-ELP23UGF.js';
|
|
6
6
|
import '../chunk-3SYYP3XV.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkXFOUNOKO_cjs = require('./chunk-XFOUNOKO.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkNSAHGMS7_cjs = require('./chunk-NSAHGMS7.cjs');
|
|
5
5
|
var chunkH6FJYRO3_cjs = require('./chunk-H6FJYRO3.cjs');
|
|
6
6
|
var chunkN3CTXRFT_cjs = require('./chunk-N3CTXRFT.cjs');
|
|
7
7
|
var axios = require('axios');
|
|
@@ -9,7 +9,7 @@ var axios = require('axios');
|
|
|
9
9
|
// src/checkout/payment.ts
|
|
10
10
|
function openRazorpayCheckout(order, callbacks, paymentOptions) {
|
|
11
11
|
if (!order) return;
|
|
12
|
-
|
|
12
|
+
chunkNSAHGMS7_cjs.pixelEvents.initiateCheckout(order, "razorpay");
|
|
13
13
|
const {
|
|
14
14
|
razorpay_order_id,
|
|
15
15
|
razorpay_public_token,
|
|
@@ -82,8 +82,8 @@ async function handleRazorpaySuccess(data, order, callbacks, options) {
|
|
|
82
82
|
} else {
|
|
83
83
|
await chunkH6FJYRO3_cjs.razorpayOrderSuccess(data);
|
|
84
84
|
}
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
chunkNSAHGMS7_cjs.pixelEvents.purchase(order);
|
|
86
|
+
chunkNSAHGMS7_cjs.pixelEvents.checkoutCompleted(order);
|
|
87
87
|
callbacks.onCartReset();
|
|
88
88
|
callbacks.onSuccess(order);
|
|
89
89
|
} catch {
|
|
@@ -106,7 +106,7 @@ async function handleRazorpayFail(order, callbacks, error, options) {
|
|
|
106
106
|
}
|
|
107
107
|
function handlePhonepePayment(order, callbacks) {
|
|
108
108
|
if (!order) return;
|
|
109
|
-
|
|
109
|
+
chunkNSAHGMS7_cjs.pixelEvents.initiateCheckout(order, "phonepe");
|
|
110
110
|
if (!order.phonepe_redirect_url) {
|
|
111
111
|
callbacks.onFailure(order);
|
|
112
112
|
return;
|
|
@@ -115,7 +115,7 @@ function handlePhonepePayment(order, callbacks) {
|
|
|
115
115
|
}
|
|
116
116
|
function handleTabbyPayment(order, callbacks) {
|
|
117
117
|
if (!order) return;
|
|
118
|
-
|
|
118
|
+
chunkNSAHGMS7_cjs.pixelEvents.initiateCheckout(order, "tabby");
|
|
119
119
|
if (!order.tabby_redirect_url) {
|
|
120
120
|
callbacks.onFailure(order);
|
|
121
121
|
return;
|
|
@@ -126,7 +126,7 @@ async function handleCODPayment(order, callbacks, options) {
|
|
|
126
126
|
if (!order) return;
|
|
127
127
|
try {
|
|
128
128
|
callbacks.onPaymentStart?.();
|
|
129
|
-
|
|
129
|
+
chunkNSAHGMS7_cjs.pixelEvents.initiateCheckout(order, "cod");
|
|
130
130
|
if (options?.isPublic) {
|
|
131
131
|
await chunkH6FJYRO3_cjs.publicMakeCODOrder(order.order_number, {
|
|
132
132
|
customer_phone: order.customer_phone,
|
|
@@ -135,8 +135,8 @@ async function handleCODPayment(order, callbacks, options) {
|
|
|
135
135
|
} else {
|
|
136
136
|
await chunkH6FJYRO3_cjs.makeCODOrder(order.id);
|
|
137
137
|
}
|
|
138
|
-
|
|
139
|
-
|
|
138
|
+
chunkNSAHGMS7_cjs.pixelEvents.purchase(order);
|
|
139
|
+
chunkNSAHGMS7_cjs.pixelEvents.checkoutCompleted(order);
|
|
140
140
|
callbacks.onCartReset();
|
|
141
141
|
callbacks.onSuccess(order);
|
|
142
142
|
} catch {
|
|
@@ -147,7 +147,7 @@ async function handleCODPayment(order, callbacks, options) {
|
|
|
147
147
|
}
|
|
148
148
|
function handleStripePayment(order, callbacks) {
|
|
149
149
|
if (!order) return;
|
|
150
|
-
|
|
150
|
+
chunkNSAHGMS7_cjs.pixelEvents.initiateCheckout(order, "stripe");
|
|
151
151
|
if (order.stripe_payment_link_url) {
|
|
152
152
|
callbacks.onRedirect(order.stripe_payment_link_url);
|
|
153
153
|
return;
|
|
@@ -170,8 +170,8 @@ async function handleStripeSuccess(order, paymentIntentId, callbacks, options) {
|
|
|
170
170
|
} else {
|
|
171
171
|
await chunkH6FJYRO3_cjs.stripeOrderSuccess(stripeSuccessPayload);
|
|
172
172
|
}
|
|
173
|
-
|
|
174
|
-
|
|
173
|
+
chunkNSAHGMS7_cjs.pixelEvents.purchase(order);
|
|
174
|
+
chunkNSAHGMS7_cjs.pixelEvents.checkoutCompleted(order);
|
|
175
175
|
callbacks.onCartReset();
|
|
176
176
|
callbacks.onSuccess(order);
|
|
177
177
|
} catch {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkNRPK5GCJ_cjs = require('./chunk-NRPK5GCJ.cjs');
|
|
4
4
|
var chunkNQZ5GUOG_cjs = require('./chunk-NQZ5GUOG.cjs');
|
|
5
5
|
var chunkH6FJYRO3_cjs = require('./chunk-H6FJYRO3.cjs');
|
|
6
6
|
var chunkBBRXE57K_cjs = require('./chunk-BBRXE57K.cjs');
|
|
@@ -23,7 +23,7 @@ var useCartStore = zustand.create((set) => ({
|
|
|
23
23
|
}),
|
|
24
24
|
fetchCartItemQuantity: async () => {
|
|
25
25
|
try {
|
|
26
|
-
const { total_quantity } = await
|
|
26
|
+
const { total_quantity } = await chunkNRPK5GCJ_cjs.getCartItemQuantity();
|
|
27
27
|
set({ total_quantity });
|
|
28
28
|
} catch (error) {
|
|
29
29
|
console.error("Failed to fetch cart item quantity", error);
|
|
@@ -32,7 +32,7 @@ var useCartStore = zustand.create((set) => ({
|
|
|
32
32
|
syncCart: async (addressId, shippingOptionId) => {
|
|
33
33
|
set({ status: "loading" /* LOADING */ });
|
|
34
34
|
try {
|
|
35
|
-
const response = await
|
|
35
|
+
const response = await chunkNRPK5GCJ_cjs.getCart("/customer/cart/", addressId, shippingOptionId);
|
|
36
36
|
if (response) {
|
|
37
37
|
set({ cart: response, total_quantity: response.total_quantity, status: "idle" /* IDLE */ });
|
|
38
38
|
}
|
|
@@ -43,7 +43,7 @@ var useCartStore = zustand.create((set) => ({
|
|
|
43
43
|
fetchCart: async (addressId, shippingOptionId) => {
|
|
44
44
|
set({ status: "loading" /* LOADING */ });
|
|
45
45
|
try {
|
|
46
|
-
const response = await
|
|
46
|
+
const response = await chunkNRPK5GCJ_cjs.getCart("/customer/cart/", addressId, shippingOptionId);
|
|
47
47
|
if (response) {
|
|
48
48
|
set({ cart: response, total_quantity: response.total_quantity, status: "idle" /* IDLE */ });
|
|
49
49
|
}
|
|
@@ -55,7 +55,7 @@ var useCartStore = zustand.create((set) => ({
|
|
|
55
55
|
set({ status: "loading" /* LOADING */ });
|
|
56
56
|
try {
|
|
57
57
|
if (chunkBBRXE57K_cjs.auth_default.getUserDetails()) {
|
|
58
|
-
await
|
|
58
|
+
await chunkNRPK5GCJ_cjs.addToCart(items, customizationInputs);
|
|
59
59
|
await useCartStore.getState().syncCart(addressId);
|
|
60
60
|
} else {
|
|
61
61
|
const cart = chunkNQZ5GUOG_cjs.cart_default.get();
|
|
@@ -78,7 +78,7 @@ var useCartStore = zustand.create((set) => ({
|
|
|
78
78
|
set({ status: "loading" /* LOADING */ });
|
|
79
79
|
try {
|
|
80
80
|
if (chunkBBRXE57K_cjs.auth_default.getUserDetails()) {
|
|
81
|
-
await
|
|
81
|
+
await chunkNRPK5GCJ_cjs.removeFromCart(items);
|
|
82
82
|
await useCartStore.getState().syncCart(addressId);
|
|
83
83
|
} else {
|
|
84
84
|
const cart = chunkNQZ5GUOG_cjs.cart_default.get();
|
|
@@ -109,7 +109,7 @@ var useCartStore = zustand.create((set) => ({
|
|
|
109
109
|
set({ status: "loading" /* LOADING */ });
|
|
110
110
|
try {
|
|
111
111
|
if (chunkBBRXE57K_cjs.auth_default.getUserDetails()) {
|
|
112
|
-
await
|
|
112
|
+
await chunkNRPK5GCJ_cjs.updateCart(items);
|
|
113
113
|
await useCartStore.getState().syncCart(addressId);
|
|
114
114
|
} else {
|
|
115
115
|
const cart = chunkNQZ5GUOG_cjs.cart_default.get();
|
|
@@ -171,14 +171,7 @@ var useAuthStore = zustand.create((set, get) => ({
|
|
|
171
171
|
set({ user, status: "success" /* SUCCESS */, isAuthenticated: true });
|
|
172
172
|
const localCartItems = chunkNQZ5GUOG_cjs.cart_default.get();
|
|
173
173
|
if (localCartItems) {
|
|
174
|
-
await
|
|
175
|
-
Object.entries(localCartItems.products_quantity).map(
|
|
176
|
-
([key, value]) => ({
|
|
177
|
-
variant_id: parseInt(key),
|
|
178
|
-
quantity: value
|
|
179
|
-
})
|
|
180
|
-
)
|
|
181
|
-
);
|
|
174
|
+
await mergeLocalCart(localCartItems);
|
|
182
175
|
chunkNQZ5GUOG_cjs.cart_default.clear();
|
|
183
176
|
await useCartStore.getState().fetchCart();
|
|
184
177
|
setTimeout(() => {
|
|
@@ -210,6 +203,16 @@ var useAuthStore = zustand.create((set, get) => ({
|
|
|
210
203
|
}, 1e3);
|
|
211
204
|
}
|
|
212
205
|
}));
|
|
206
|
+
async function mergeLocalCart(localCart) {
|
|
207
|
+
const cartItems = Object.entries(localCart.products_quantity || {}).map(([key, value]) => ({
|
|
208
|
+
variant_id: parseInt(key),
|
|
209
|
+
quantity: value
|
|
210
|
+
})).filter(
|
|
211
|
+
(item) => !Number.isNaN(item.variant_id) && Number.isInteger(item.quantity) && item.quantity >= 1
|
|
212
|
+
);
|
|
213
|
+
if (cartItems.length === 0) return;
|
|
214
|
+
await chunkNRPK5GCJ_cjs.mergeCart(cartItems, localCart.customization_inputs);
|
|
215
|
+
}
|
|
213
216
|
var loginUser = async (user) => {
|
|
214
217
|
const { access, refresh, ...userData } = user;
|
|
215
218
|
localStorage.setItem(chunkNE3ZHELZ_cjs.USER_CREDENTIALS, JSON.stringify(userData));
|
|
@@ -38,6 +38,13 @@ async function addToCart(product, customizationInputs) {
|
|
|
38
38
|
customization_inputs: customizationInputs
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
+
async function mergeCart(product, customizationInputs) {
|
|
42
|
+
return chunkECHV2JSY_cjs.http_service_default.post("/customer/cart/", {
|
|
43
|
+
action: "merge",
|
|
44
|
+
cart_items: product,
|
|
45
|
+
customization_inputs: customizationInputs
|
|
46
|
+
});
|
|
47
|
+
}
|
|
41
48
|
async function removeFromCart(product) {
|
|
42
49
|
return chunkECHV2JSY_cjs.http_service_default.post("/customer/cart/", {
|
|
43
50
|
action: "remove",
|
|
@@ -134,6 +141,7 @@ exports.getProductDetailBySlug = getProductDetailBySlug;
|
|
|
134
141
|
exports.getProductList = getProductList;
|
|
135
142
|
exports.getProducts = getProducts;
|
|
136
143
|
exports.getWishlist = getWishlist;
|
|
144
|
+
exports.mergeCart = mergeCart;
|
|
137
145
|
exports.notifyProductStock = notifyProductStock;
|
|
138
146
|
exports.removeFromCart = removeFromCart;
|
|
139
147
|
exports.removeFromWishlist = removeFromWishlist;
|
|
@@ -31,6 +31,7 @@ var pixelEvents = {
|
|
|
31
31
|
content_slug: product.slug,
|
|
32
32
|
content_name: product.name,
|
|
33
33
|
content_type: "product",
|
|
34
|
+
currency: window.currency_code || "INR",
|
|
34
35
|
price: Number(product.selling_price) * quantity,
|
|
35
36
|
num_items: quantity,
|
|
36
37
|
attributes: product.attributes
|
|
@@ -46,6 +47,7 @@ var pixelEvents = {
|
|
|
46
47
|
content_slug: product.slug,
|
|
47
48
|
content_name: product.name,
|
|
48
49
|
content_type: "product",
|
|
50
|
+
currency: window.currency_code || "INR",
|
|
49
51
|
price: Number(product.selling_price),
|
|
50
52
|
attributes: product.attributes
|
|
51
53
|
});
|
|
@@ -63,6 +65,7 @@ var pixelEvents = {
|
|
|
63
65
|
content_slug: product.slug,
|
|
64
66
|
content_name: product.name,
|
|
65
67
|
content_type: "product",
|
|
68
|
+
currency: window.currency_code || "INR",
|
|
66
69
|
price: Number(product.selling_price),
|
|
67
70
|
attributes: product.attributes
|
|
68
71
|
});
|
|
@@ -144,6 +147,7 @@ var pixelEvents = {
|
|
|
144
147
|
try {
|
|
145
148
|
window.fbq("track", "cart_viewed", {
|
|
146
149
|
content_type: "cart",
|
|
150
|
+
currency: window.currency_code || "INR",
|
|
147
151
|
value: cart.total_amount,
|
|
148
152
|
number_of_products: cart.total_quantity
|
|
149
153
|
});
|
|
@@ -161,7 +165,7 @@ var pixelEvents = {
|
|
|
161
165
|
content_ids: [orderSummary.order_number],
|
|
162
166
|
order_number: orderSummary.order_number,
|
|
163
167
|
content_type: "product",
|
|
164
|
-
currency: "INR",
|
|
168
|
+
currency: window.currency_code || "INR",
|
|
165
169
|
value: orderSummary.total_amount,
|
|
166
170
|
num_items: orderSummary.purchased_products.length,
|
|
167
171
|
contents: orderSummary.purchased_products.map((item) => ({
|
|
@@ -192,6 +196,7 @@ var pixelEvents = {
|
|
|
192
196
|
if (!window.fbq) return;
|
|
193
197
|
try {
|
|
194
198
|
window.fbq("track", "checkout_started", {
|
|
199
|
+
currency: window.currency_code || "INR",
|
|
195
200
|
value: cart.total_amount,
|
|
196
201
|
number_of_products: cart.total_quantity
|
|
197
202
|
});
|