diff --git a/LaboratorioIV/JS/e-commerce2022/client/js/index.js b/LaboratorioIV/JS/e-commerce2022/client/js/index.js deleted file mode 100644 index 65f0500..0000000 --- a/LaboratorioIV/JS/e-commerce2022/client/js/index.js +++ /dev/null @@ -1,27 +0,0 @@ -const shopContent = document.getElementById("shopContent"); - -productos.forEach((product) => { - const content = document.createElement("div"); - content.innerHTML = ` - -
${product.price}
` - ; - shopContent.append(content); - -const buyButton = document.createElement("button"); -buyButton.innerText = "Comprar"; - -content.append(buyButton); - -buyButton.addEventListener("click", () => { - cart.push({ - id: product.id, - productName: product.productName, - price: product.price, - quanty: product.quanty, - img: product.img, - }) - console.log(cart) -}) -}); diff --git a/LaboratorioIV/JS/e-commerce2022/client/js/products.js b/LaboratorioIV/JS/e-commerce2022/client/js/products.js deleted file mode 100644 index 94ed5fd..0000000 --- a/LaboratorioIV/JS/e-commerce2022/client/js/products.js +++ /dev/null @@ -1,30 +0,0 @@ -const productos = [ - { - id: 1, - productName: "Banana", - price: 400, - quanty: 1, - img: "/client/media/banana.png" - }, - { - id: 2, - productName: "Leche", - price: 500, - quanty: 1, - img: "/client/media/leche.png" - }, - { - id: 3, - productName: "Pollo", - price: 800, - quanty: 1, - img: "/client/media/pollo.png" - }, - { - id: 4, - productName: "Mayonesa", - price: 200, - quanty: 1, - img: "/client/media/mayonesa.png" - }, -] \ No newline at end of file diff --git a/LaboratorioIV/JS/e-commerce2022/client/media/banana.png b/LaboratorioIV/JS/e-commerce2022/client/media/banana.png deleted file mode 100644 index 41ae38e..0000000 Binary files a/LaboratorioIV/JS/e-commerce2022/client/media/banana.png and /dev/null differ diff --git a/LaboratorioIV/JS/e-commerce2022/client/media/index.html b/LaboratorioIV/JS/e-commerce2022/client/media/index.html deleted file mode 100644 index 63c2b23..0000000 --- a/LaboratorioIV/JS/e-commerce2022/client/media/index.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - -${product.price} $
+ `; + shopContent.append(content); + + const buyButton = document.createElement('button'); + buyButton.innerText = "Comprar"; + + content.append(buyButton); + + buyButton.addEventListener("click", () => { + cart.push({ + id: product.id, + productName: product.productName, + price: product.price, + quanty: product.quanty, + img: product.img, + }) + console.log(cart) + }) + +}); \ No newline at end of file diff --git a/LaboratorioIV/JavaScript/Clase 1/e-commerce/client/js/products.js b/LaboratorioIV/JavaScript/Clase 1/e-commerce/client/js/products.js new file mode 100644 index 0000000..9dccedb --- /dev/null +++ b/LaboratorioIV/JavaScript/Clase 1/e-commerce/client/js/products.js @@ -0,0 +1,61 @@ +const productos = [ + { + id: 1, + productName: "Brochette de verduras", + price: 2800, + quanty: 1, + img: "/client/media/brochette_de_verduras.png", + }, + { + id: 2, + productName: "Hamburguesa de soja", + price: 2500, + quanty: 1, + img: "/client/media/hamburguesa_de_soja.png", + }, + { + id: 3, + productName: "Salteado de verduras", + price: 1500, + quanty: 1, + img: "/client/media/salteado_de_verduras.png", + }, + + + { + id: 4, + productName: "Proteico de vegetales", + price: 2800, + quanty: 1, + img: "/client/media/Proteico_vegetales.jpg", + }, + { + id: 5, + productName: "Sushi con degustación de vinos (para compartir)", + price: 3200, + quanty: 1, + img: "/client/media/Sushi_degustación_vinos.jpg", + }, + { + id: 6, + productName: "Sushi y vino", + price: 2800, + quanty: 1, + img: "/client/media/sushi_vino.jpg", + }, + { + id: 7, + productName: "Mix vegetales y queso", + price: 2100, + quanty: 1, + img: "/client/media/Mix_vegetales_queso.jpg", + }, + { + id: 8, + productName: "Ensalada proteica con frutos rojos o piña", + price: 2000, + quanty: 1, + img: "/client/media/Ensalada_proteica_con_frutosRojos_o_piña.jpg", + }, + +]; diff --git "a/LaboratorioIV/JavaScript/Clase 1/e-commerce/client/media/Ensalada_proteica_con_frutosRojos_o_pi\303\261a.jpg" "b/LaboratorioIV/JavaScript/Clase 1/e-commerce/client/media/Ensalada_proteica_con_frutosRojos_o_pi\303\261a.jpg" new file mode 100644 index 0000000..4319c52 Binary files /dev/null and "b/LaboratorioIV/JavaScript/Clase 1/e-commerce/client/media/Ensalada_proteica_con_frutosRojos_o_pi\303\261a.jpg" differ diff --git a/LaboratorioIV/JavaScript/Clase 1/e-commerce/client/media/Mix_vegetales_queso.jpg b/LaboratorioIV/JavaScript/Clase 1/e-commerce/client/media/Mix_vegetales_queso.jpg new file mode 100644 index 0000000..d6ec1a1 Binary files /dev/null and b/LaboratorioIV/JavaScript/Clase 1/e-commerce/client/media/Mix_vegetales_queso.jpg differ diff --git a/LaboratorioIV/JavaScript/Clase 1/e-commerce/client/media/Proteico_vegetales.jpg b/LaboratorioIV/JavaScript/Clase 1/e-commerce/client/media/Proteico_vegetales.jpg new file mode 100644 index 0000000..3790380 Binary files /dev/null and b/LaboratorioIV/JavaScript/Clase 1/e-commerce/client/media/Proteico_vegetales.jpg differ diff --git "a/LaboratorioIV/JavaScript/Clase 1/e-commerce/client/media/Sushi_degustaci\303\263n_vinos.jpg" "b/LaboratorioIV/JavaScript/Clase 1/e-commerce/client/media/Sushi_degustaci\303\263n_vinos.jpg" new file mode 100644 index 0000000..2095a17 Binary files /dev/null and "b/LaboratorioIV/JavaScript/Clase 1/e-commerce/client/media/Sushi_degustaci\303\263n_vinos.jpg" differ diff --git a/LaboratorioIV/JavaScript/Clase 1/e-commerce/client/media/brochette_de_verduras.png b/LaboratorioIV/JavaScript/Clase 1/e-commerce/client/media/brochette_de_verduras.png new file mode 100644 index 0000000..a636222 Binary files /dev/null and b/LaboratorioIV/JavaScript/Clase 1/e-commerce/client/media/brochette_de_verduras.png differ diff --git a/LaboratorioIV/JavaScript/Clase 1/e-commerce/client/media/hamburguesa_de_soja.png b/LaboratorioIV/JavaScript/Clase 1/e-commerce/client/media/hamburguesa_de_soja.png new file mode 100644 index 0000000..71a8555 Binary files /dev/null and b/LaboratorioIV/JavaScript/Clase 1/e-commerce/client/media/hamburguesa_de_soja.png differ diff --git a/LaboratorioIV/JavaScript/Clase 1/e-commerce/client/media/index.html b/LaboratorioIV/JavaScript/Clase 1/e-commerce/client/media/index.html new file mode 100644 index 0000000..b36ee76 --- /dev/null +++ b/LaboratorioIV/JavaScript/Clase 1/e-commerce/client/media/index.html @@ -0,0 +1,24 @@ + + + + + + + +${product.price} $
+ `; + shopContent.append(content); + + const buyButton = document.createElement('button'); + buyButton.innerText = "Comprar"; + + content.append(buyButton); + + buyButton.addEventListener("click", () => { + cart.push({ + id: product.id, + productName: product.productName, + price: product.price, + quanty: product.quanty, + img: product.img, + }) + console.log(cart) + }) + +}); \ No newline at end of file diff --git a/LaboratorioIV/JavaScript/Clase2/e-commerce/client/js/products.js b/LaboratorioIV/JavaScript/Clase2/e-commerce/client/js/products.js new file mode 100644 index 0000000..9dccedb --- /dev/null +++ b/LaboratorioIV/JavaScript/Clase2/e-commerce/client/js/products.js @@ -0,0 +1,61 @@ +const productos = [ + { + id: 1, + productName: "Brochette de verduras", + price: 2800, + quanty: 1, + img: "/client/media/brochette_de_verduras.png", + }, + { + id: 2, + productName: "Hamburguesa de soja", + price: 2500, + quanty: 1, + img: "/client/media/hamburguesa_de_soja.png", + }, + { + id: 3, + productName: "Salteado de verduras", + price: 1500, + quanty: 1, + img: "/client/media/salteado_de_verduras.png", + }, + + + { + id: 4, + productName: "Proteico de vegetales", + price: 2800, + quanty: 1, + img: "/client/media/Proteico_vegetales.jpg", + }, + { + id: 5, + productName: "Sushi con degustación de vinos (para compartir)", + price: 3200, + quanty: 1, + img: "/client/media/Sushi_degustación_vinos.jpg", + }, + { + id: 6, + productName: "Sushi y vino", + price: 2800, + quanty: 1, + img: "/client/media/sushi_vino.jpg", + }, + { + id: 7, + productName: "Mix vegetales y queso", + price: 2100, + quanty: 1, + img: "/client/media/Mix_vegetales_queso.jpg", + }, + { + id: 8, + productName: "Ensalada proteica con frutos rojos o piña", + price: 2000, + quanty: 1, + img: "/client/media/Ensalada_proteica_con_frutosRojos_o_piña.jpg", + }, + +]; diff --git "a/LaboratorioIV/JavaScript/Clase2/e-commerce/client/media/Ensalada_proteica_con_frutosRojos_o_pi\303\261a.jpg" "b/LaboratorioIV/JavaScript/Clase2/e-commerce/client/media/Ensalada_proteica_con_frutosRojos_o_pi\303\261a.jpg" new file mode 100644 index 0000000..4319c52 Binary files /dev/null and "b/LaboratorioIV/JavaScript/Clase2/e-commerce/client/media/Ensalada_proteica_con_frutosRojos_o_pi\303\261a.jpg" differ diff --git a/LaboratorioIV/JavaScript/Clase2/e-commerce/client/media/Mix_vegetales_queso.jpg b/LaboratorioIV/JavaScript/Clase2/e-commerce/client/media/Mix_vegetales_queso.jpg new file mode 100644 index 0000000..d6ec1a1 Binary files /dev/null and b/LaboratorioIV/JavaScript/Clase2/e-commerce/client/media/Mix_vegetales_queso.jpg differ diff --git a/LaboratorioIV/JavaScript/Clase2/e-commerce/client/media/Proteico_vegetales.jpg b/LaboratorioIV/JavaScript/Clase2/e-commerce/client/media/Proteico_vegetales.jpg new file mode 100644 index 0000000..3790380 Binary files /dev/null and b/LaboratorioIV/JavaScript/Clase2/e-commerce/client/media/Proteico_vegetales.jpg differ diff --git "a/LaboratorioIV/JavaScript/Clase2/e-commerce/client/media/Sushi_degustaci\303\263n_vinos.jpg" "b/LaboratorioIV/JavaScript/Clase2/e-commerce/client/media/Sushi_degustaci\303\263n_vinos.jpg" new file mode 100644 index 0000000..2095a17 Binary files /dev/null and "b/LaboratorioIV/JavaScript/Clase2/e-commerce/client/media/Sushi_degustaci\303\263n_vinos.jpg" differ diff --git a/LaboratorioIV/JavaScript/Clase2/e-commerce/client/media/brochette_de_verduras.png b/LaboratorioIV/JavaScript/Clase2/e-commerce/client/media/brochette_de_verduras.png new file mode 100644 index 0000000..a636222 Binary files /dev/null and b/LaboratorioIV/JavaScript/Clase2/e-commerce/client/media/brochette_de_verduras.png differ diff --git a/LaboratorioIV/JavaScript/Clase2/e-commerce/client/media/hamburguesa_de_soja.png b/LaboratorioIV/JavaScript/Clase2/e-commerce/client/media/hamburguesa_de_soja.png new file mode 100644 index 0000000..71a8555 Binary files /dev/null and b/LaboratorioIV/JavaScript/Clase2/e-commerce/client/media/hamburguesa_de_soja.png differ diff --git a/LaboratorioIV/JavaScript/Clase2/e-commerce/client/media/index.html b/LaboratorioIV/JavaScript/Clase2/e-commerce/client/media/index.html new file mode 100644 index 0000000..b36ee76 --- /dev/null +++ b/LaboratorioIV/JavaScript/Clase2/e-commerce/client/media/index.html @@ -0,0 +1,24 @@ + + + + + + + +${product.price} $
+ `; + shopContent.append(content); + + const buyButton = document.createElement('button'); + buyButton.innerText = "Comprar"; + + content.append(buyButton); + + buyButton.addEventListener("click", () => { + const repeat = cart.some((repeatProduct) => repeatProduct.id === product.id); + if (repeat) { + cart.map((prod) => { + if (prod.id === product.id){ + prod.quanty++; + } + }); + }else{ + cart.push({ + id: product.id, + productName: product.productName, + price: product.price, + quanty: product.quanty, + img: product.img, + }); + } + //console.log(cart) + }); +}); \ No newline at end of file diff --git a/LaboratorioIV/JavaScript/Clase3/e-commerce/client/js/products.js b/LaboratorioIV/JavaScript/Clase3/e-commerce/client/js/products.js new file mode 100644 index 0000000..9dccedb --- /dev/null +++ b/LaboratorioIV/JavaScript/Clase3/e-commerce/client/js/products.js @@ -0,0 +1,61 @@ +const productos = [ + { + id: 1, + productName: "Brochette de verduras", + price: 2800, + quanty: 1, + img: "/client/media/brochette_de_verduras.png", + }, + { + id: 2, + productName: "Hamburguesa de soja", + price: 2500, + quanty: 1, + img: "/client/media/hamburguesa_de_soja.png", + }, + { + id: 3, + productName: "Salteado de verduras", + price: 1500, + quanty: 1, + img: "/client/media/salteado_de_verduras.png", + }, + + + { + id: 4, + productName: "Proteico de vegetales", + price: 2800, + quanty: 1, + img: "/client/media/Proteico_vegetales.jpg", + }, + { + id: 5, + productName: "Sushi con degustación de vinos (para compartir)", + price: 3200, + quanty: 1, + img: "/client/media/Sushi_degustación_vinos.jpg", + }, + { + id: 6, + productName: "Sushi y vino", + price: 2800, + quanty: 1, + img: "/client/media/sushi_vino.jpg", + }, + { + id: 7, + productName: "Mix vegetales y queso", + price: 2100, + quanty: 1, + img: "/client/media/Mix_vegetales_queso.jpg", + }, + { + id: 8, + productName: "Ensalada proteica con frutos rojos o piña", + price: 2000, + quanty: 1, + img: "/client/media/Ensalada_proteica_con_frutosRojos_o_piña.jpg", + }, + +]; diff --git "a/LaboratorioIV/JavaScript/Clase3/e-commerce/client/media/Ensalada_proteica_con_frutosRojos_o_pi\303\261a.jpg" "b/LaboratorioIV/JavaScript/Clase3/e-commerce/client/media/Ensalada_proteica_con_frutosRojos_o_pi\303\261a.jpg" new file mode 100644 index 0000000..4319c52 Binary files /dev/null and "b/LaboratorioIV/JavaScript/Clase3/e-commerce/client/media/Ensalada_proteica_con_frutosRojos_o_pi\303\261a.jpg" differ diff --git a/LaboratorioIV/JavaScript/Clase3/e-commerce/client/media/Mix_vegetales_queso.jpg b/LaboratorioIV/JavaScript/Clase3/e-commerce/client/media/Mix_vegetales_queso.jpg new file mode 100644 index 0000000..d6ec1a1 Binary files /dev/null and b/LaboratorioIV/JavaScript/Clase3/e-commerce/client/media/Mix_vegetales_queso.jpg differ diff --git a/LaboratorioIV/JavaScript/Clase3/e-commerce/client/media/Proteico_vegetales.jpg b/LaboratorioIV/JavaScript/Clase3/e-commerce/client/media/Proteico_vegetales.jpg new file mode 100644 index 0000000..3790380 Binary files /dev/null and b/LaboratorioIV/JavaScript/Clase3/e-commerce/client/media/Proteico_vegetales.jpg differ diff --git "a/LaboratorioIV/JavaScript/Clase3/e-commerce/client/media/Sushi_degustaci\303\263n_vinos.jpg" "b/LaboratorioIV/JavaScript/Clase3/e-commerce/client/media/Sushi_degustaci\303\263n_vinos.jpg" new file mode 100644 index 0000000..2095a17 Binary files /dev/null and "b/LaboratorioIV/JavaScript/Clase3/e-commerce/client/media/Sushi_degustaci\303\263n_vinos.jpg" differ diff --git a/LaboratorioIV/JavaScript/Clase3/e-commerce/client/media/brochette_de_verduras.png b/LaboratorioIV/JavaScript/Clase3/e-commerce/client/media/brochette_de_verduras.png new file mode 100644 index 0000000..a636222 Binary files /dev/null and b/LaboratorioIV/JavaScript/Clase3/e-commerce/client/media/brochette_de_verduras.png differ diff --git a/LaboratorioIV/JavaScript/Clase3/e-commerce/client/media/hamburguesa_de_soja.png b/LaboratorioIV/JavaScript/Clase3/e-commerce/client/media/hamburguesa_de_soja.png new file mode 100644 index 0000000..71a8555 Binary files /dev/null and b/LaboratorioIV/JavaScript/Clase3/e-commerce/client/media/hamburguesa_de_soja.png differ diff --git a/LaboratorioIV/JavaScript/Clase3/e-commerce/client/media/index.html b/LaboratorioIV/JavaScript/Clase3/e-commerce/client/media/index.html new file mode 100644 index 0000000..4a2f605 --- /dev/null +++ b/LaboratorioIV/JavaScript/Clase3/e-commerce/client/media/index.html @@ -0,0 +1,26 @@ + + + + + + + +${product.price} $
+ `; + shopContent.append(content); + + const buyButton = document.createElement('button'); + buyButton.innerText = "Comprar"; + + content.append(buyButton); + + buyButton.addEventListener("click", () => { + const repeat = cart.some((repeatProduct) => repeatProduct.id === product.id); + if (repeat) { + cart.map((prod) => { + if (prod.id === product.id){ + prod.quanty++; + displayCartCounter(); + } + }); + }else{ + cart.push({ + id: product.id, + productName: product.productName, + price: product.price, + quanty: product.quanty, + img: product.img, + }); + displayCartCounter(); + } + //console.log(cart) + }); +}); diff --git a/LaboratorioIV/JavaScript/Clase4/e-commerce/client/js/products.js b/LaboratorioIV/JavaScript/Clase4/e-commerce/client/js/products.js new file mode 100644 index 0000000..ec51220 --- /dev/null +++ b/LaboratorioIV/JavaScript/Clase4/e-commerce/client/js/products.js @@ -0,0 +1,63 @@ +//Leonardo Montiel +//Gustavo Ortiz +const productos = [ + { + id: 1, + productName: "Brochette de verduras", + price: 2800, + quanty: 1, + img: "/client/media/brochette_de_verduras.png", + }, + { + id: 2, + productName: "Hamburguesa de soja", + price: 2500, + quanty: 1, + img: "/client/media/hamburguesa_de_soja.png", + }, + { + id: 3, + productName: "Salteado de verduras", + price: 1500, + quanty: 1, + img: "/client/media/salteado_de_verduras.png", + }, + + + { + id: 4, + productName: "Proteico de vegetales", + price: 2800, + quanty: 1, + img: "/client/media/Proteico_vegetales.jpg", + }, + { + id: 5, + productName: "Sushi con degustación de vinos (para compartir)", + price: 3200, + quanty: 1, + img: "/client/media/Sushi_degustación_vinos.jpg", + }, + { + id: 6, + productName: "Sushi y vino", + price: 2800, + quanty: 1, + img: "/client/media/sushi_vino.jpg", + }, + { + id: 7, + productName: "Mix vegetales y queso", + price: 2100, + quanty: 1, + img: "/client/media/Mix_vegetales_queso.jpg", + }, + { + id: 8, + productName: "Ensalada proteica con frutos rojos o piña", + price: 2000, + quanty: 1, + img: "/client/media/Ensalada_proteica_con_frutosRojos_o_piña.jpg", + }, + +]; diff --git "a/LaboratorioIV/JavaScript/Clase4/e-commerce/client/media/Ensalada_proteica_con_frutosRojos_o_pi\303\261a.jpg" "b/LaboratorioIV/JavaScript/Clase4/e-commerce/client/media/Ensalada_proteica_con_frutosRojos_o_pi\303\261a.jpg" new file mode 100644 index 0000000..4319c52 Binary files /dev/null and "b/LaboratorioIV/JavaScript/Clase4/e-commerce/client/media/Ensalada_proteica_con_frutosRojos_o_pi\303\261a.jpg" differ diff --git a/LaboratorioIV/JavaScript/Clase4/e-commerce/client/media/Mix_vegetales_queso.jpg b/LaboratorioIV/JavaScript/Clase4/e-commerce/client/media/Mix_vegetales_queso.jpg new file mode 100644 index 0000000..d6ec1a1 Binary files /dev/null and b/LaboratorioIV/JavaScript/Clase4/e-commerce/client/media/Mix_vegetales_queso.jpg differ diff --git a/LaboratorioIV/JavaScript/Clase4/e-commerce/client/media/Proteico_vegetales.jpg b/LaboratorioIV/JavaScript/Clase4/e-commerce/client/media/Proteico_vegetales.jpg new file mode 100644 index 0000000..3790380 Binary files /dev/null and b/LaboratorioIV/JavaScript/Clase4/e-commerce/client/media/Proteico_vegetales.jpg differ diff --git "a/LaboratorioIV/JavaScript/Clase4/e-commerce/client/media/Sushi_degustaci\303\263n_vinos.jpg" "b/LaboratorioIV/JavaScript/Clase4/e-commerce/client/media/Sushi_degustaci\303\263n_vinos.jpg" new file mode 100644 index 0000000..2095a17 Binary files /dev/null and "b/LaboratorioIV/JavaScript/Clase4/e-commerce/client/media/Sushi_degustaci\303\263n_vinos.jpg" differ diff --git a/LaboratorioIV/JavaScript/Clase4/e-commerce/client/media/brochette_de_verduras.png b/LaboratorioIV/JavaScript/Clase4/e-commerce/client/media/brochette_de_verduras.png new file mode 100644 index 0000000..a636222 Binary files /dev/null and b/LaboratorioIV/JavaScript/Clase4/e-commerce/client/media/brochette_de_verduras.png differ diff --git a/LaboratorioIV/JavaScript/Clase4/e-commerce/client/media/hamburguesa_de_soja.png b/LaboratorioIV/JavaScript/Clase4/e-commerce/client/media/hamburguesa_de_soja.png new file mode 100644 index 0000000..71a8555 Binary files /dev/null and b/LaboratorioIV/JavaScript/Clase4/e-commerce/client/media/hamburguesa_de_soja.png differ diff --git a/LaboratorioIV/JavaScript/Clase4/e-commerce/client/media/index.html b/LaboratorioIV/JavaScript/Clase4/e-commerce/client/media/index.html new file mode 100644 index 0000000..4477b5f --- /dev/null +++ b/LaboratorioIV/JavaScript/Clase4/e-commerce/client/media/index.html @@ -0,0 +1,33 @@ +//Leonardo Montiel +//Gustavo Ortiz + + + + + + + + // SDK MercadoPago.js + +