summaryrefslogtreecommitdiff
path: root/src/lib/checkout/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/checkout/components')
-rw-r--r--src/lib/checkout/components/Checkout.jsx18
-rw-r--r--src/lib/checkout/components/FinishCheckout.jsx2
2 files changed, 14 insertions, 6 deletions
diff --git a/src/lib/checkout/components/Checkout.jsx b/src/lib/checkout/components/Checkout.jsx
index 111117c9..f777a3a8 100644
--- a/src/lib/checkout/components/Checkout.jsx
+++ b/src/lib/checkout/components/Checkout.jsx
@@ -20,6 +20,8 @@ import Image from '@/core/components/elements/Image/Image'
import MobileView from '@/core/components/views/MobileView'
import DesktopView from '@/core/components/views/DesktopView'
import ExpedisiList from '../api/ExpedisiList'
+import whatsappUrl from '@/core/utils/whatsappUrl'
+import { createSlug } from '@/core/utils/slug'
const Checkout = () => {
const router = useRouter()
@@ -166,8 +168,8 @@ const Checkout = () => {
quantity: product.quantity
}))
let data = {
- partner_shipping_id: selectedAddress.shipping.id,
- partner_invoice_id: selectedAddress.invoicing.id,
+ partner_shipping_id: auth.partnerId,
+ partner_invoice_id: auth.partnerId,
order_line: JSON.stringify(productOrder),
delivery_amount : biayaKirim,
type: 'sale_order'
@@ -342,7 +344,7 @@ const Checkout = () => {
<div className='px-4 mb-4'>
<span className='text-danger-500'>
*) Terdapat produk yang belum memiliki harga,{' '}
- <a href='https://wa.me/628128080622' className='underline'>
+ <a href={whatsappUrl()} className='underline'>
Hubungi Kami untuk meminta harga.
</a>
</span>
@@ -465,7 +467,13 @@ const Checkout = () => {
{product.price.priceDiscount > 0 ? (
currencyFormat(product?.price?.priceDiscount * product?.quantity)
) : (
- <a href='https://wa.me/628128080622' className='underline'>
+ <a
+ href={whatsappUrl('product', {
+ name: product.name,
+ url: createSlug('/shop/product/', product.name, product.id, true)
+ })}
+ className='underline'
+ >
Call For Price{' '}
</a>
)}
@@ -562,7 +570,7 @@ const Checkout = () => {
<div className='mt-4'>
<span className='text-danger-500'>
*) Terdapat produk yang belum memiliki harga,{' '}
- <a href='https://wa.me/628128080622' className='underline'>
+ <a href={whatsappUrl()} className='underline'>
Hubungi Kami untuk meminta harga.
</a>
</span>
diff --git a/src/lib/checkout/components/FinishCheckout.jsx b/src/lib/checkout/components/FinishCheckout.jsx
index cd93e3a4..92245e31 100644
--- a/src/lib/checkout/components/FinishCheckout.jsx
+++ b/src/lib/checkout/components/FinishCheckout.jsx
@@ -14,7 +14,7 @@ const FinishCheckout = ({ query }) => {
<p className='text-caption-2 text-warning-800'>No. Transaksi</p>
</div>
<Link
- href='/my/transactions'
+ href='/my/quotations'
className='bg-warning-400 text-warning-900 rounded-b-xl py-4 block'
>
Lihat detail pembelian Anda disini