Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi
can any one help me out, my add to cart button is not working
dawn them
Solved! Go to the solution
This is an accepted solution.
Shopify knows that errors are just human nature, so we have provided a way to undo changes made to a code file in your theme over time. Rather than trying to re-implement your product code, my first suggestion is to try rolling back your .liquid files individually to a time and date before you made the changes.
From your Shopify admin, go to Online Store > Themes.
Find the theme you want to edit, and then click Actions > Edit code.
Click on one of the files under the relevant folder in which you want to undo changes.
Click Older versions next to the file name
TIP: We always suggest you first duplicate the theme and work in the duplicate. That way you can always go back to your previous version.
Once you have managed to roll back to a previously saved version of your theme, we can then work on implementing the correct code needed to arrange your product description to full- width.
Moira | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Hey @Danieln0,
I'd love to understand a bit more about this in order to help you out!
Any added context that you can provide will greatly help us pinpoint where the issue is stemming from and what steps we can take next:
Has the "Add to cart" button worked at all whilst using the Dawn theme or has it stopped working recently?
Have you made any adjustments to your website? Such as edited your theme code or installed/uninstalled any apps?
Do you mind sharing your website URL?
Since we're not currently experiencing any known issues impacting product pages or the checkout, I'd be curious to know if we can isolate the issue to your device or browser. Would you mind testing a few things for me?
Clear your cache and cookies - When you use a browser, like Chrome, it saves some information from websites in its cache and cookies. Clearing them fixes certain problems, like loading or formatting issues on sites.
Ensure your browser is up to date.
Try an Incognito window.
Try another browser (e.g. Safari).
Log in to your Shopify mobile app and try adding a product to your cart.
Try completing the same steps on your phone, using data rather than WiFi.
Looking forward to hearing how that goes!
Moira | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
HI @Moira
yes the add to cart was walking okay but I change some code because I was try to arrange my product description to full- width after that my add to cart stopped to working
password : prowhi
This is an accepted solution.
Shopify knows that errors are just human nature, so we have provided a way to undo changes made to a code file in your theme over time. Rather than trying to re-implement your product code, my first suggestion is to try rolling back your .liquid files individually to a time and date before you made the changes.
From your Shopify admin, go to Online Store > Themes.
Find the theme you want to edit, and then click Actions > Edit code.
Click on one of the files under the relevant folder in which you want to undo changes.
Click Older versions next to the file name
TIP: We always suggest you first duplicate the theme and work in the duplicate. That way you can always go back to your previous version.
Once you have managed to roll back to a previously saved version of your theme, we can then work on implementing the correct code needed to arrange your product description to full- width.
Moira | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Hi @Moira
Thanks I reversed the process place can you help me to make my product description full-width
Head to Online Store -> Themes -> Edit code -> Assets -> theme.scss.liquid and paste this code at the end of the file:
@media screen and (min-width: 990px) {
.product:not(.product--no-media):not(.featured-product) .product__info-wrapper {
max-width: 70% !important;
width: 70% !important;
}
}
As I do not have access to your theme editor, I highly suggest posting your request on the following community thread:
A Shopify Expert will be able to access your store directly and implement the code for you.
All the best,
Moira | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
what folder or template or file do I need to undone I can't see on the screenshot
Hey @mike1231, this depends on which section you made adjustments to. Are you wanting to revert the changes you made to your product description?
Moira | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
THANK YOU
Glad you found this thread helpful @Blastiffy! Don't hesitate to reach back out if you require any further assistance as you continue to work on your store.
All the best,
Moira | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
I am currently having this same issue but I have not make any changes to the codes. I have try all the above as well like using other browsers, clear cache but the cart page keep refreshing only.
Hey @Guarazez,
Sorry to hear you are facing this issue, would you mind sharing your store URL so I can take a closer look?
Look forward to hearing from you!
Moira | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Would you be able to look at my URL...Divide theme. I can't get my add to cart button to work. It can add additional numbers of items, but then just stays on that section, and will not move to added to cart section, etc. Please help and thank you.
hey im having the same issue with my website the add to cart button not working i have not changed anything
thezerowastepeople.com.au
Hey, there! If you haven't made any coding changes that you can undo, please contact Shopify Support via the Help Center so we can investigate.
Sophia | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
I am having an issue with my add to cart . Using zeexo theme. 1) doesnt add products to the store 2) when i click on The cart icon nothing opens up... i did change pictures on the website but mot sure of that also has effect on this.
Hey @LANORABAGS,
Without being able to see your store, it's difficult for me to establish what is happening. Would you mind sharing your website URL with me so I can take a closer look?
Look forward to hearing from you!
Moira | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
I just took a look at your website and am able to successfully add products to my cart and reach checkout, are you still having trouble with this on your end? What browser are you currently operating on?
Moira | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Hi add to cart button not working, have not changed any code, please help
Hey @in56, would you mind sharing your website URL so I can take a closer look? Thanks,
Moira | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Hi, I’m not sure if you’re still available but I’m working on a site (with the craft theme) for a client and encountered the add to cart button issue too. I’ve tried about everything in the book but nothing has worked. Would you be able to help?
https://aromatics-by-j-renee.myshopify.com/products/wickless-candle-bundle
PW: giaste
Hey @Shariesa_Taylor!
Are you still running into trouble with this issue? I just had a look at your store and managed to successfully add multiple products to the cart:
Let me know if you found a solution to your query,
Moira | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Hey @YoanRincon,
Were you able to resolve this issue? I just had a look at your website and was able to successfully add items to my cart:
Moira | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Hi Moira,
I seem to have the same problem. All of a sudden the add to cart button doesn’t work anymore. Could you please help me?
Thank you!
Annette
Hey @Annette7,
I just had a look at your website and was able to successfully add items to my cart:
What browser are you using? It's possible you may need the cache cleared. When you use a browser, like Chrome, it saves some information from websites in its cache and cookies. Clearing them fixes certain problems, like loading or formatting issues on sites.
Moira | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Hi Moira, I am also encountering the same issue with my website. The add to cart button does not seem to be working.
This is my website URL
Hey @NoorahGifts,
I just had a look at your website and was able to successfully add items to my cart:
Were you able to resolve this issue?
Moira | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Hi @Moira, I am facing a similar issue in the Dawn theme. When I click on "Add to cart", the item gets added but it won't update to "Item added to cart". I check the setting and it's okay. Website url: https://cryptofashion.us
Also, when I click on Size in same page, both the buttons "Add to cart", and "Buy with Paypal" blink.
Hey @Pramish37,
Do you have any third-party product apps installed within your store? These can sometimes affect the functionality of the cart.
Moira | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
I have the same problem.
My website is maximiramontezuma.com would you mind taking a look?
Hi, @maximira!
Thanks for reaching out. I checked out your store and it looks like I am able to add a product to the cart, however the button seems to be the same color as the background, as shown here:
I recommend adjusting your theme colors by following the instructions in this help document.
Please let me know if you have any other questions!
Greta | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Hi,can you help me too?..the add to cart button just keeps loading and nothing happens
I use Sense theme
shirthappensbm.com
psw: baychu
Hi, @ShirtHappens. I took a look at your store and your 'add to cart' button was working correctly for me. Is this still happening on your end? If so, I'd recommend testing this out using a different browser, device, and/or internet connection to pinpoint the cause of this. You can also contact our support team here and we'd be happy to take a look at it with you in more detail.
Erin | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Hi
I am also facing the same issue where my Add To Cart button is not working in DAWN theme
I have not made any changes to the code and have tried the above mentioned solutions (different browser, switching wifi) but it is still not working
desperately need help
My store name is peachyboo.in
Hey @bbd95a,
I just took a look at your store peachyboo.in and have no trouble adding items to my cart via Google Chrome. Are you still facing issues on your end?
Moira | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Don't hesitate to reach back out if you require any further assistance as you continue to work on your store.
All the best,
Moira | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Hi Moria,
I cannot see my "Add to Cart" button because it is solid white. I've tried changing it's color in the theme color settings but it hasn't worked. I believe it only affects the "Shop Pay" button.
Here's an example page from my site: https://flowera.art/products/mushrooms-are-down-to-earth-black-bleached-hoodie
Hi can you help me?
The add to cart button doesnt work suddenly after years.
I didnt changed the code.
This problem is going on for a month i think.
My website is www.theseamosslab.com.
Theme is minimal and i have a pagebuilder: LayoutHub.
Hey @Seamossfactory,
Have you tried disabling your page builder? I have seen many cases where this has interfered with the cart and checkout pages.
Moira | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Hi There,
I am also facing the same issue. Here is an error log from Google Console:
TypeError: Cannot read properties of null (reading 'cart-notification-product')
at cart-notification.js?v=110464945634282900951684607898:53:56
at Array.forEach (<anonymous>)
at HTMLElement.renderContents (cart-notification.js?v=110464945634282900951684607898:51:34)
at product-form.js?v=154520108827843999331684607899:54:33
(anonymous) @ product-form.js?v=154520108827843999331684607899:58
Promise.catch (async)
onSubmitHandler @ product-form.js?v=154520108827843999331684607899:57
And here is the link to the site as well:
Please have a look.
Thanks,
Zikria
To fix this issue, you need to ensure that the object being accessed is not null before trying to access its properties. You can do this by checking if the object exists before using it in the code. It is likely related to the cart or notifications functionality on your website.
You should review the cart-notification.js
file and check if there is a variable named 'cart-notification-product' that might be null. Add a condition to check if this variable is not null before accessing its properties, and handle any null cases appropriately.
Additionally, take a look at the product-form.js
file on line 54, as it seems to be related to the error. Ensure that it doesn't interfere with the cart-notification logic.
Remember to examine the surrounding code and make the necessary changes to fix the issue.
Moira | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Hello - I am also having this issue.
I've tried different browsers, incognito, mobile etc.
When you click the add to cart button, nothing happens.
It is most prints, it seems occasionally it will work on an item, but mostly it doesn't.
Also using Dawn
Hi there, same problem over here, add to cart button randomly works, then not. Have not move any coding, my actual theme is Dawn 9.0. Tried all the solutions in this post, and randomly working sometimes, not sure of what depends. Store at: https://gamerhouse.com.mx
Note: I have Bundle Builder Shopify App installed from quite sometime, and never happened something like this. But, I noticed when adding a bundle created with this app the cart functionality is recovered. To try it out reach here: https://gamerhouse.com.mx/apps/bundles/bundle/128893
Hey @Danieln0,
I am glad that you found the solution for your add-to-cart button not working problem. Even though this question was posted a way back, there are still many store owners that are facing this issue on a regular basis. I am just commenting to help anyone who's facing the same issue with their stores.
To troubleshoot and fix this issue, you should know a few things:
I have written this detailed article addressing all these points and providing a solution:
How To Fix ‘Add-To-Cart Not Working’ issue in Shopify?
Do check and let me know if you find it helpful. I hope this helps!
Warm Regards,
Kanishk
Hi can you help me please.
The add to cart button doesnt work suddenly after years. I didnt changed the code.
This problem is going on for a month i think.
My website is www.theseamosslab.com.
Theme is minimal and i have a pagebuilder: LayoutHub.
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024