{"id":316,"date":"2025-01-28T16:50:58","date_gmt":"2025-01-28T16:50:58","guid":{"rendered":"https:\/\/kenyalinkconsolidators.com?page_id=316"},"modified":"2025-04-30T23:15:48","modified_gmt":"2025-04-30T23:15:48","slug":"tester","status":"publish","type":"page","link":"https:\/\/kenyalinkconsolidators.com\/main\/tester","title":{"rendered":"Tester"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"316\" class=\"elementor elementor-316\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-2932090 e-flex e-con-boxed e-con e-parent\" data-id=\"2932090\" data-element_type=\"container\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t<div class=\"elementor-element elementor-element-736a649 e-con-full e-flex e-con e-child\" data-id=\"736a649\" data-element_type=\"container\">\n\t\t<div class=\"elementor-element elementor-element-3965d5a e-con-full e-flex e-con e-child\" data-id=\"3965d5a\" data-element_type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-d2add82 elementor-widget elementor-widget-heading\" data-id=\"d2add82\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Add Your Heading Text Here<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-bd3149f elementor-widget elementor-widget-html\" data-id=\"bd3149f\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"cost-calculator\">\r\n    <table>\r\n        <tr>\r\n            <th>Dimension<\/th>\r\n            <th>Value<\/th>\r\n        <\/tr>\r\n        <tr>\r\n            <td>Length (inches)<\/td>\r\n            <td><input type=\"number\" id=\"length\" step=\"0.01\"><\/td>\r\n        <\/tr>\r\n        <tr>\r\n            <td>Width (inches)<\/td>\r\n            <td><input type=\"number\" id=\"width\" step=\"0.01\"><\/td>\r\n        <\/tr>\r\n        <tr>\r\n            <td>Height (inches)<\/td>\r\n            <td><input type=\"number\" id=\"height\" step=\"0.01\"><\/td>\r\n        <\/tr>\r\n        <tr>\r\n            <td>Weight (KG)<\/td>\r\n            <td><input type=\"number\" id=\"weight\" step=\"0.01\"><\/td>\r\n        <\/tr>\r\n        <tr>\r\n            <td>Quantity<\/td>\r\n            <td><input type=\"number\" id=\"quantity\"><\/td>\r\n        <\/tr>\r\n    <\/table>\r\n    \r\n    <button onclick=\"calculateCost()\">Calculate Cost<\/button>\r\n    \r\n    <div id=\"result\" style=\"margin-top: 20px; font-weight: bold;\"><\/div>\r\n<\/div>\r\n\r\n<script>\r\nfunction calculateCost() {\r\n    \/\/ Get values from inputs\r\n    const length = parseFloat(document.getElementById('length').value) || 0;\r\n    const width = parseFloat(document.getElementById('width').value) || 0;\r\n    const height = parseFloat(document.getElementById('height').value) || 0;\r\n    const weight = parseFloat(document.getElementById('weight').value) || 0;\r\n    const quantity = parseInt(document.getElementById('quantity').value) || 0;\r\n    \r\n    \/\/ Calculate dimensional weight (LxWxH)\/366 (for inches to kg)\r\n    const dimensionalWeight = (length * width * height) \/ 366;\r\n    \r\n    \/\/ Use whichever is greater between actual weight and dimensional weight\r\n    const billableWeight = Math.max(weight, dimensionalWeight);\r\n    \r\n    \/\/ Calculate total cost\r\n    const ratePerKg = 15;\r\n    const totalCost = billableWeight * quantity * ratePerKg;\r\n    \r\n    \/\/ Display result\r\n    document.getElementById('result').innerHTML = \r\n        `Total Cost: $${totalCost.toFixed(2)}<br>\r\n        (Based on ${billableWeight.toFixed(2)} kg per item)`;\r\n}\r\n<\/script>\r\n\r\n<style>\r\n.cost-calculator {\r\n    padding: 20px;\r\n    max-width: 500px;\r\n    margin: 0 auto;\r\n    border: 1px solid #ddd;\r\n}\r\n\r\n.cost-calculator table {\r\n    width: 100%;\r\n    margin-bottom: 15px;\r\n}\r\n\r\n.cost-calculator input {\r\n    width: 100px;\r\n    padding: 5px;\r\n}\r\n\r\n.cost-calculator button {\r\n    background: #0073aa;\r\n    color: white;\r\n    padding: 10px 20px;\r\n    border: none;\r\n    cursor: pointer;\r\n}\r\n<\/style>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\n    <div class=\"xs_social_share_widget xs_share_url after_content \t\tmain_content  wslu-style-1 wslu-share-box-shaped wslu-fill-colored wslu-none wslu-share-horizontal wslu-theme-font-no wslu-main_content\">\n\n\t\t\n        <ul>\n\t\t\t        <\/ul>\n    <\/div> \n","protected":false},"excerpt":{"rendered":"<p>Add Your Heading Text Here Dimension Value Length (inches) Width (inches) Height (inches) Weight (KG) Quantity Calculate Cost<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"elementor_header_footer","meta":{"footnotes":""},"class_list":["post-316","page","type-page","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/kenyalinkconsolidators.com\/main\/wp-json\/wp\/v2\/pages\/316","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kenyalinkconsolidators.com\/main\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/kenyalinkconsolidators.com\/main\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/kenyalinkconsolidators.com\/main\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kenyalinkconsolidators.com\/main\/wp-json\/wp\/v2\/comments?post=316"}],"version-history":[{"count":7,"href":"https:\/\/kenyalinkconsolidators.com\/main\/wp-json\/wp\/v2\/pages\/316\/revisions"}],"predecessor-version":[{"id":946,"href":"https:\/\/kenyalinkconsolidators.com\/main\/wp-json\/wp\/v2\/pages\/316\/revisions\/946"}],"wp:attachment":[{"href":"https:\/\/kenyalinkconsolidators.com\/main\/wp-json\/wp\/v2\/media?parent=316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}