@anker-in/shopify-react 1.2.2-beta.7 → 1.2.2-beta.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/hooks/index.d.mts +2 -2
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +2 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +2 -1
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/dist/provider/index.d.mts +1 -1
- package/dist/provider/index.d.ts +1 -1
- package/dist/provider/index.js.map +1 -1
- package/dist/provider/index.mjs.map +1 -1
- package/dist/{types-Bzg8_e4k.d.mts → types-DfR13pDe.d.mts} +2 -1
- package/dist/{types-Bzg8_e4k.d.ts → types-DfR13pDe.d.ts} +2 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -861,7 +861,7 @@ var trackAddToCartGA = ({
|
|
|
861
861
|
return;
|
|
862
862
|
}
|
|
863
863
|
const currencyCode = lineItems[0].product?.price?.currencyCode;
|
|
864
|
-
const totalPrice = lineItems.reduce((prev, item) => prev.plus(item.totalAmount || 0), new Decimal3(0)).toNumber();
|
|
864
|
+
const totalPrice = lineItems.reduce((prev, item) => prev.plus(item.finalPrice?.amount || item.totalAmount || 0), new Decimal3(0)).toNumber();
|
|
865
865
|
gaTrack({
|
|
866
866
|
event: "ga4Event",
|
|
867
867
|
event_name: "add_to_cart",
|
|
@@ -2547,6 +2547,7 @@ function useAddToCart({ withTrack = true } = {}, swrOptions) {
|
|
|
2547
2547
|
}
|
|
2548
2548
|
return {
|
|
2549
2549
|
...cartLine,
|
|
2550
|
+
finalPrice: inputLine.variant?.finalPrice,
|
|
2550
2551
|
quantity: inputLine.quantity,
|
|
2551
2552
|
gtmParams: inputLine.gtmParams
|
|
2552
2553
|
};
|