diff --git a/index.html b/index.html index 9e04e38..3313c6f 100644 --- a/index.html +++ b/index.html @@ -7,7 +7,7 @@ Toddler Shop - +
@@ -17,59 +17,34 @@€ 0
diff --git a/scripts/main.js b/scripts/main.js index 7c638e0..fc66939 100644 --- a/scripts/main.js +++ b/scripts/main.js @@ -38,7 +38,7 @@ async function loadProducts() { barcode_input.value = "" - const product_placeholders = document.getElementsByClassName('product_placeholder') + const product_placeholders = document.getElementsByClassName('product_col') const chosen_product_placeholder = product_placeholders[to_fill_product_index] const image_product = chosen_product_placeholder.getElementsByClassName('product_image')[0] const price_product = chosen_product_placeholder.getElementsByClassName('product_price')[0] @@ -46,7 +46,9 @@ async function loadProducts() { total_price += chosen_product.price - image_product.setAttribute('href', api_url + "/icons/" + chosen_product.image_filename); + console.log(image_product) + + image_product.setAttribute('src', api_url + "/icons/" + chosen_product.image_filename); price_product.textContent = "\u20AC " + chosen_product.price total_price_holder.textContent = "\u20AC " + total_price