Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

fix(checkout): redirect to last known page #320

Merged
merged 1 commit into from
Apr 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions packages/theme/components/CartSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@
/>
</div>
</template>
<template #actions>
<div />
</template>
<template #more-actions>
<div />
</template>
</SfCollectedProduct>
</transition-group>
</div>
Expand Down Expand Up @@ -243,7 +249,7 @@ export default {
}
const handleCheckout = (checkoutUrl) => {
setTimeout(() => {
window.location.replace(checkoutUrl)
window.location.href = checkoutUrl;
}, 300)
}
const updateQuantity = debounce(async ({ product, quantity }) => {
Expand Down Expand Up @@ -382,11 +388,14 @@ export default {
--cp-compare-opacity: 1;
@include for-desktop {
.collected-product__properties {
display: none;
display: block;
}
}
}
}
::v-deep .sf-collected-product__configuration {
display: block;
}
.coupon-form-wrapper{
display: flex;
margin-bottom: 40px;
Expand Down
2 changes: 2 additions & 0 deletions packages/theme/components/SearchResults.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
:title="productGetters.getName(product)"
:add-to-cart-disabled="getStockCount(product) <= 0"
:link="localePath(getProductLink(product))"
:wishlist-icon="false"
@click:add-to-cart="
handleAddToCart({ product, quantity: 1, currentCart })
"
Expand Down Expand Up @@ -116,6 +117,7 @@
:title="productGetters.getName(product)"
:add-to-cart-disabled="getStockCount(product) <= 0"
:link="localePath(getProductLink(product))"
:wishlist-icon="false"
@click:add-to-cart="
handleAddToCart({ product, quantity: 1, currentCart })
"
Expand Down