update
This commit is contained in:
@@ -26,10 +26,18 @@
|
|||||||
h2 {
|
h2 {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #262626;
|
color: #262626;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 4px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* New small centered contract name */
|
||||||
|
.contract-name {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 0.85em;
|
||||||
|
color: #666;
|
||||||
|
margin-bottom: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
.subtitle {
|
.subtitle {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
@@ -114,11 +122,18 @@
|
|||||||
.action-btn.secondary:hover {
|
.action-btn.secondary:hover {
|
||||||
background-color: #5a636a;
|
background-color: #5a636a;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.action-btn:disabled {
|
||||||
|
background-color: #ccc;
|
||||||
|
cursor: not-allowed;
|
||||||
|
transform: none;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="summary-container">
|
<div class="summary-container">
|
||||||
<h2>Check and Upgrade Your Plan</h2>
|
<h2>Check and Upgrade Your Plan</h2>
|
||||||
|
<div class="contract-name" id="contractName">Loading...</div>
|
||||||
<div class="subtitle">
|
<div class="subtitle">
|
||||||
Choose an upgrade. With this upgade you only pay for the <b>remaining days</b> of your current contract. Due to technical reasons, the <b>total price</b> will be included in the payment link sent to your email. If you don’t want to upgrade, simply don’t complete the payment. Current yearly prices are listed on our homepage, and new features will apply when you extend your contract next time.
|
Choose an upgrade. With this upgade you only pay for the <b>remaining days</b> of your current contract. Due to technical reasons, the <b>total price</b> will be included in the payment link sent to your email. If you don’t want to upgrade, simply don’t complete the payment. Current yearly prices are listed on our homepage, and new features will apply when you extend your contract next time.
|
||||||
</div>
|
</div>
|
||||||
@@ -173,7 +188,6 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// Configuration
|
|
||||||
const webhookUrl = "https://002-001-5dd6e535-4d1c-46bc-9bd9-42ad4bc5f082.odoo4projects.com/webhook/0c8536be-d175-4740-8e78-123159193b23";
|
const webhookUrl = "https://002-001-5dd6e535-4d1c-46bc-9bd9-42ad4bc5f082.odoo4projects.com/webhook/0c8536be-d175-4740-8e78-123159193b23";
|
||||||
const webhook_buy = "https://002-001-5dd6e535-4d1c-46bc-9bd9-42ad4bc5f082.odoo4projects.com/webhook/2366cc41-bfd9-41c0-b9b4-bea1e60726f1";
|
const webhook_buy = "https://002-001-5dd6e535-4d1c-46bc-9bd9-42ad4bc5f082.odoo4projects.com/webhook/2366cc41-bfd9-41c0-b9b4-bea1e60726f1";
|
||||||
|
|
||||||
@@ -204,6 +218,15 @@
|
|||||||
document.getElementById("workersValue").textContent = data.workers || "-";
|
document.getElementById("workersValue").textContent = data.workers || "-";
|
||||||
document.getElementById("hddValue").textContent = data.hdd ? `${data.hdd} MB` : "-";
|
document.getElementById("hddValue").textContent = data.hdd ? `${data.hdd} MB` : "-";
|
||||||
document.getElementById("expiresValue").textContent = data.expires || "-";
|
document.getElementById("expiresValue").textContent = data.expires || "-";
|
||||||
|
document.getElementById("contractName").textContent = data.contract_name || "-";
|
||||||
|
|
||||||
|
// Disable buttons based on contract_name
|
||||||
|
if (data.contract_name === "On the Rise") {
|
||||||
|
document.getElementById("upgradeRiseBtn").disabled = true;
|
||||||
|
} else if (data.contract_name === "Powerhouse") {
|
||||||
|
document.getElementById("upgradeRiseBtn").disabled = true;
|
||||||
|
document.getElementById("upgradePowerhouseBtn").disabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
@@ -234,7 +257,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Button event listeners with product_id mapping
|
|
||||||
document.getElementById("upgradeRiseBtn").addEventListener("click", () => buyProduct("ontherise"));
|
document.getElementById("upgradeRiseBtn").addEventListener("click", () => buyProduct("ontherise"));
|
||||||
document.getElementById("upgradePowerhouseBtn").addEventListener("click", () => buyProduct("powerhouse"));
|
document.getElementById("upgradePowerhouseBtn").addEventListener("click", () => buyProduct("powerhouse"));
|
||||||
document.getElementById("addDomainBtn").addEventListener("click", () => buyProduct("1-domain"));
|
document.getElementById("addDomainBtn").addEventListener("click", () => buyProduct("1-domain"));
|
||||||
|
|||||||
Reference in New Issue
Block a user