dynamicweb / Swift

Dynamicweb Swift is a plug-and-play standard solution for Dynamicweb Ecommerce which allows you to create beautiful mobile-friendly Ecommerce websites with minimal effort and almost no coding with awesome performance, wcag support and much more...
https://doc.dynamicweb.com/swift
GNU General Public License v3.0
21 stars 17 forks source link

Uncaught (in promise) TypeError when adding addToFavorites button on productslider for frontpage #9

Closed BeatRax closed 2 years ago

BeatRax commented 2 years ago

Trying to add a addToFavorites button on the productSlider on the frontpage. Getting the following error running a Swift 1.5.0 and DW 9.13.0 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'getAttribute')

I have added the exact same code from productSlider file into my own produtsliderCustom file since I had to add a add to cart functionality and the add to fav.

in the console the errors are image image

This snippet call the toggleFavorites.cshtml file that triggers the event in the button.

if (!anonymousUser && product.VariantInfo.VariantInfo == null) {

@RenderPartial("Components/ToggleFavorite.cshtml", product, favoriteParameters)
}

Hope this is enough to go on !

misterwinther commented 2 years ago

@BeatRax Thanks for reaching out. We will look into this.

jentjohansen commented 2 years ago

@BeatRax The bug is registered, has been fixed and now send to QA

misterwinther commented 2 years ago

@BeatRax a fix is provided in https://github.com/dynamicweb/Swift/commit/cfb079774f3948d317ae8915286f7a96a90b6ab0. Please reopen this issue if the fix is not sufficient.