{"id":2932,"date":"2015-09-21T23:43:23","date_gmt":"2015-09-22T04:13:23","guid":{"rendered":"http:\/\/quickboxcargo.com\/?page_id=2932"},"modified":"2025-05-16T17:07:45","modified_gmt":"2025-05-16T21:07:45","slug":"calculadora-2","status":"publish","type":"page","link":"https:\/\/quickboxcargo.com\/?page_id=2932","title":{"rendered":"Calculadora"},"content":{"rendered":"<div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-1 hundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-overflow:visible;--awb-flex-wrap:wrap;\" ><div class=\"fusion-builder-row fusion-row\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-0 fusion_builder_column_1_1 1_1 fusion-one-full fusion-column-first fusion-column-last fusion-column-no-min-height\" style=\"--awb-bg-size:cover;--awb-margin-bottom:0px;\"><div class=\"fusion-column-wrapper fusion-flex-column-wrapper-legacy\"><div class=\"fusion-text fusion-text-1\"><h2>Aqu\u00ed podr\u00e1 calcular el costo aproximado del env\u00edo de sus compras. Las tarifas aqu\u00ed reflejadas son referenciales una vez aperturada su cuenta le indicaremos cual es la tarifa que le fue asignada a su cuenta:<\/h2>\n<\/div><div class=\"fusion-sep-clear\"><\/div><div class=\"fusion-separator fusion-full-width-sep\" style=\"margin-left: auto;margin-right: auto;width:100%;\"><\/div><div class=\"fusion-sep-clear\"><\/div><div class=\"fusion-clearfix\"><\/div><\/div><\/div><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-1 fusion_builder_column_1_1 1_1 fusion-one-full fusion-column-first fusion-column-last fusion-column-no-min-height\" style=\"--awb-bg-size:cover;--awb-margin-bottom:0px;\"><div class=\"fusion-column-wrapper fusion-flex-column-wrapper-legacy\"><!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  <title>Calculadora de Env\u00edos<\/title>\n  <style>\n    table {\n      border-collapse: collapse;\n      margin: 10px 0;\n    }\n\n    table th, table td {\n      border: 1px solid #ccc;\n      padding: 5px 10px;\n      text-align: left;\n    }\n\n    input {\n      width: 4ch;\n      text-align: center;\n    }\n\n    button {\n      margin-top: 10px;\n      padding: 10px 15px;\n      cursor: pointer;\n    }\n  <\/style>\n<\/head>\n<body>\n  <h2>Tarifas<\/h2>\n  <table>\n    <tr>\n      <th>Tipo de Env\u00edo<\/th>\n      <th>Tarifa<\/th>\n    <\/tr>\n    <tr>\n      <td>Aereo ($\/lb):<\/td>\n      <td><input type=\"number\" id=\"air-rate\" value=\"5.5\" \/><\/td>\n    <\/tr>\n    <tr>\n      <td>Maritimo ($\/ft\u00b3):<\/td>\n      <td><input type=\"number\" id=\"sea-rate\" value=\"32\" \/><\/td>\n    <\/tr>\n  <\/table>\n\n  <h2>Detalles del Paquete<\/h2>\n  <div id=\"boxes-container\">\n    <table>\n      <tr>\n        <th>Medidas<\/th>\n        <th>Valor en Pulgadas<\/th>\n      <\/tr>\n      <tr>\n        <td>Largo:<\/td>\n        <td><input type=\"number\" class=\"length\" placeholder=\"in\" inputmode=\"numeric\" \/><\/td>\n      <\/tr>\n      <tr>\n        <td>Ancho:<\/td>\n        <td><input type=\"number\" class=\"width\" placeholder=\"in\" inputmode=\"numeric\" \/><\/td>\n      <\/tr>\n      <tr>\n        <td>Alto:<\/td>\n        <td><input type=\"number\" class=\"height\" placeholder=\"in\" inputmode=\"numeric\" \/><\/td>\n      <\/tr>\n      <tr>\n        <td>Peso en Libras:<\/td>\n        <td><input type=\"number\" class=\"weight\" placeholder=\"lbs\" inputmode=\"numeric\" \/><\/td>\n      <\/tr>\n    <\/table>\n  <\/div>\n  <button id=\"add-box\">Agregar otro Paquete<\/button>\n\n  <h3>Costos Aproximados<\/h3>\n  <p id=\"air-result\">Costo Aereo (7 dias h\u00e1biles): $0.00<\/p>\n  <p id=\"sea-result\">Costo Maritimo (30 dias h\u00e1biles): $0.00<\/p>\n  <p id=\"summary\"><\/p>\n\n  <script>\n    const boxesContainer = document.getElementById('boxes-container');\n    const airRateInput = document.getElementById('air-rate');\n    const seaRateInput = document.getElementById('sea-rate');\n    const airResult = document.getElementById('air-result');\n    const seaResult = document.getElementById('sea-result');\n\n    function calculateShipping() {\n      const airRate = parseFloat(airRateInput.value) || 0;\n      const seaRate = parseFloat(seaRateInput.value) || 0;\n\n      let totalAirCost = 0;\n      let totalSeaCost = 0;\n\n      const boxes = Array.from(boxesContainer.querySelectorAll('table'));\n      boxes.forEach(box => {\n        const length = parseFloat(box.querySelector('.length').value) || 0;\n        const width = parseFloat(box.querySelector('.width').value) || 0;\n        const height = parseFloat(box.querySelector('.height').value) || 0;\n        const weight = parseFloat(box.querySelector('.weight').value) || 0;\n\n        \/\/ Air shipping calculations\n        const airVolumetricWeight = (length * width * height) \/ 166;\n        const airChargeableWeight = Math.max(airVolumetricWeight, weight, 5); \/\/ Minimum 5 lbs\n        totalAirCost += airChargeableWeight * airRate;\n\n        \/\/ Sea shipping calculations\n        let boxVolumeCubicFeet = (length * width * height) \/ 1728;\n        boxVolumeCubicFeet = Math.max(boxVolumeCubicFeet, 2); \/\/ Minimum 1 ft\u00b3\n        totalSeaCost += boxVolumeCubicFeet * seaRate;\n      });\n\n      \/\/ Display results\n      airResult.textContent = `Air Shipping Cost: $${totalAirCost.toFixed(2)}`;\n      seaResult.textContent = `Sea Shipping Cost: $${totalSeaCost.toFixed(2)}`;\n    }\n\n    function addBox() {\n      const newBox = document.createElement('table');\n      newBox.innerHTML = `\n        <tr>\n          <th>Medidas<\/th>\n          <th>Valor en Pulgadas (in)<\/th>\n        <\/tr>\n        <tr>\n          <td>Largo:<\/td>\n          <td><input type=\"number\" class=\"length\" placeholder=\"in\" inputmode=\"numeric\"\/><\/td>\n        <\/tr>\n        <tr>\n          <td>Ancho:<\/td>\n          <td><input type=\"number\" class=\"width\" placeholder=\"in\" inputmode=\"numeric\" \/><\/td>\n        <\/tr>\n        <tr>\n          <td>Alto:<\/td>\n          <td><input type=\"number\" class=\"height\" placeholder=\"in\" inputmode=\"numeric\" \/><\/td>\n        <\/tr>\n        <tr>\n          <td>Peso en Libras:<\/td>\n          <td><input type=\"number\" class=\"weight\" placeholder=\"lbs\" inputmode=\"numeric\" \/><\/td>\n        <\/tr>\n      `;\n      boxesContainer.appendChild(newBox);\n      attachEventListeners(newBox);\n    }\n\n    function attachEventListeners(container) {\n      const inputs = container.querySelectorAll('input');\n      inputs.forEach(input => {\n        input.addEventListener('input', calculateShipping);\n      });\n    }\n\n    \/\/ Add event listeners to the first box\n    attachEventListeners(document);\n\n    \/\/ Add event listener for the \"Add Another Box\" button\n    document.getElementById('add-box').addEventListener('click', addBox);\n\n    \/\/ Add event listeners for rate inputs\n    airRateInput.addEventListener('input', calculateShipping);\n    seaRateInput.addEventListener('input', calculateShipping);\n  <\/script>\n<\/body>\n<\/html><div class=\"fusion-clearfix\"><\/div><\/div><\/div><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"_joinchat":[],"footnotes":""},"class_list":["post-2932","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/quickboxcargo.com\/index.php?rest_route=\/wp\/v2\/pages\/2932","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/quickboxcargo.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/quickboxcargo.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/quickboxcargo.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/quickboxcargo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2932"}],"version-history":[{"count":10,"href":"https:\/\/quickboxcargo.com\/index.php?rest_route=\/wp\/v2\/pages\/2932\/revisions"}],"predecessor-version":[{"id":13205,"href":"https:\/\/quickboxcargo.com\/index.php?rest_route=\/wp\/v2\/pages\/2932\/revisions\/13205"}],"wp:attachment":[{"href":"https:\/\/quickboxcargo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2932"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}