From 5fb1781d622c2e77d394a6dea8862d7d3274fc68 Mon Sep 17 00:00:00 2001 From: marzban-dev Date: Mon, 8 Dec 2025 11:42:46 +0330 Subject: [PATCH 1/4] Fix product card image --- frontend/components/global/product-detail/ProductsSlider.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/components/global/product-detail/ProductsSlider.vue b/frontend/components/global/product-detail/ProductsSlider.vue index d486ae1..f08954a 100644 --- a/frontend/components/global/product-detail/ProductsSlider.vue +++ b/frontend/components/global/product-detail/ProductsSlider.vue @@ -91,7 +91,7 @@ const onSwiper = (swiper: SwiperClass) => { :id="product.id" :slug="product.slug" :title="product.name" - :picture="product.variants[0].images[0].image" + :picture="product.image ?? product.variants[0].images[0].image" :colors="product.colors" :price="product.variants[0].price" :rate="product.rating" From a366c20b95fbbbb8f64e0c4579b370a08cf6ea4f Mon Sep 17 00:00:00 2001 From: marzban-dev Date: Mon, 8 Dec 2025 11:44:32 +0330 Subject: [PATCH 2/4] Add one layer of categories --- frontend/components/global/Header.vue | 7 +++- frontend/components/global/MegaMenu.vue | 36 +++++++++++++-------- frontend/components/global/ProductsGrid.vue | 2 +- frontend/constants/index.ts | 2 +- frontend/types/global.d.ts | 9 ++++-- 5 files changed, 38 insertions(+), 18 deletions(-) diff --git a/frontend/components/global/Header.vue b/frontend/components/global/Header.vue index 0e149ba..bd383d9 100644 --- a/frontend/components/global/Header.vue +++ b/frontend/components/global/Header.vue @@ -32,7 +32,12 @@ const megaMenuCategories = computed(() => { subitems: item.subcategorys.map((item) => { return { title: item.name, - link: item.slug, + subitems: item.subcategorys.map((item) => { + return { + title: item.name, + link: item.slug, + }; + }), }; }), }; diff --git a/frontend/components/global/MegaMenu.vue b/frontend/components/global/MegaMenu.vue index 0843000..32c99e7 100644 --- a/frontend/components/global/MegaMenu.vue +++ b/frontend/components/global/MegaMenu.vue @@ -7,7 +7,10 @@ type Props = { title: string; subitems: { title: string; - link: string; + subitems: { + title: string; + link: string; + }[]; }[]; }[]; }; @@ -157,14 +160,12 @@ onMounted(() => { />
-
+
diff --git a/frontend/components/global/ProductsGrid.vue b/frontend/components/global/ProductsGrid.vue index 6af65f3..30723e8 100644 --- a/frontend/components/global/ProductsGrid.vue +++ b/frontend/components/global/ProductsGrid.vue @@ -45,7 +45,7 @@ withDefaults(defineProps(), { :id="product.id" :slug="product.slug" :title="product.name" - :picture="product.variants[0].images[0].image" + :picture="product.image ?? product.variants[0].images[0].image" :colors="product.colors" :price="product.variants[0].price" :rate="product.rating" diff --git a/frontend/constants/index.ts b/frontend/constants/index.ts index a67d595..56f126e 100644 --- a/frontend/constants/index.ts +++ b/frontend/constants/index.ts @@ -37,7 +37,7 @@ export const API_ENDPOINTS = { }, products: { get_all: "/products", - categories: "/products/categories", + categories: "/products/categories/v2", saved: "/accounts/favorites", }, resellers_products: { diff --git a/frontend/types/global.d.ts b/frontend/types/global.d.ts index 0b400c9..bb10682 100644 --- a/frontend/types/global.d.ts +++ b/frontend/types/global.d.ts @@ -1,4 +1,4 @@ -export { }; +export {}; declare global { type ApiPaginated = { @@ -105,9 +105,13 @@ declare global { category: SubCategory; colors: string[]; added_to_favorites: boolean; + image: string | null; }; - type ProductListItem = Pick; + type ProductListItem = Pick< + Product, + "id" | "variants" | "name" | "rating" | "slug" | "category" | "colors" | "image" + >; type Article = { id: number; @@ -156,6 +160,7 @@ declare global { image: string; product_count: number; parent: string; + subcategorys: SubCategory[]; }; type Address = { From 47ec972cd7d8d0f0fe8013a4e49e53668adc18e9 Mon Sep 17 00:00:00 2001 From: marzban-dev Date: Mon, 8 Dec 2025 11:59:12 +0330 Subject: [PATCH 3/4] Fix product variants position --- .../components/product/ProductHero/index.vue | 52 ++++++++++++++----- 1 file changed, 39 insertions(+), 13 deletions(-) diff --git a/frontend/components/product/ProductHero/index.vue b/frontend/components/product/ProductHero/index.vue index 592b13c..325ff4d 100644 --- a/frontend/components/product/ProductHero/index.vue +++ b/frontend/components/product/ProductHero/index.vue @@ -77,14 +77,32 @@ watch( From 68ce354479f0b68f7623a776dfedba60b556d227 Mon Sep 17 00:00:00 2001 From: marzban-dev Date: Mon, 8 Dec 2025 12:04:06 +0330 Subject: [PATCH 4/4] Update highlight text --- frontend/components/global/ServiceHighlights.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/components/global/ServiceHighlights.vue b/frontend/components/global/ServiceHighlights.vue index 6090dce..a864877 100644 --- a/frontend/components/global/ServiceHighlights.vue +++ b/frontend/components/global/ServiceHighlights.vue @@ -13,12 +13,12 @@ const highlights = ref([ { icon: "/img/heymlz/footer-support.gif", title: "خدمات مشتری", - description: "پشتیبانی استثنایی، راه‌حل‌های پایدار برای شما", + description: "پشتیبانی ویژه، راه‌حلی پایدار برای شما", }, { icon: "/img/heymlz/footer-send.gif", - title: "ارسال سریع و رایگان", - description: "ارسال رایگان برای سفارش‌های بالای ۱۵۰ دلار", + title: "ارسال سریع و مطمئن", + description: "پردازش محصولات با سرعت بالا و ارسال مطمئن", }, { icon: "/img/heymlz/footer-share.gif",