Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #671 from azkyakhan/#v1.0.6
Browse files Browse the repository at this point in the history
Removed overlay z-index property, helper for calculating product price in cart and removed body scroll (#v1.0.6)
  • Loading branch information
dt2patel authored Jan 5, 2022
2 parents b632872 + 4f7e064 commit 7573ec1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 21 deletions.
1 change: 0 additions & 1 deletion App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export default {
<style lang="scss">
@import "~@storefront-ui/shared/styles/helpers/breakpoints";
body {
--overlay-z-index: 2;
--sidebar-aside-z-index: 2;
--sidebar-z-index: 2;
--bottom-navigation-height: 3.75rem;
Expand Down
15 changes: 7 additions & 8 deletions components/organisms/o-microcart-panel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
:key="product.id"
:image="getThumbnailForProductExtend(product)"
:title="product.name"
:regular-price="formatPrice(getProductPrice(product).regular)"
:special-price="formatPrice(getProductPrice(product).special)"
:regular-price="getProductPrice(product).regular"
:special-price="getProductPrice(product).special"
:stock="10"
:qty="product.qty"
class="collected-product"
Expand Down Expand Up @@ -117,8 +117,8 @@
import { mapState, mapGetters } from 'vuex';
import { localizedRoute } from '@vue-storefront/core/lib/multistore';
import { onlineHelper } from '@vue-storefront/core/helpers';
import { getThumbnailForProduct, getProductPrice } from '@vue-storefront/core/modules/cart/helpers';
import { price } from '@vue-storefront/core/filters';
import { getThumbnailForProduct } from '@vue-storefront/core/modules/cart/helpers';
import { getProductPrice, getProductPriceFromTotals } from 'theme/helpers';
import VueOfflineMixin from 'vue-offline/mixin';
import onEscapePress from '@vue-storefront/core/mixins/onEscapePress';
Expand Down Expand Up @@ -184,10 +184,9 @@ export default {
return getThumbnailForProduct(product);
},
getProductPrice (product) {
return getProductPrice(product)
},
formatPrice (value) {
return value ? price(value) : ''
return onlineHelper.isOnline && product.totals && product.totals.options
? getProductPriceFromTotals(product)
: getProductPrice(product);
},
getProductOptions (product) {
return onlineHelper.isOnline && product.totals && product.totals.options
Expand Down
12 changes: 0 additions & 12 deletions components/organisms/o-microcart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import { mapState } from 'vuex';
import ALoadingSpinner from 'theme/components/atoms/a-loading-spinner';
import ALoadingError from 'theme/components/atoms/a-loading-error';
import { disableBodyScroll, enableBodyScroll } from 'body-scroll-lock'
const OMicrocartPanel = () =>
import(/* webpackChunkName: "vsf-microcart" */ 'theme/components/organisms/o-microcart-panel');
Expand All @@ -36,17 +35,6 @@ export default {
isMicrocartOpen: state => state.ui.microcart
})
},
watch: {
isMicrocartOpen (state) {
if (state) {
this.$nextTick(() => {
disableBodyScroll(this.$el)
})
} else {
enableBodyScroll(this.$el)
}
}
},
methods: {
reloadComponent () {
this.theMicrocartAsyncComponent = () => ({
Expand Down

0 comments on commit 7573ec1

Please sign in to comment.