Cart notification not showing in Dawn theme

BOILISÉ
Tourist
3 0 2

Hi,

I've been modifying the Dawn theme in order to implement the possibility to add customization options on products following conversation below:

https://community.shopify.com/c/shopify-design/line-item-properties-in-dawn-theme/td-p/1267149/

 

However, when I add a product to the cart now I do not have the following events happening:

- Cart icon in header does not change to include the number of items in the cart

- Cart notification popup does not show

 

I've tried the following to correct the issue without success:

- Re-initialize product-form.js using the source code from github's dawn.2.0.0 (which was my original version of the theme)

- Use a brand new dawn theme with no code or theme changes

 

When I debug in Firefox I can see the following error message upon clicking on "Add to cart button" but I can't find a way to fix it.

TypeError: t.sections is null

renderContents cart-notification.js:37
renderContents cart-notification.js:36
onSubmitHandler product-form.js:29
promise callback*onSubmitHandler product-form.js:28
t product-form.js:7
<anonymous> product-form.js:2
Do you have any suggestion on how to re-implement the cart notification functionality ?
 
Thanks.
Replies 5 (5)
Nikhil_M
New Member
2 0 1

@BOILISÉ wrote:

Hi,

I've been modifying the Dawn theme in order to implement the possibility to add customization options on products following conversation below:

https://community.shopify.com/c/shopify-design/line-item-properties-in-dawn-theme/td-p/1267149/

 

However, when I add a product to the cart now I do not have the following events happening:

- Cart icon in header does not change to include the number of items in the cart

- Cart notification popup does not show

 

I've tried the following to correct the issue without success:

- Re-initialize product-form.js using the source code from github's dawn.2.0.0 (which was my original version of the theme)

- Use a brand new dawn theme with no code or theme changes

 

When I debug in Firefox I can see the following error message upon clicking on "Add to cart button" but I can't find a way to fix it.

TypeError: t.sections is null

renderContents cart-notification.js:37
renderContents cart-notification.js:36
onSubmitHandler product-form.js:29
promise callback*onSubmitHandler product-form.js:28
t product-form.js:7
<anonymous> product-form.js:2
Do you have any suggestion on how to re-implement the cart notification functionality ?
 
Thanks.

I am having the same issue! Please help anyone!!

Ola7
New Member
2 0 0

Hi

I am using the Dawn theme for my store and when I add items to my cart, there is no notification pop up to show what has been added to cart. I would need to reload page to show it - please help - how do I resolve this?

thank you

BOILISÉ
Tourist
3 0 2

Hi,

 

I haven't managed to fix the problem, but I noticed it was not impacting the website in production.

 

Somehow the javascript code must not be working in development mode, this is definitely annoying but at least not blocking.

 

Ola7
New Member
2 0 0

hi - to clarify, do you mean once your website was up and running, the "added to cart" pop up started working? I'm having the same issues as I have not launched my site yet but would not want to launch if customers cannot preview number of items in cart whilst shopping.

thanks

BOILISÉ
Tourist
3 0 2

Hi,

In my case, the "added to cart" popup does not show up when I connect to the website using the ___.myshopify.com preview address, but it does show up when I connect using the ___.com address.

You should be able to check it if you have a temporary page set and can connect live to your website with a password for example.

 

I would really appreciate a solution from Shopify on this annoying bug by the way.