Position of the "added to cart" popup

Solved
Highlighted
Tourist
10 0 1

hello

I have a working shop  (shop.shoestory.co.uk). When  you  click "add to  cart", a small popup  appears in the top right of the screen. However I   have a sticky/fixed header so part of the popup cart gets lost under the  header. Anyone know how  to move it down a  few pixels???

Martin

0 Likes
Highlighted
Shopify Expert
1381 111 200

This is an accepted solution.

Hello,
Hope you are doing well.

We have gone through your requirements and we would love to help you.

use this 

 

.cart-popup-wrapper {
display: block;
position: fixed;
width: 100%;
background-color: #fff;
z-index: 9999;
border: 1px solid #e8e9eb;
transform: translateY(0%);
transition: all 0.45s cubic-bezier(0.29, 0.63, 0.44, 1);
top: 80px;
}



1 Like
Highlighted
Shopify Partner
1281 169 403

This is an accepted solution.

You can add this to the end of the body right before the </body> in your theme.liquid in the layouts folder.

 

<script>
$(function(){
let headerHeight = $('.site-header').height();
let cartNotification = $('.cart-popup-wrapper');
cartNotification.css('margin-top', headerHeight + "px")
});
</script>
If my solution helped you, please like and accept as solution!
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish :D
1 Like
Highlighted
Tourist
10 0 1

thanks  for all responses. You folks rock :) I used a combination  of them all to solve the  issue

1 Like