Trying to change image/price when variant changes

Trying to change image/price when variant changes

TrendBlend
Trailblazer
315 0 33

Hello, I got this code because I got an app for my Sticky Add To Cart which does not adjust image and price on variant change. Code: Oct 01 8:19 PM - Codeshare. And im using DAWN Theme URL: MagCharge – TrendBlend

I keep having an issue that the right console logs are shwing but the prices and image are not being adjusted properly. Does someone know how I can target these PRICES and the IMAGE? Picture for clarification below:
Schermafbeelding 2024-10-01 202710.png

So I need to change the image/prices on the product page with the correct prices/image I'm getting in the code. But I don't know how to apply it to the image/prices. The Add To Cart widget shows the correct prices and image.

Selected variant: {id: 49385376612691, title: '2m Draad / Zwart / iOS Aansluiting', option1: '2m Draad', option2: 'Zwart', option3: 'iOS Aansluiting', …}
magcharge?variant=49385377038675:6670 Updated image to: //trendblend.eu/cdn/shop/files/8uYPlAUIiD5HIJZ.webp?v=1726183710
magcharge?variant=49385377038675:6683 Updated regular price to: 23.74 EUR
magcharge?variant=49385377038675:6692 Updated discounted price to: 14.24 EUR
magcharge?variant=49385377038675:6657 Variant changed: 1m Draad
magcharge?variant=49385377038675:6663 Selected variant: {id: 49385376022867, title: '1m Draad / Zwart / iOS Aansluiting', option1: '1m Draad', option2: 'Zwart', option3: 'iOS Aansluiting', …}
magcharge?variant=49385377038675:6670 Updated image to: //trendblend.eu/cdn/shop/files/LuhJGVTrLP6VhYM.webp?v=1726183640
magcharge?variant=49385377038675:6683 Updated regular price to: 22.49 EUR
magcharge?variant=49385377038675:6692 Updated discounted price to: 13.49 EUR
magcharge?variant=49385377038675:6657 Variant changed: Rood
magcharge?variant=49385377038675:6663 Selected variant: {id: 49385376153939, title: '1m Draad / Rood / iOS Aansluiting', option1: '1m Draad', option2: 'Rood', option3: 'iOS Aansluiting', …}
magcharge?variant=49385377038675:6670 Updated image to: //trendblend.eu/cdn/shop/files/VU5dlxFHz7kTt9y.webp?v=1726183706
magcharge?variant=49385377038675:6683 Updated regular price to: 22.49 EUR
magcharge?variant=49385377038675:6692 Updated discounted price to: 13.49 EUR
Replies 0 (0)