Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update from 10/20/30 automation to 20/30/50 #423

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/js/pricing/pricing.js
Original file line number Diff line number Diff line change
Expand Up @@ -512,16 +512,16 @@ function updateOveragesDisplay() {
****************************/

let globalAutomateTickets0 = 0,
globalAutomateTickets10 = 0,
globalAutomateTickets20 = 0,
globalAutomateTickets30 = 0;
globalAutomateTickets30 = 0,
globalAutomateTickets50 = 0;
let globalAutomatePrice0 = 0,
globalAutomatePrice10 = 0,
globalAutomatePrice20 = 0,
globalAutomatePrice30 = 0;
globalAutomatePrice30 = 0,
globalAutomatePrice50 = 0;

function calculateAutomatePrices() {
const percentages = [0, 10, 20, 30];
const percentages = [0, 20, 30, 50];
const automatePlansForCycle = automatePlans[globalBillingCycle];

percentages.forEach((percentage) => {
Expand Down Expand Up @@ -567,14 +567,14 @@ function findAutomatePrice(tickets, plans) {
****************************/

function calculateOptionPrices() {
const percentages = [0, 10, 20, 30];
const percentages = [0, 20, 30, 50];

percentages.forEach((percentage) => {
const automatePrice = window[`globalAutomatePrice${percentage}`];
const optionPrice = globalCurrentPlanPrice + automatePrice;
const formattedPrice = formatNumberWithCommas(optionPrice);
$('[data-el="helpdeskPrice' + percentage + '"]').text(formattedPrice);
// console.log(`Option ${percentage}%: ${formattedPrice}`);
console.log(`Option ${percentage}%: ${formattedPrice}`);
});
}

Expand Down
7 changes: 1 addition & 6 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,8 @@ Webflow.push(function () {
newScript(scriptBase + '/src/js/competitors'+minBase+'.js','body', 1);
}

// log pricing
if (path.includes('log-slider')){
newScript(scriptBase + '/src/js/pricing/log-slider'+minBase+'.js','body', 1);
}

// pricing page
if (path.includes('pricing')){
if (path.includes('pricing') || path.includes('log-slider')){
newScript(scriptBase + '/src/js/pricing/pricing'+minBase+'.js','body', 1);
}

Expand Down