diff options
| author | trisusilo <tri.susilo@altama.co.id> | 2024-12-31 09:01:02 +0000 |
|---|---|---|
| committer | trisusilo <tri.susilo@altama.co.id> | 2024-12-31 09:01:02 +0000 |
| commit | f66b00a36b39a1efd506fc7d96a240c10e77ec62 (patch) | |
| tree | f640f608d2fe9da2b61d5fb31af52a16dde66240 /src/pages | |
| parent | d76f96c44f85e7e0efbd544e6b97bd80920b0039 (diff) | |
| parent | d20adeb6a5f6e153e2d1cfc8c8c77f4cceb743e8 (diff) | |
Merged in CR/PPn12% (pull request #400)
CR/PPn12%
Diffstat (limited to 'src/pages')
| -rw-r--r-- | src/pages/api/shop/midtrans-payment.js | 1 | ||||
| -rw-r--r-- | src/pages/google_merchant/products/[page].js | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/pages/api/shop/midtrans-payment.js b/src/pages/api/shop/midtrans-payment.js index 12aaa51f..f90e9e81 100644 --- a/src/pages/api/shop/midtrans-payment.js +++ b/src/pages/api/shop/midtrans-payment.js @@ -3,6 +3,7 @@ import camelcaseObjectDeep from 'camelcase-object-deep' import midtransClient from 'midtrans-client' export default async function handler(req, res) { + const PPN = process.env.NEXT_PUBLIC_PPN const { transactionId = null } = req.query if (!transactionId) { diff --git a/src/pages/google_merchant/products/[page].js b/src/pages/google_merchant/products/[page].js index 0c2cf3c5..8395f839 100644 --- a/src/pages/google_merchant/products/[page].js +++ b/src/pages/google_merchant/products/[page].js @@ -6,6 +6,7 @@ import _ from 'lodash-contrib'; import { create } from 'xmlbuilder'; export async function getServerSideProps({ res, query }) { + const PPN = process.env.NEXT_PUBLIC_PPN const titleContent = 'Indoteknik.com: B2B Industrial Supply & Solution'; const descriptionContent = 'Temukan pilihan produk B2B Industri & Alat Teknik untuk Perusahaan, UMKM & Pemerintah dengan lengkap, mudah dan transparan.'; @@ -77,7 +78,7 @@ export async function getServerSideProps({ res, query }) { 'g:availability': { '#text': availability }, 'g:brand': { '#text': product.manufacture?.name || '' }, 'g:price': { - '#text': `${Math.round(product.lowestPrice.price * 1.11)} IDR`, + '#text': `${Math.round(product.lowestPrice.price * PPN)} IDR`, }, }; @@ -93,7 +94,7 @@ export async function getServerSideProps({ res, query }) { if (product.lowestPrice.discountPercentage > 0) { item['g:sale_price'] = { - '#text': `${Math.round(product.lowestPrice.priceDiscount * 1.11)} IDR`, + '#text': `${Math.round(product.lowestPrice.priceDiscount * PPN)} IDR`, }; } productItems.push(item); |
