mirror of
https://github.com/vercel/commerce.git
synced 2025-05-12 12:47:50 +00:00
Merge pull request #10 from Car-Part-Planet/feat/shipping-policy
feat: add shipping policy details
This commit is contained in:
commit
03214d8b23
@ -1,6 +1,6 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { TruckIcon } from '@heroicons/react/24/outline';
|
import { InformationCircleIcon, TruckIcon } from '@heroicons/react/24/outline';
|
||||||
import Price from 'components/price';
|
import Price from 'components/price';
|
||||||
import SideDialog from 'components/side-dialog';
|
import SideDialog from 'components/side-dialog';
|
||||||
import { DELIVERY_OPTION_KEY } from 'lib/constants';
|
import { DELIVERY_OPTION_KEY } from 'lib/constants';
|
||||||
@ -9,6 +9,12 @@ import { usePathname, useRouter, useSearchParams } from 'next/navigation';
|
|||||||
import { ReactNode, useState } from 'react';
|
import { ReactNode, useState } from 'react';
|
||||||
|
|
||||||
const options = ['Commercial', 'Residential'] as const;
|
const options = ['Commercial', 'Residential'] as const;
|
||||||
|
const { STORE_PREFIX, SITE_NAME } = process.env;
|
||||||
|
|
||||||
|
// Conditional price values based on STORE_PREFIX
|
||||||
|
const commercialPrice = STORE_PREFIX === 'reman-transmission' ? 299 : 0;
|
||||||
|
const residentialPrice = STORE_PREFIX === 'reman-transmission' ? 398 : 99;
|
||||||
|
|
||||||
type Option = (typeof options)[number];
|
type Option = (typeof options)[number];
|
||||||
|
|
||||||
export const deliveryOptions: Array<{
|
export const deliveryOptions: Array<{
|
||||||
@ -18,12 +24,12 @@ export const deliveryOptions: Array<{
|
|||||||
}> = [
|
}> = [
|
||||||
{
|
{
|
||||||
template: <span className="font-bold">Commercial</span>,
|
template: <span className="font-bold">Commercial</span>,
|
||||||
price: 299,
|
price: commercialPrice,
|
||||||
key: 'Commercial'
|
key: 'Commercial'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
template: <span className="font-bold">Residential</span>,
|
template: <span className="font-bold">Residential</span>,
|
||||||
price: 398,
|
price: residentialPrice,
|
||||||
key: 'Residential'
|
key: 'Residential'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@ -63,29 +69,118 @@ const Delivery = () => {
|
|||||||
onClick={() => setOpeningDialog('information')}
|
onClick={() => setOpeningDialog('information')}
|
||||||
className="text-xs text-blue-800 hover:underline lg:text-sm"
|
className="text-xs text-blue-800 hover:underline lg:text-sm"
|
||||||
>
|
>
|
||||||
Information
|
Shipping Policy
|
||||||
</button>
|
</button>
|
||||||
<SideDialog
|
<SideDialog
|
||||||
title="Information"
|
title="Shipping Policy"
|
||||||
onClose={() => setOpeningDialog(null)}
|
onClose={() => setOpeningDialog(null)}
|
||||||
open={openingDialog === 'information'}
|
open={openingDialog === 'information'}
|
||||||
>
|
>
|
||||||
<p>Information</p>
|
<div className="mt-5 flex h-full flex-col space-y-3 overflow-hidden">
|
||||||
</SideDialog>
|
<section>
|
||||||
|
{STORE_PREFIX === 'reman-transmission' ? (
|
||||||
|
<>
|
||||||
|
<p className="text-md mb-3 font-semibold">
|
||||||
|
Flat Rate Shipping to Commercial Addresses
|
||||||
|
</p>
|
||||||
|
<p className="mb-2 text-sm">
|
||||||
|
We offer Flat Rate Shipping of $299.00 if you are shipping to a commercial
|
||||||
|
address. This means the address you are shipping to is in a commercially zoned
|
||||||
|
location.
|
||||||
|
</p>
|
||||||
|
<p className="mb-2 text-sm">
|
||||||
|
Home businesses do not count as a commercial address. Please ship directly to
|
||||||
|
your repair shop or dealership performing repairs to utilize our Flat Rate
|
||||||
|
Shipping to Commercial Addresses option.
|
||||||
|
</p>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
<p className="text-md mb-3 font-semibold">
|
||||||
|
Free Shipping to Commercial Addresses
|
||||||
|
</p>
|
||||||
|
<p className="mb-2 text-sm">
|
||||||
|
We offer Free Shipping if you are shipping to a commercial address. This means
|
||||||
|
the address you are shipping to is in a commercially zoned location.
|
||||||
|
</p>
|
||||||
|
<p className="mb-2 text-sm">
|
||||||
|
Home businesses do not count as a commercial address. Please ship directly to
|
||||||
|
your repair shop or dealership performing repairs to utilize our Free Shipping
|
||||||
|
to Commercial Addresses option.
|
||||||
|
</p>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<p className="text-md mb-2 font-semibold">Residential Address / Liftgate Fee</p>
|
||||||
|
<p className="mb-2 text-sm">
|
||||||
|
If you are shipping to a residential address, there will be a surcharge of $99.00
|
||||||
|
to accomodate the need for a liftgate- based delivery.
|
||||||
|
</p>
|
||||||
|
<p className="mb-2 text-sm">
|
||||||
|
Please make sure your address location is capable of receiving freight without the
|
||||||
|
need of prior notification or appointment setup and capability of unloading with
|
||||||
|
forklift from the delivery truck.
|
||||||
|
</p>
|
||||||
|
<p className="text-sm">
|
||||||
|
Please note, certain locations (remote areas) as well as certain locations in CO,
|
||||||
|
UT, MT, NY, OR, CA may result in additional delivery fees.
|
||||||
|
</p>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<p className="text-md mb-2 font-semibold">Delivery Times</p>
|
||||||
|
<p className="text-sm">
|
||||||
|
Under normal circumstances you will receive your order within 7-14 Business Days
|
||||||
|
(excluding weekends and holidays). However, due to increased order volumes,
|
||||||
|
weather conditions, or circumstances beyond our control, we will ship your order
|
||||||
|
out as soon as possible. Please note all shipping times are estimates and not
|
||||||
|
guarantees. {SITE_NAME} will not be responsible for any additional fees that the
|
||||||
|
carrier may charge due to re-delivery or storage.
|
||||||
|
</p>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<p className="text-md mb-2 font-semibold">Damaged Parts</p>
|
||||||
|
<p className="text-sm">
|
||||||
|
All engines are inspected before shipping to purchaser. However, damage may occur
|
||||||
|
during shipping. We request that customers inspect all engines and transmissions
|
||||||
|
at the time of delivery for any damage. Report damaged, wrong, or missing parts
|
||||||
|
before signing any shipping documents. Damaged, wrong, or missing parts should be
|
||||||
|
reported by the purchaser at the time of delivery. Failure to report damages
|
||||||
|
before signing shipping documents, places responsibility on purchaser (receiver).
|
||||||
|
Purchaser refers to any representative of the company designated to sign for
|
||||||
|
delivery.
|
||||||
|
</p>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<div className="rounded-md border border-blue-700 bg-blue-50 p-2">
|
||||||
|
<div className="flex items-center">
|
||||||
|
<div className="flex-shrink-0 px-2">
|
||||||
|
<InformationCircleIcon className="h-5 w-5 text-blue-400" aria-hidden="true" />
|
||||||
</div>
|
</div>
|
||||||
<div className="pl-2">
|
<div className="ml-3">
|
||||||
<button
|
<p className="font-medium text-blue-700">
|
||||||
onClick={() => setOpeningDialog('terms-conditions')}
|
Have questions? Speak to a specialist now:
|
||||||
className="text-xs text-blue-800 hover:underline lg:text-sm"
|
</p>
|
||||||
|
<div className="md:flex md:justify-between">
|
||||||
|
<p className="mt-1 text-blue-700 md:mt-0">
|
||||||
|
<a
|
||||||
|
href="tel:+18882422605"
|
||||||
|
className="whitespace-nowrap text-blue-700 hover:text-blue-600"
|
||||||
>
|
>
|
||||||
Terms & Conditions
|
(888) 242-2605
|
||||||
</button>
|
<span aria-hidden="true"> →</span>
|
||||||
<SideDialog
|
</a>
|
||||||
title="Terms & Conditions"
|
</p>
|
||||||
onClose={() => setOpeningDialog(null)}
|
</div>
|
||||||
open={openingDialog === 'terms-conditions'}
|
</div>
|
||||||
>
|
</div>
|
||||||
<p>Terms & Conditions</p>
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
</SideDialog>
|
</SideDialog>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user