Only smartphones are allowed with Unlimited Plans. Other devices will be removed.
What gives you…
Flexible Payments
The cost of your device is spread over 36 months and will appear on your billing statement.
Saves You Money
$0 Down plus save up to $25 on monthly line access per device on the Ultra Freedom Share Plans.
Faster Upgrades
Upgrade earlier - as soon as 12 months to get the latest technology available.
No Service Contracts
With FLEX, there is no 2 year service agreement required.
FLEX pricing offers an interest free monthly device payment option. With FLEX Your Way, customers can choose their own finance terms, between 12 and 36 months.*
Pay a low, upfront price for your device with the eligibility to upgrade in 2 years.
Prepaid gives you the flexibility to pay in advance with no contract and no credit checks.
';
var addTalk = '
Talk/Text
';
var addTablet = '
Tablet
';
var addMifi = '
MiFi
';
var planOfferings;
function updatePrices(planGroup) {
if (planGroup == null) {
return;
}
if (planGroup.lineAccess != null) {
quotaPriceCalculation(planGroup);
} else {
unlimitedPriceCalculation(planGroup);
}
}
function unlimitedPriceCalculation(planGroup) {
var prices = planGroup.prices;
var counts = getDeviceCounts();
var lineCount = counts.total;
planPrice = 0;
// Tablets only get charged a secondary line price
if (counts.numberOfTablets > 0 && planGroup.tabletSecondaryCostPerLine != null) {
if (counts.numberOfTablets === counts.total) {
// Disregard the first tablet as a secondary line if all devices are tablet
counts.numberOfTablets--;
}
lineCount -= counts.numberOfTablets;
planPrice += counts.numberOfTablets * planGroup.tabletSecondaryCostPerLine;
}
if (lineCount > 0 && lineCount - 1 prices.length) {
// If more lines are added than the number of line prices, use the first price for any additional lines
// Using this logic, because the first line cost will most likely be the most expensive one, and CWW
// didn't communicate how they intend to handle more than 10 lines
planPrice += prices[prices.length - 1] + (lineCount - prices.length) * prices[0];
}
totalAccessFee = 0;
}
function quotaPriceCalculation(planGroup) {
var counts = getDeviceCounts();
planPrice = 0;
totalAccessFee = 0;
if (planGroup.lineAccess != null) {
totalAccessFee += counts.numberOfTablets * planGroup.lineAccess.tablet;
totalAccessFee += counts.numberOfFeaturePhones * planGroup.lineAccess.featurePhone;
totalAccessFee += counts.numberOfMifi * planGroup.lineAccess.mifi;
totalAccessFee += counts.numberOfSmartphones * planGroup.lineAccess.smartphone;
}
// Don't show a price until at least one device is added
if (counts.total > 0) {
planPrice += planGroup.prices[0];
}
}
function getDeviceCounts() {
// The elements are only hidden by the Foundation library, not removed, so we're attempting to ignore all
// items that are hidden or in the transition of being hidden.
var visibleLines = $('.new-lines').filter(function() { return this.style.display !== 'none' && this.style.opacity === '' });
var numberOfSmartphones = visibleLines.find('button[data-type="line"]').length;
var numberOfFeaturePhones = visibleLines.find('button[data-type="talk"]').length;
var numberOfTablets = visibleLines.find('button[data-type="tablet"]').length;
var numberOfMifi = visibleLines.find('button[data-type="mifi"]').length;
return {
numberOfSmartphones: numberOfSmartphones,
numberOfFeaturePhones: numberOfFeaturePhones,
numberOfTablets: numberOfTablets,
numberOfMifi: numberOfMifi,
total: numberOfSmartphones + numberOfFeaturePhones + numberOfTablets + numberOfMifi
}
}
function init() {
initSlider('.priceSlider', planOfferings.flexUnlimited);
$('.plan-overview').show();
BindClose();
showFlexPricing();
function initSlider(sliderClass, planGroup) {
sliderElement = new Foundation.Slider($(sliderClass), { start: 0, end: planGroup.plans.length - 1 })
$(sliderClass).closest('.slider-group').find('.start-number').html(planGroup.leftSliderText);
$(sliderClass).closest('.slider-group').find('.end-number').html(planGroup.rightSliderText);
}
}
$(document).ready(function () {
planOfferings = {
flexShared: {
leftSliderText: '250 MB',
rightSliderText: '10 GB',
plans: [
{ name: '250 MB', kitid: 131, prices: [10], lineAccess: { smartphone: 25, featurePhone: 25, tablet: 10, mifi: 20 } },
{ name: '5 GB', kitid: 133, prices: [30], lineAccess: { smartphone: 25, featurePhone: 25, tablet: 10, mifi: 20 } },
{ name: '10 GB', kitid: 134, prices: [50], lineAccess: { smartphone: 25, featurePhone: 25, tablet: 10, mifi: 20 } }]
},
flexUnlimited: {
leftSliderText: 'Basics Unlimited',
rightSliderText: 'Premium Unlimited',
plans: [
{ name: 'Basics Unlimited', kitid: 141, prices: [65, 115, 125, 140, 160, 180, 200, 220, 240, 260], tabletSecondaryCostPerLine: 20 },
{ name: 'Plus Unlimited', kitid: 142, prices: [70, 125, 145, 165, 185, 205, 225, 245, 265, 285], tabletSecondaryCostPerLine: 20 },
{ name: 'Premium Unlimited', kitid: 143, prices: [75, 135, 165, 195, 225, 255, 285, 315, 345, 375], tabletSecondaryCostPerLine: 10 }]
},
contractShared: {
leftSliderText: '250 MB',
rightSliderText: '10 GB',
plans: [
{ name: '250 MB', kitid: 131, prices: [10], lineAccess: { smartphone: 40, featurePhone: 40, tablet: 10, mifi: 20 } },
{ name: '5 GB', kitid: 133, prices: [30], lineAccess: { smartphone: 40, featurePhone: 40, tablet: 10, mifi: 20 } },
{ name: '10 GB', kitid: 134, prices: [50], lineAccess: { smartphone: 40, featurePhone: 40, tablet: 10, mifi: 20 } }]
},
contractUnlimited: {
leftSliderText: 'Basics Unlimited',
rightSliderText: 'Premium Unlimited',
plans: [
{ name: 'Basics Unlimited', kitid: 141, prices: [85, 155, 185, 220, 260, 300, 340, 380, 420, 460], tabletSecondaryCostPerLine: 20 },
{ name: 'Plus Unlimited', kitid: 142, prices: [90, 165, 205, 245, 285, 325, 365, 405, 445, 485], tabletSecondaryCostPerLine: 20 },
{ name: 'Premium Unlimited', kitid: 143, prices: [95, 175, 225, 275, 325, 375, 425, 475, 525, 575], tabletSecondaryCostPerLine: 10 }]
},
prepaid: {
leftSliderText: '100 MB',
rightSliderText: '3 GB',
plans: [
{ name: '100 MB', kitid: 131, prices: [35] },
{ name: '1 GB', kitid: 133, prices: [45] },
{ name: '3 GB', kitid: 134, prices: [55] }]
},
singleLineTablet: {
leftSliderText: '250 MB',
rightSliderText: '5 GB',
plans: [
{ name: '250 MB', kitid: 131, prices: [15] },
{ name: '3 GB', kitid: 133, prices: [30] },
{ name: '5 GB', kitid: 134, prices: [50] }]
},
singleLineMifi: {
leftSliderText: 'Connect 5 GB',
rightSliderText: 'Connect 5 GB',
plans: [
{ name: 'Connect 5 GB', kitid: 133, prices: [45] }]
}
};
init();
$(document).foundation();
$('.show-flex-pricing').off("click").on("click", showFlexPricing);
$('.show-contract-pricing').off("click").on("click", showContractPricing);
$('.show-prepaid-pricing').off("click").on("click", showPrepaidPricing);
$('.shop-devices').off('click').on('click', function () {
var isFlexSelected = $('.flex-pricing').length > 0;
var isContractSelected = $('.contract-pricing').length > 0;
var isPrepaidSelected = $('.prepaid-pricing').length > 0;
var priceMode = "";
if (isFlexSelected) {
priceMode = "finance";
} else if (isPrepaidSelected) {
priceMode = "retail";
} else {
priceMode = "contract";
}
var request = $.ajax({
url: "/DesktopModules/Shop/api/catalog/SetKit",
data: 'kitID=' + kitid,
success: function (result) {
var url = "https://www.carolinawest.com/shop/smartphones/" + priceMode + "/1";
window.location.href = url;
}
});
});
$('.add-device').off("click").on("click", function () {
var buttonType = $(this).attr("data-type");
switch (buttonType) {
case 'mifi':
UpdateIcons(addMifi);
break;
case 'talk':
UpdateIcons(addTalk);
break;
case 'tablet':
UpdateIcons(addTablet);
break;
case 'line':
UpdateIcons(addLine);
break;
}
recomputeAndDraw();
});
$('.priceSlider').on('moved.zf.slider', function () {
recomputeAndDraw();
});
$('input[name="planType"]').on('change', function () {
recomputeAndDraw();
});
});
function showPricingSection(priceClass, isPrepaid, dataHeading) {
// displays the top bar/arrow; Also used to determine which price is
// selected when computing prices
$('.plans-overview-pricing').removeClass('flex-pricing');
$('.plans-overview-pricing').removeClass('contract-pricing');
$('.plans-overview-pricing').removeClass('prepaid-pricing');
$('.plans-overview-pricing').addClass(priceClass);
// Force the animation to trigger
$('.plans-overview-container').hide().slideDown();
// Hide any images under the slider bar.
$('.flex-unlimited').hide();
$('.contract-unlimited').hide();
// Update caption just above slider/buttons
$('.price-caption').html(dataHeading);
if (isPrepaid) {
// Unlimited/Shared button group
$('#planTypeButtonGroup').hide();
// Hide footer
$('.flex-footer').hide();
// Hide device options that are not available
$('.add-device[data-type="tablet"]').hide();
$('.add-device[data-type="mifi"]').hide();
// Remove all the existing icons, because some types aren't supported
ClearIcons();
} else {
// Unlimited/Shared button group
$('#planTypeButtonGroup').show();
// The footer should only be shown for flex/contract
$('.flex-footer').show();
// Show all device options
$('.add-device[data-type="tablet"]').show();
$('.add-device[data-type="mifi"]').show();
}
recomputeAndDraw();
}
function showFlexPricing() {
showPricingSection('flex-pricing', false, 'How much data?');
}
function showContractPricing() {
showPricingSection('contract-pricing', false, 'How much data?');
}
function showPrepaidPricing() {
showPricingSection('prepaid-pricing', true, 'How much per line data?');
}
function getCurrentState() {
return {
isFlexSelected: $('.flex-pricing').length > 0,
isContractSelected: $('.contract-pricing').length > 0,
isPrepaidSelected: $('.prepaid-pricing').length > 0,
isQuotaSelected: $('input[name=planType]:checked').attr('data-plan-type') === "quota",
currentSliderValue: $('.priceSlider').children('.slider-handle').attr('aria-valuenow')
}
}
function recomputeAndDraw() {
var currentState = getCurrentState();
var planType = "";
if (currentState.isFlexSelected) {
if (currentState.isQuotaSelected) {
planType = "flexShared";
} else {
planType = "flexUnlimited";
}
} else if (currentState.isContractSelected) {
if (currentState.isQuotaSelected) {
planType = "contractShared";
} else {
planType = "contractUnlimited";
}
} else if (currentState.isPrepaidSelected) {
planType = "prepaid";
}
// Special rules if there is a single line tablet device on a quota plan
var counts = getDeviceCounts();
if (counts.numberOfTablets === 1 && counts.total === 1 && currentState.isQuotaSelected) {
planType = "singleLineTablet"
}
// Special rules if there is a single line mifi on a quota plan
if (counts.numberOfMifi === 1 && counts.total === 1 && currentState.isQuotaSelected) {
planType = "singleLineMifi"
}
// It's possible that one plan may have 3 options, and then something changes to a plan
// with only 2 options. We won't update the slider position/rules until the draw step
var planIndex = currentState.currentSliderValue;
if (planIndex >= planOfferings[planType].plans.length) {
planIndex = planOfferings[planType].plans.length - 1;
}
updatePrices(planOfferings[planType].plans[planIndex]);
kitid = planOfferings[planType].plans[planIndex].kitid;
redrawCost(planOfferings[planType].plans[planIndex].name, planOfferings[planType], currentState);
}
function redrawCost(currentPlanName, planGroup, currentState) {
// Below Slider
$('.data-size').html('
' + currentPlanName + '
');
// Reset images below slider
$('.flex-unlimited').hide();
$('.contract-unlimited').hide();
if (!currentState.isQuotaSelected) {
if (currentState.isContractSelected) {
$('.contract-unlimited').show();
} else if (currentState.isFlexSelected) {
$('.flex-unlimited').show();
}
}
// Right panel
$('.data-cost').replaceWith('
Data Costs : $' + planPrice.toFixed(2) + '
');
$('.access-fee').replaceWith('
Device Access Fee: $' + totalAccessFee.toFixed(2) + '
');
var total = (totalAccessFee + planPrice);
$('.line-total').replaceWith('
Total: $' + total.toFixed(2) + '
per month
')
if (totalAccessFee === 0) {
$('.access-fee').replaceWith('
Device Access Fee: -
');
}
// slider
sliderElement.options.end = planGroup.plans.length - 1;
$('.priceSlider').closest('.slider-group').find('.start-number').html(planGroup.leftSliderText);
$('.priceSlider').closest('.slider-group').find('.end-number').html(planGroup.rightSliderText);
}
function UpdateIcons(icon) {
$('.add-lines-section').prepend(icon);
BindClose();
}
function ClearIcons() {
$('.new-lines').remove();
BindClose();
}
function BindClose() {
$('.close-button').off("click").on("click", function () {
var self = $(this);
// The close button is automatically hiddened when pressed.
// We can't recompute the price until the device element is removed from the DOM.
// The transition takes 250 ms, so we'll expect it'll be complete by 300ms later.
setTimeout(function () {
self.closest('.new-lines').remove();
recomputeAndDraw();
}, 300);
});
}
/* If browser back button was used, flush cache */
(function () {
window.onpageshow = function (event) {
if (event.persisted) {
window.location.reload();
}
};
})();
/* 2024 cw edits */
const _select = s => document.querySelector(s);
function setupPlan2024Edits() {
const _removeElements = ['.row.plan-overview'];
console.log('setting up 2024 plan edits');
_removeElements.forEach(s => {
const e = _select(s);
console.log(e);
e.remove();
});
_select('.flex-benefits').style.display = 'block';
_select('.flex-benefits-intro').style.display = 'block';
console.log('2024 removing other line options');
$('.add-device').off();
$('.new-line .fa-plus').on('click', ()=>{
UpdateIcons(addLine);
recomputeAndDraw();
});
$('.new-line .dropdown-pane').remove();
}
//if(window.location.href.indexOf('?testing=on') !== -1) {
if(true){
setupPlan2024Edits();
setupPlanButtonWatch();
}
//test version
function insertButton(selector, label, plan) {
const _selectEle = s => document.querySelector(s);
const buttonMarkup = `
`;
const div = document.createElement('div');
div.innerHTML = buttonMarkup;
_selectEle(selector).insertAdjacentElement('afterend', div);
}
//test version
function wrappedViewSpecificPlan(e, plan) {
e.preventDefault();
e.stopPropagation();
viewSpecificPlan(plan);
}