Closed BeatRax closed 2 years ago
@BeatRax Thanks for reaching out. We will look into this.
@BeatRax The bug is registered, has been fixed and now send to QA
@BeatRax a fix is provided in https://github.com/dynamicweb/Swift/commit/cfb079774f3948d317ae8915286f7a96a90b6ab0. Please reopen this issue if the fix is not sufficient.
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
In productSlider.cshtml the code for favorites is
favoriteParameters = new Dictionary<string, object>(); if (!anonymousUser) { int defaultFavoriteListId = 0;
}
This snippet call the toggleFavorites.cshtml file that triggers the event in the button.
if (!anonymousUser && product.VariantInfo.VariantInfo == null) {
Hope this is enough to go on !