diff options
Diffstat (limited to 'src/lib/variant/components')
| -rw-r--r-- | src/lib/variant/components/VariantCard.jsx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/variant/components/VariantCard.jsx b/src/lib/variant/components/VariantCard.jsx index 28f3e193..0f9f02f6 100644 --- a/src/lib/variant/components/VariantCard.jsx +++ b/src/lib/variant/components/VariantCard.jsx @@ -6,6 +6,7 @@ import Link from '@/core/components/elements/Link/Link' import { createSlug } from '@/core/utils/slug' import currencyFormat from '@/core/utils/currencyFormat' import { updateItemCart } from '@/core/utils/cart' +import whatsappUrl from '@/core/utils/whatsappUrl' const VariantCard = ({ product, openOnClick = true, buyMore = false }) => { const router = useRouter() @@ -60,7 +61,13 @@ const VariantCard = ({ product, openOnClick = true, buyMore = false }) => { {product.price.priceDiscount > 0 ? ( currencyFormat(product.quantity * product.price.priceDiscount) ) : ( - <a href='https://wa.me/628128080622' className='underline text-danger-500'> + <a + href={whatsappUrl('product', { + name: product.name, + url: createSlug('/shop/product/', product.name, product.id, true) + })} + className='underline text-danger-500' + > Call For Price{' '} </a> )} |
