From bf7824a2379d4005ee9cdaa91be37cf85565c1e0 Mon Sep 17 00:00:00 2001 From: Bartosz Herba Date: Mon, 27 Jun 2022 12:16:42 +0200 Subject: [PATCH] fix: mobile category add to cart button is missin on mobile view - make add to cart button always visible on the mobile view --- .../components/views/CategoryProductGrid.vue | 12 +++++++++++- .../components/views/CategoryProductList.vue | 10 ++++++++++ .../components/views/CategoryProductPrice.vue | 4 ++-- .../views/useProductsWithCommonCardProps.ts | 4 ++-- 4 files changed, 25 insertions(+), 5 deletions(-) diff --git a/packages/theme/modules/catalog/category/components/views/CategoryProductGrid.vue b/packages/theme/modules/catalog/category/components/views/CategoryProductGrid.vue index 9ca1bbabc..a879a84e2 100644 --- a/packages/theme/modules/catalog/category/components/views/CategoryProductGrid.vue +++ b/packages/theme/modules/catalog/category/components/views/CategoryProductGrid.vue @@ -26,7 +26,7 @@ data-testid="product-card" :image-height="imageSize.height" :image-width="imageSize.width" - show-add-to-cart-button + :show-add-to-cart-button="true" @click:wishlist="$emit('click:wishlist', product)" @click:add-to-cart="$emit('click:add-to-cart', { product, quantity: 1 })" > @@ -102,4 +102,14 @@ export default defineComponent({ } } +::v-deep .sf-product-card__add-button { + @include for-mobile { + opacity: 1; + display: flex; + z-index: 10; + bottom: 1rem; + right: 0; + } +} + diff --git a/packages/theme/modules/catalog/category/components/views/CategoryProductList.vue b/packages/theme/modules/catalog/category/components/views/CategoryProductList.vue index ab8d168a6..eab4e1498 100644 --- a/packages/theme/modules/catalog/category/components/views/CategoryProductList.vue +++ b/packages/theme/modules/catalog/category/components/views/CategoryProductList.vue @@ -165,4 +165,14 @@ export default defineComponent({ } } +::v-deep .sf-product-card__add-button { + @include for-mobile { + opacity: 1; + display: flex; + z-index: 10; + bottom: 1rem; + right: 0; + } +} + diff --git a/packages/theme/modules/catalog/category/components/views/CategoryProductPrice.vue b/packages/theme/modules/catalog/category/components/views/CategoryProductPrice.vue index bfb35b323..75903c7dc 100644 --- a/packages/theme/modules/catalog/category/components/views/CategoryProductPrice.vue +++ b/packages/theme/modules/catalog/category/components/views/CategoryProductPrice.vue @@ -52,7 +52,7 @@