DAWN THENE 2.0 Add to cart on collection page with ajax like it works in product single page

Thank you very much my friend.!!!

I added code as per your guide.
but I found this error in the console.

Hello, really thanks so helpfull! But in my case doesn’t work, i mean the button add to cart is present but once i click the button, it bring me to the product page. No add to cart here, can you help me? I copy your code, thanks

Hello @cris88 , @Abhay117 ,

How many other customization you already did in theme ?
If you did then first revert them and then try the code. Alternatively check the conflicts manually and try to fix them.

Thanks

I just installed dawn, this is the first customisation. There is the button “atc” but it doens’t work. CIf i click it, the product page will open.

I am having the same issue, no previous customisation done on the theme.

Is there a solution to this?

For those to whom this code is not working.

Once please check the comment day I made and check what version of Dawn was available on that day and what version of Dawn theme is available in these days.
If you find difference then maybe there is chance that theme author made a update in this version and the solution I provided is not compatible with new version. So I suggest just take the idea from my solution and implement it in the version you are using.

Remove “” From the code.

Also, redirect to detail page issue is because of the CSS.

.card-wrapper .full-unstyled-link::after

They added 100% height. Try to change it.

What file do I change the CSS on? And what do I change .card-wrapper .full-unstyled-link::after it to?

I have created a custom CSS and added the CSS there.

You simply can override the CSS.

Try this or if you have any HTML designers ask them to check. Else share the URL. Will check and let you know.

.card-wrapper .full-unstyled-link::after { z-index: -1; }

Hello,

I see the button but it doesn’t adapt to the color scheme I chose for solid button color. The path also goes straight to the product rather than adding to the cart. It seems the function is broken because hovering over the button doesn’t expand like the theme buttons do. What can be added to fix this?

I’m having this same issue. It all shows up as a button and quantity sector, but when you click on it, it goes to the product page.

The solution @Guleria provided was compatible with Dawn theme version 1.1.0 and the same I’m using

I’ve tried it on two stores and a brand new version of the theme as a test and it does the same thing.

I’ve been able to adjust this code to meet my needs and it’s amazing, so thank you so much! however, any items that are sold out are simply blank inside. is there a way to fix this?

I tried the code but it directs the customer to the product page instead of adding to cart, also, the button is not centered and doesn’t animate on hover. Is it possible to make these adjustments?

Add to cart button takes me to product with the above code. I just downloaded Dawn theme. Is there another form of successful code that works?

Appreciated thanks

Hello,

I implemented your solution and it«s giving me this error:

Liquid error (card-product line 140): product form must be given a product

Any idea why? Thanks!

This solution just takes me to the product page. Doesn’t activate minicart or add product to cart. Any suggestions? Is there a step missing to activate notification cart like the product page?