Issues when going back in the browser from Checkout #73
Replies: 3 comments 2 replies
-
Hey, Actually there is an open issue here with the same topic. But I've understood it and could replicate only after your message :-) I'm going to tag you in that issue so you can track the progress. I'll try to find a solution for that. |
Beta Was this translation helpful? Give feedback.
-
Hi again! |
Beta Was this translation helpful? Give feedback.
-
I just found this after the fact, but for me the simple solution was to replace the current page with the line_item removal URL. Alpine.js <a
href="{{ line_item.url_to_remove }}"
@click.prevent="window.location.replace($el.href)"
>
Remove
</a> Vanilla <a
href="{{ line_item.url_to_remove }}"
data-remove-replace
>Remove</a>
<script>
document.addEventListener('DOMContentLoaded', () => {
const itemsToRemoveReplace = document.querySelectorAll('[data-remove-replace]')
itemsToRemoveReplace.forEach(item => {
item.addEventListener('click', (e) => {
e.preventDefault()
window.location.replace(item.href)
})
})
})
</script> Might be cool to have a LAC attribute for this. @EvgeniyMukhamedjanov I'm on 2.0.1 and still saw this occurring. I thought maybe was because I had devtools and cache disabled, but I closed the devtools and tried again and still occurred. |
Beta Was this translation helpful? Give feedback.
-
Hey there,
I'm having issues when going back in the browser from checkout. If I add two items to cart and go to checkout and then navigate back it won't show the latest addition.
https://scribehow.com/shared/Purchasing_a_Sandalwood_and_Vanilla_Candle_from_Lyttelton_Lights__IBzw4bWdT12qfHSIL5x6jw
Beta Was this translation helpful? Give feedback.
All reactions