Welcome to the Liquify Community

Updated 4 weeks ago

GSAP Cart Problem

Hi,

I’ve created a shop using Webflow and Liquify, and I’ve animated the cart, mobile menu, and search using GSAP. The menu and search work perfectly, but the cart is causing some issues. When I open the cart, the animation works exactly as I want it to. However, when I close it using the X button, the cart simply fades out (which is not what I want). Interestingly, if I have the cart open and click on the empty space on the left, it closes normally with the animation.

Does anyone know what could be causing this issue? Everything worked fine before the conversion.

Here’s the live link: https://z4cmuv3bp7byca7v-57626296517.shopifypreview.com
Webflow live link (this works): https://gooddesk-2-0.webflow.io
Here’s a demo video: https://drive.google.com/file/d/1NdNaPagceDw2DglFD4p5ouTNbGcXu4Fy/view?usp=drive_link
And the GSAP code is attached.

Thank you so much! 🙂
m
c
37 comments
Hi Consti, checking 🙂
It looks like this is because in Shopify you have tested it with the empty mini cart and in webflow with the full mini cart
if you put a product inside the basket in shopify it also works 🙂
Probably it will work if you include the empty state in your triggers too 🙂
With https://www.workstatt.de/ I have used finsweet modal for the mini cart trigger, which also works really nice
Let me know if this solves the issue @consti
Ah i see, thanks!
But I never used the Class .mini-cart_full. I only used the wrapper elements. Do you know what I need to change?
in the empty state there is a different X Close button than the normal state
so you would need to take this one also into account probably with documentQuerySelectorAll
thats the reason why its working with the background, because there we use the same
but the close button is not the same
<div li-mini-cart-toggle="" data-w-id="1e0c0505-6d34-27de-345c-fc05e345ad4f" class="mini-cart_close w-embed" @click="$dispatch('cartupdated.window')"><svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1.84775 14.178L0.447754 12.778L6.04775 7.17798L0.447754 1.57798L1.84775 0.177979L7.44775 5.77798L13.0478 0.177979L14.4478 1.57798L8.84775 7.17798L14.4478 12.778L13.0478 14.178L7.44775 8.57798L1.84775 14.178Z" fill="currentColor"></path></svg></div> I am talking about this element @consti
and I would remove the liquify attributes from it
Thank you 🙏
Is this solved @consti ?
@marv yes, thank you 🙂
@marv i have one question, because I can´t find that error, but when I use the Cart on the Productpage, the opacity of the inner element doesn´t work. Maybe you know what the error is, but if not, then I will find it myself - thank you very much. Here is a video: https://drive.google.com/file/d/1BkSRGJ01k0UAEs7umvCgVurFYhoI1xLJ/view?usp=sharing
I cant find the script on the page
where can I find it? 🙂
if you search in the code for heading.js you will find it
It looks like on the product page navbar_inner is always set to 1 opacity
can you send me your webflow ready only link?
is there somewhere in a script the function where you set the opacity of navbar_inner to 0?
I think one of these scripts is conflicting with gsap
Attachment
Bildschirmfoto_2024-12-23_um_18.25.17.png
thats why its working on other pages, but not on product
Thank you! I thought it might be a known problem, but I appreciate your support!
Can you for testing take out in shopify all of these scripts and test again?
I will do it and let you know
@marv I removed all the scripts and now it´s working. So I will check these scripts
Thank you a lot!
I found the error. Thankyou
Add a reply
Sign up and join the conversation on Discord