Cart: show variant label

This commit is contained in:
2025-11-11 15:47:07 +03:00
parent dc18d84ac8
commit 42a70affe2
4 changed files with 33 additions and 26 deletions

View File

@@ -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>

View File

@@ -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

View File

@@ -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,

View File

@@ -321,7 +321,7 @@ export interface CartItem {
image: string;
quantity: number;
description: string;
variant?: string;
variant?: Variant;
extras?: Extra[];
extrasgroup?: Extra[];
isHasLoyalty?: boolean;