Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
18 kB
1
Indexable
Never
<!DOCTYPE html>
<html>
<head>
<script src="https://comprapido.net/shopify-form/DYNAMIC-DATA/state_list.js" type="module"></script>

  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css">
  <style>
    body {
      font-family: Arial, sans-serif;
      background-color: #FFFFFF;
    }
    h2 {
      color: #232F3E;
    }
    label {
      display: block;
      margin-top: 10px;
      color: #232F3E;
      font-size: 19px;
      font-weight: bold;
    }
    input[type="text"], input[type="tel"], select, button {
      width: 100%;
      padding: 12px 20px;
      margin: 8px 0;
      display: inline-block;
      border: 2px solid #000;
      box-sizing: border-box;
      font-size: 19px;
      color: #232F3E;
    }
    .row {
      display: flex;
      justify-content: space-between;
    }
    .row > div, .row-full {
      width: 100%;
    }
    .half-row {
      display: flex;
      justify-content: space-between;
    }
    .half-row > div {
      width: 48%;
    }
    .button-pulse {
      background-color: #05B800;
      color: white;
      cursor: pointer;
      font-weight: bold;
      text-transform: uppercase;
      box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.2); 
      font-size: 30px;
      border: 2px solid #000;
      border-radius: 4px;
      animation: pulse 2s infinite;
      padding: 10px 0px;
    }
    @keyframes pulse {
      0% { transform: scale(1); }
      50% { transform: scale(1.01); }
      100% { transform: scale(1); }
    }
    button i {
      margin-right: 10px;
    }
    .form-container {
      padding: 20px;
      border-radius: 6px;
      max-width: 400px;
      margin: 0 auto;
    }
    .phone-container {
      display: flex;
      align-items: center;
      margin-bottom: 8px;
    }
    .phone-prefix {
      height: 2.8em;
      line-height: 1.4em;
      font-size: 19px;
      font-weight: bold;
      color: #FFFFFF;
      background-color: #05B800;
      padding: 12px;
      border-top-left-radius: 4px;
      border-bottom-left-radius: 4px;
      border: 2px solid #000;
      border-right: none;
      width: 70px;
      text-align: center;
    }
    .phone-input {
      height: 2.8em;
      flex: 1;
      border: 2px solid #000;
      border-left: none;
      padding: 12px 20px;
      border-top-right-radius: 4px;
      border-bottom-right-radius: 4px;
      border-top-left-radius: 0;
      border-bottom-left-radius: 0;
    }
    .offer {
    position: relative;
      display: flex;
      background: white;
      align-items: center;
      margin-bottom: 20px;
      border: 1px solid #ccc;
      padding: 10px;
      border-radius: 5px;
      box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.2);
      transition: background-color 0.3s;
    }
    .offer img {
      max-width: 60px;
      margin-right: 15px;
    }
    .offer-price-value {
      font-size: 25px;
      font-weight: bold;
      color: green; /* Prezzo e valuta in verde */
      text-decoration: underline;
    }
    .offer-discount-value {
      color: red;
      font-size: 19px;
      display: block; /* Sconto su una nuova riga */
      margin-top: 5px;
    }
    .offer.selected {
      background-color: #e0f7fa;
    }
.pack-warranty {
  display: flex;
  align-items: start; /* Allinea in alto */
  padding: 15px;
  margin-bottom: 20px;
  border: 2px solid #000;
  border: 3px dashed black; 
  background-color: #fff9c4;
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.5); /* Aggiunta dell'ombra */
}

.pack-warranty img {
  width: 40px;
  margin-right: 10px; /* Spazio tra l'icona e il contenuto */
}

.pack-warranty .content {
  flex-grow: 1;
}

.pack-warranty .title {
  font-weight: bold;
  margin-bottom: 5px;
}

.pack-warranty .description {
  font-size: 14px;
  margin-bottom: 10px; /* Spazio prima del blocco prezzo */
}

.pack-warranty .price-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pack-warranty .price {
  display: flex;
  align-items: center;
  gap: 10px; /* Spazio tra prezzo vecchio e nuovo */
}

.pack-warranty .old-price {
  text-decoration: line-through;
  color: red;
  font-size: 16px;
}

.pack-warranty .new-price {
  color: green;
  font-size: 18px;
  font-weight: bold;
}

.pack-warranty .add-button {
  background-color: #05B800;
  color: white;
  cursor: pointer;
  padding: 15px 16px; /* Aggiungi un po' di padding intorno al testo */
  text-transform: uppercase;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  font-size: 80%;
  width: auto; /* Imposta la larghezza automaticamente in base al contenuto */
  white-space: nowrap; /* Impedisce al testo di andare a capo */
}
.pack-shipping {
  display: flex;
  align-items: start; /* Allinea in alto */
  padding: 15px;
  margin-bottom: 20px;
  border: 3px dashed black; /* Bordo a trattini arancione */
  border-radius: 5px;
  background-color: #FFF9C4;
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.5); /* Aggiunta dell'ombra */
}

.pack-shipping img {
  width: 40px;
  margin-right: 10px; /* Spazio tra l'icona e il contenuto */
}

.pack-shipping .content {
  flex-grow: 1;
}

.pack-shipping .title {
  font-weight: bold;
  margin-bottom: 5px;
}
.pack-shipping .description {
  font-size: 14px;
  margin-bottom: 10px; /* Spazio prima del blocco prezzo */
}

.pack-shipping .price-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pack-shipping .price {
  display: flex;
  align-items: center;
  gap: 10px; /* Spazio tra prezzo vecchio e nuovo */
}

.pack-shipping .old-price {
  text-decoration: line-through;
  color: red;
  font-size: 16px;
}

.pack-shipping .new-price {
  color: green;
  font-size: 18px;
  font-weight: bold;
}

.pack-shipping .add-button {
  background-color: #05B800;
  color: white;
  cursor: pointer;
  padding: 15px 16px; /* Aggiungi un po' di padding intorno al testo */
  text-transform: uppercase;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  font-size: 80%;
  width: auto; /* Imposta la larghezza automaticamente in base al contenuto */
  white-space: nowrap; /* Impedisce al testo di andare a capo */
}
select {
  -webkit-appearance: none; /* Rimuove lo stile predefinito nei browser WebKit */
  -moz-appearance: none; /* Rimuove lo stile predefinito nei browser Mozilla */
  appearance: none; /* Rimuove lo stile predefinito per i browser moderni */
  background-color: white; /* Sfondo bianco */
  border: 2px solid #000; /* Bordo nero */
  padding: 12px 20px; /* Spaziatura interna */
  font-size: 19px; /* Dimensione del testo */
  border-radius: 4px; /* Angoli arrotondati */
  cursor: pointer; /* Cambia il cursore a indicare che è cliccabile */
  color: #232F3E; /* Colore del testo */
}
select option[value=""][disabled] {
  color: gray; /* Sostituisci con il codice colore grigio che preferisci */
}

/* Nascondere la freccia predefinita in Windows */
select::-ms-expand {
  display: none;
}

/* Rende l'icona del calendario in WebKit trasparente */
select::-webkit-calendar-picker-indicator {
  opacity: 0;
}

/* Media query per dispositivi mobili, se necessario */
@media (max-width: 600px) {
  select {
    padding: 8px 15px; /* Padding più piccolo per schermi più piccoli */
    font-size: 19px; /* Dimensione del testo ridotta */
  }
}



    @media (max-width: 600px) {
      .form-container {
        max-width: 100%;
      }
      .phone-prefix {
        width: 60px;
      }
      .half-row > div {
        width: 100%;
        margin-bottom: 10px;
      }
      select {
    padding: 8px 15px; /* Padding più piccolo per schermi più piccoli */
    font-size: 19px; /* Dimensione del testo ridotta */
  }
  .select-container select {
    padding: 8px 15px; /* Padding più piccolo per schermi più piccoli */
    padding-right: 25px; /* Spazio per l'icona su schermi piccoli */
    font-size: 19px; /* Dimensione del testo ridotta */
  }
    }
    
  .button-pulse .subtext {
  display: block;
  color: white;
  font-size: 14px; /* Regola la dimensione del font secondo necessità */
  font-weight: normal;
  margin-top: 5px; /* Aggiungi spazio sopra il sottotitolo */
}
.best-seller-icon {
  position: absolute;
  top: -12px; /* Regola queste due proprietà per posizionare l'icona esattamente dove vuoi */
  left: 10px;
  background-color: #FF9900; /* Colore dell'oro per lo sfondo */
  color: black; /* Colore del testo */
  padding: 5px;
  color: white;
  font-size: 14px;
  border-radius: 5px;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3); /* Ombra opzionale */
}
.best-seller-icon2 {
  position: absolute;
  top: -12px; /* Regola queste due proprietà per posizionare l'icona esattamente dove vuoi */
  left: 10px;
  background-color: #05B800; /* Colore dell'oro per lo sfondo */
  color: black; /* Colore del testo */
  padding: 5px;
  color: white;
  font-size: 14px;
  border-radius: 5px;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3); /* Ombra opzionale */
}
.whatsapp-icon {
  display: inline-block;
  background: url('/big-form/back-corrector/pics/whatsapp.png') no-repeat center center;
  width: 20px; /* Regola la grandezza */
  height: 20px; /* Regola la grandezza */
  background-size: contain;
  vertical-align: middle;
  margin-right: 0px;
}
.address-container {
  border: 2px dashed gold; /* Bordo a trattini oro */
  background-color: #FFF9C4; /* Sfondo di colore #FFF9C4 */
  padding: 10px; /* Spaziatura interna */
  margin-top: 5px; /* Margine superiore per distanziarlo dall'input */
  text-align: center; /* Centra il testo all'interno del contenitore */
}

.address-note {
  font-size: 14px; /* Regola la grandezza del testo */
  color: #232F3E;
}




  </style>
</head>
<body>
 
<div class="form-container">
  <form action="/shopify-form/collana-cruz-oro/submit.php" method="post">
    <div class="row">
      <div>
        <label for="nombre">Nombre *</label>
        <input type="text" id="nombre" name="nombre" placeholder="Ej. Juan" required>
      </div>
      <div style="width: 4%;"></div>
      <div>
        <label for="cognome">Apellido *</label>
        <input type="text" id="cognome" name="cognome" placeholder="Ej. Pérez" required>
      </div>
    </div>

    <label for="phone"><span class="whatsapp-icon"></span> Movil / Whatsapp *</label>
    <div class="phone-container">
      <span class="phone-prefix">+52</span>
      <input type="tel" id="phone" name="phone" pattern="[0-9]{10}" title="Ingrese un número de teléfono de 10 dígitos" placeholder="Ej. 5851021331" class="phone-input" required>
    </div>

    <label for="address">Dirección (Calle / No. Exterior / No. Interior / Entre Calles / Referencias) *</label>
    <input type="text" id="address" name="address" placeholder="Ej. Av. Resplandor 216, Las Nubes" required>
    <div class="address-container">
  <div class="address-note">EJEMPLO: Calle, AV, Andador, Cerrada, Fraccionamiento, etc. Número exterior, Número interior si se tiene.</div>
</div>


    <div class="row-full">
      <label for="departamento">Estado *</label>
     <select id="departamento" name="departamento" required>
  <option value="" disabled selected>Haz clic para seleccionar ▿</option>
  <!-- Le opzioni saranno aggiunte dinamicamente -->
</select>


    </div>
    <div class="row-full">
<label for="ciudad">Municipio/Delegacion *</label>
<select id="ciudad" name="ciudad" required>
  <option value="" disabled selected>Haz clic para seleccionar ▿</option>
  <!-- Le opzioni di Ciudad saranno aggiunte dinamicamente -->
</select>
</div>

    <div class="row-full">
      <div>
        <label for="postal">Código Postal *</label>
        <input type="text" id="postal" name="postal" placeholder="Ej. 97259" required>
      </div>
    </div>

    <label for="offers">Selecciona la oferta:</label>
    <div class="offers-container" id="offers">
      <!-- Aggiungo l'evento onclick per cambiare lo sfondo quando selezionato -->
  <div class="offer selected" onclick="selectOffer(this, 'offer1')">
  <input type="radio" id="offer1" name="offer" value="offer1" required checked>
  <label for="offer1" style="display: flex; align-items: center;">
    <img src="/shopify-form/collana-cruz-oro/pics/1.png" alt="Oferta 1">
    <div>
      1x Collar Cruz <span class="offer-price-value">595$</span>
      <span class="offer-discount-value"><del>1190$</del> (-50%)</span>
    </div>
  </label>
</div>

<div class="offer" onclick="selectOffer(this, 'offer2')">
  <span class="best-seller-icon">MÁS VENDIDO</span>
  <input type="radio" id="offer2" name="offer" value="offer2" required>
  <label for="offer2" style="display: flex; align-items: center;">
    <img src="/shopify-form/collana-cruz-oro/pics/2.png" alt="Oferta 2">
    <div>
      2x Collar Cruz <span class="offer-price-value">895$</span>
      <span class="offer-discount-value"><del>2380$</del> (-65%)</span>
    </div>
  </label>
</div>

<div class="offer" onclick="selectOffer(this, 'offer3')">
<span class="best-seller-icon2">MÁS CONVENIENTE</span>
  <input type="radio" id="offer3" name="offer" value="offer3" required>
  <label for="offer3" style="display: flex; align-items: center;">
    <img src="/shopify-form/collana-cruz-oro/pics/3.png" alt="Oferta 3">
    <div>
      3x Collar Cruz <span class="offer-price-value">1095$</span>
      <span class="offer-discount-value"><del>3570$</del> (-75%)</span>
    </div>
  </label>
</div>


    </div>
  <div class="pack-warranty">
  <img src="/fullcodes-form/foot-massager/pics/shield.png" alt="Pack Warranty Icon">
  <div class="content">
    <div class="title">Seguro de paquete</div>
    <div class="description">
      Si el producto en la confección está dañado, lo reenviaremos sin dudarlo.
    </div>
    <div class="price-container">
      <div class="price">
        <span class="old-price">100$</span>
        <span class="new-price">45$</span>
      </div>
      <input type="hidden" id="warranty" name="warranty" value="no">
      <button type="button" class="add-button" onclick="toggleWarrantySelection(this)">Añadir</button>
    </div>
  </div>
</div>

<div>
  <div class="pack-shipping">
  <img src="/big-form/back-corrector/pics/fast-delivery.png" alt="Shipping Icon">
  <div class="content">
    <div class="title">Envio Premium</div>
    <div class="description">
      Tendrás prioridad sobre todos los demás pedidos pendientes, recibirás el paquete en el menor tiempo posible.
    </div>
    <div class="price-container">
      <div class="price">
        <span class="old-price">60$</span>
        <span class="new-price">29$</span>
      </div>
      <input type="hidden" id="shipping" name="shipping" value="no">
      <button type="button" class="add-button" onclick="toggleShippingSelection(this)">Añadir</button>
    </div>
  </div>
</div>

   <button type="submit" class="button-pulse">
  <i class="fas fa-shopping-cart"></i>ORDENAR
  <br>
  <span class="subtext">Pago contra entrega</span>
</button>


  </form>
</div>

<script>
function selectOffer(element, offerId) {
  // Rimuovi la classe 'selected' da tutte le offerte
  var offers = document.getElementsByClassName('offer');
  for (var i = 0; i < offers.length; i++) {
    offers[i].classList.remove('selected');
  }

  // Aggiungi la classe 'selected' all'offerta cliccata
  element.classList.add('selected');

  // Seleziona l'input radio corrispondente
  document.getElementById(offerId).checked = true;
}
</script>

<script>
 function toggleWarrantySelection(button) {
  var warrantyInput = document.getElementById('warranty');
  if (warrantyInput.value === 'no') {
    warrantyInput.value = 'yes';
    button.innerHTML = '&#10004; añadido'; // Testo aggiornato per indicare che la garanzia è stata aggiunta
  } else {
    warrantyInput.value = 'no';
    button.innerHTML = 'Añadir'; // Testo originale
  }
}


</script>
<script>
 function toggleShippingSelection(button) {
  var shippingInput = document.getElementById('shipping');
  if (shippingInput.value === 'no') {
    shippingInput.value = 'yes';
    button.innerHTML = '&#10004; añadido'; // Testo aggiornato per indicare che la garanzia è stata aggiunta
  } else {
    shippingInput.value = 'no';
    button.innerHTML = 'Añadir'; // Testo originale
  }
}


</script>

<script type="module">
  import { departamentoList, departamentoCiudades } from 'https://comprapido.net/shopify-form/DYNAMIC-DATA/state_list.js';

  function initializeDepartamentoOptions() {
    const departamentoSelect = document.getElementById("departamento");

    departamentoList.forEach(({ value, label }) => {
      const option = document.createElement("option");
      option.value = value;
      option.textContent = label;
      departamentoSelect.appendChild(option);
    });
  }

  // Chiamare la funzione all'avvio
  document.addEventListener('DOMContentLoaded', (event) => {
    initializeDepartamentoOptions();
    updateCiudadOptions();  // Assicurati che questa funzione sia definita
  });
// Funzione per aggiornare le opzioni di ciudad in base al departamento selezionato
function updateCiudadOptions() {
  const departamentoSelect = document.getElementById("departamento");
  const ciudadSelect = document.getElementById("ciudad");
  
  // Pulisci le opzioni esistenti in ciudad
  ciudadSelect.innerHTML = "<option value='' disabled selected>Haz clic para seleccionar ▿</option>";

  // Ottieni le città corrispondenti al departamento selezionato
  const selectedDepartamento = departamentoSelect.value;
  const ciudades = departamentoCiudades[selectedDepartamento];

  // Aggiungi una nuova opzione per ogni ciudad
  ciudades.forEach(ciudad => {
    const option = document.createElement("option");
    option.value = ciudad.replace(/\s+/g, '_').toLowerCase();
    option.textContent = ciudad;
    ciudadSelect.appendChild(option);
  });
}

// Aggiungi un event listener al select di departamento
document.getElementById("departamento").addEventListener("change", updateCiudadOptions);
</script>



 
</body>
</html>
Leave a Comment