diff --git a/src/components/NFTBook/CrossSellDialog.vue b/src/components/NFTBook/CrossSellDialog.vue index 139bc2d53..df24a033a 100644 --- a/src/components/NFTBook/CrossSellDialog.vue +++ b/src/components/NFTBook/CrossSellDialog.vue @@ -236,7 +236,8 @@ export default { }); } else { // NOTE: Only support single edition for now - const edition = this.getEditionByIndex(0); + const priceIndex = 0; + const edition = this.getEditionByIndex(priceIndex); const hasStock = edition?.stock; if (!hasStock || !this.nftIsCollectable || edition.price === 0) { this.handleReject(); @@ -250,6 +251,7 @@ export default { name: this.NFTName, price: edition.price, classId: this.classId, + priceIndex, quantity: 1, }, ], diff --git a/src/constant/index.js b/src/constant/index.js index 9f7a6da0e..5237fbfb2 100644 --- a/src/constant/index.js +++ b/src/constant/index.js @@ -350,6 +350,10 @@ export const NFT_BOOK_WITH_SIGN_IMAGE_SET = new Map( 'likenft1nekez4y50uk0dmgxuxql7v2vnhy3wqa24ld46hk4frlwcvwpr88selunrr', ['陳健民'], ], + [ + 'likenft1gp28fe9uzqdadrps67hz20035m0hh9zu9m8kzvz6gdawvms5xtts5m6qds', + ['賴佩霞'], + ], ] : [ ['likenft154xhw0qyds5pgvsyc7379lnkyvwqkvv2zvmmh2gn5qrewljeqwys2sju6x'], diff --git a/src/mixins/nft.js b/src/mixins/nft.js index 1676b52ef..141f4cfc3 100644 --- a/src/mixins/nft.js +++ b/src/mixins/nft.js @@ -997,6 +997,7 @@ export default { items: [ { classId: this.classId, + priceIndex: this.editionPriceIndex, price: this.NFTPriceUSD, name: this.NFTName, }, @@ -1131,6 +1132,7 @@ export default { { name: this.NFTName, price: this.NFTPriceUSD, + priceIndex: this.editionPriceIndex, classId, }, ], diff --git a/src/pages/nft/claim/index.vue b/src/pages/nft/claim/index.vue index 733acc1cd..e4e749dbc 100644 --- a/src/pages/nft/claim/index.vue +++ b/src/pages/nft/claim/index.vue @@ -798,6 +798,7 @@ export default { return; } let price; + let priceIndex; if (this.cartId) { const { data } = await this.$api.get( getNFTBookCartStatusEndpoint({ @@ -805,7 +806,7 @@ export default { token: this.token, }) ); - ({ price } = data); + ({ price, priceIndex } = data); const { classIdsWithPrice = [], collectionIdsWithPrice = [], @@ -908,7 +909,13 @@ export default { if (!free && !this.giftInfo && redirect && query.type === 'nft_book') { const items = this.cartItems.length ? this.cartItems.map(item => { - const { classId, collectionId, price, quantity = 1 } = item; + const { + classId, + collectionId, + price, + priceIndex, + quantity = 1, + } = item; const name = classId ? this.getNFTClassMetadataById(classId)?.name : this.getNFTCollectionInfoByCollectionId(collectionId)?.name[ @@ -918,6 +925,7 @@ export default { name, classId, collectionId, + priceIndex, price, quantity, }; @@ -927,6 +935,7 @@ export default { name: this.productName, classId: this.classId, collectionId: this.collectionId, + priceIndex, price, quantity: this.quantity, }, diff --git a/src/pages/nft/class/_classId/_nftId.vue b/src/pages/nft/class/_classId/_nftId.vue index 1354401b3..7a2d60dcc 100644 --- a/src/pages/nft/class/_classId/_nftId.vue +++ b/src/pages/nft/class/_classId/_nftId.vue @@ -640,6 +640,7 @@ export default { { name: this.NFTName, price: this.NFTPriceUSD, + priceIndex: this.editionPriceIndex, classId: this.classId, }, ], diff --git a/src/pages/nft/class/_classId/index.vue b/src/pages/nft/class/_classId/index.vue index 5c3464664..d186b84e9 100644 --- a/src/pages/nft/class/_classId/index.vue +++ b/src/pages/nft/class/_classId/index.vue @@ -634,7 +634,7 @@ export default { inLanguage: this.iscnData?.contentMetadata?.inLanguage, bookFormat: 'https://schema.org/EBook', bookEdition: e.name, - description: `${e.description}${'\n'}${description}`, + description: `${e.description}\n${description}`, brand: { '@context': 'http://www.schema.org', '@type': 'Brand', @@ -891,6 +891,7 @@ export default { { name: this.NFTName, classId: this.classId, + priceIndex: this.editionPriceIndex, price: this.NFTPriceUSD, }, ], @@ -940,6 +941,7 @@ export default { name: this.NFTName, price: customPriceInDecimal || edition.price, classId: this.classId, + priceIndex: edition.index, quantity: this.quantity, }, ], @@ -1357,6 +1359,18 @@ export default { this.classId, 1 ); + logPurchaseFlowEvent(this, 'view_item', { + items: [ + { + name: this.NFTName, + classId: this.classId, + priceIndex: this.editionPriceIndex, + price: this.NFTPriceUSD, + }, + ], + price: this.NFTPriceUSD, + currency: 'USD', + }); }, handleInputCustomPrice(price) { this.customPrice = Number(price); diff --git a/src/pages/nft/fiat/stripe.vue b/src/pages/nft/fiat/stripe.vue index f1f865e5f..4f3e62e06 100644 --- a/src/pages/nft/fiat/stripe.vue +++ b/src/pages/nft/fiat/stripe.vue @@ -130,6 +130,7 @@ export default { name: this.NFTName, price: this.result.fiatPrice, classId: this.classId, + priceIndex: this.editionPriceIndex, }, ], price: this.result.fiatPrice, diff --git a/src/pages/nft/gift/index.vue b/src/pages/nft/gift/index.vue index a5fdba165..61de86337 100644 --- a/src/pages/nft/gift/index.vue +++ b/src/pages/nft/gift/index.vue @@ -117,6 +117,7 @@ export default { return; } let price; + let priceIndex; if (this.cartId) { const { data } = await this.$api.get( @@ -147,7 +148,7 @@ export default { paymentId: this.paymentId, }) ); - ({ price } = data); + ({ price, priceIndex } = data); } try { if (this.cartItems.length) { @@ -212,6 +213,7 @@ export default { name: this.productName, classId: this.classId, collectionId: this.collectionId, + priceIndex, price, quantity: this.quantity, },