@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/hooks/index.mjs
CHANGED
|
@@ -772,7 +772,7 @@ var trackAddToCartGA = ({
|
|
|
772
772
|
return;
|
|
773
773
|
}
|
|
774
774
|
const currencyCode = lineItems[0].product?.price?.currencyCode;
|
|
775
|
-
const totalPrice = lineItems.reduce((prev, item) => prev.plus(item.totalAmount || 0), new Decimal3(0)).toNumber();
|
|
775
|
+
const totalPrice = lineItems.reduce((prev, item) => prev.plus(item.finalPrice?.amount || item.totalAmount || 0), new Decimal3(0)).toNumber();
|
|
776
776
|
gaTrack({
|
|
777
777
|
event: "ga4Event",
|
|
778
778
|
event_name: "add_to_cart",
|
|
@@ -2377,6 +2377,7 @@ function useAddToCart({ withTrack = true } = {}, swrOptions) {
|
|
|
2377
2377
|
}
|
|
2378
2378
|
return {
|
|
2379
2379
|
...cartLine,
|
|
2380
|
+
finalPrice: inputLine.variant?.finalPrice,
|
|
2380
2381
|
quantity: inputLine.quantity,
|
|
2381
2382
|
gtmParams: inputLine.gtmParams
|
|
2382
2383
|
};
|