Cart: show variant label
This commit is contained in:
@@ -17,7 +17,6 @@ const ProCheckboxGroups = ({ options, ...props }: ProCheckboxGroupsProps) => {
|
||||
>
|
||||
<Space direction="vertical" style={{ width: "100%" }}>
|
||||
{options.map((option: any) => (
|
||||
<>
|
||||
<Checkbox
|
||||
key={option.value}
|
||||
value={option.value}
|
||||
@@ -42,8 +41,6 @@ const ProCheckboxGroups = ({ options, ...props }: ProCheckboxGroupsProps) => {
|
||||
<ProText style={{ fontSize: "1rem" }}>{option.price}</ProText>
|
||||
</div>
|
||||
</Checkbox>
|
||||
{/* {index !== options.length - 1 && <Divider style={{ margin: 0 }} />} */}
|
||||
</>
|
||||
))}
|
||||
</Space>
|
||||
</Checkbox.Group>
|
||||
|
||||
@@ -42,6 +42,7 @@ export default function CartMobileTabletLayout({
|
||||
}: CartMobileTabletLayoutProps) {
|
||||
const { t } = useTranslation();
|
||||
const { items, collectionMethod, orderType } = useAppSelector(selectCart);
|
||||
const { isRTL } = useAppSelector((state) => state.locale);
|
||||
const { subdomain } = useParams();
|
||||
const { isMobile, isTablet } = useBreakPoint();
|
||||
|
||||
@@ -146,7 +147,16 @@ export default function CartMobileTabletLayout({
|
||||
fontWeight: 600,
|
||||
}}
|
||||
>
|
||||
{item.name}
|
||||
{item.name}{" "}
|
||||
<span
|
||||
style={{
|
||||
fontWeight: 400,
|
||||
}}
|
||||
>
|
||||
{isRTL
|
||||
? item.variant?.optionsAR[0].value
|
||||
: item.variant?.options[0].value}
|
||||
</span>
|
||||
</ProText>
|
||||
<br />
|
||||
<ProText
|
||||
|
||||
@@ -67,7 +67,7 @@ export default function ProductFooter({
|
||||
image: product?.image,
|
||||
description: product?.description,
|
||||
comment: specialRequest,
|
||||
variant: selectedVariant?.id,
|
||||
variant: selectedVariant,
|
||||
extras: selectedExtras,
|
||||
extrasgroup: selectedGroups,
|
||||
isHasLoyalty: product?.isHasLoyalty,
|
||||
|
||||
@@ -321,7 +321,7 @@ export interface CartItem {
|
||||
image: string;
|
||||
quantity: number;
|
||||
description: string;
|
||||
variant?: string;
|
||||
variant?: Variant;
|
||||
extras?: Extra[];
|
||||
extrasgroup?: Extra[];
|
||||
isHasLoyalty?: boolean;
|
||||
|
||||
Reference in New Issue
Block a user