remove lifeline code

This commit is contained in:
Tony Volpe
2024-12-02 16:53:56 -05:00
parent f312e57489
commit 3df726ddf7
4 changed files with 34 additions and 52 deletions

View File

@@ -2,7 +2,7 @@
get_header();
?>
<section class="hero-slice-container d-flex justify-content-start align-content-center d-none d-lg-flex" style="background-image: url('/wp-content/uploads/2023/09/Lifeline-Mobile-App-Hero-1920x880-1.jpg');">
<section class="hero-slice-container d-flex justify-content-start align-content-center d-none d-lg-flex" style="background-image: url('/wp-content/uploads/2024/07/Mini_Lifestyle_Hero_1920x880_1.jpg');">
<div class="container hero-wrapper my-auto">
<div class="row">
<div class="col-md-10 col-lg-6">

View File

@@ -7,7 +7,7 @@
<div class="step-1-extras">
<p class="consumer-primary fw-bold">Subscriber Contact Information</p>
<p>Please enter the information for the person who will be using the Lifeline service.</p>
<p>Please enter the information for the person who will be using the MedicalAlert service.</p>
{{{ subscriber_first_name }}}
{{{ subscriber_last_name }}}

View File

@@ -14,18 +14,17 @@
<div class="connection-types">
{{#if showHomesafeOptions}}
<div class="connection-types mt-4">
<p class="option-heading">Select Your System Type:</p>
{{#if currentProductIsHomeSafe}}
{{#each autoAlertProducts}}
<a class="me-3" href="{{ permalink }}" data-product-id={{ id }}>
{{ _product_attributes.connection-type.value }}
</a>
{{/each}}
{{/if}}
</div>
{{/if}}
{{#if showHomeOptions}}
<div class="connection-types mt-4">
<p class="option-heading">Select Your System Type:</p>
{{#if currentProductIsHome}}
{{#each homesystemProducts}}
<a class="me-3" href="{{ permalink }}" data-product-id={{ id }}>
{{ _product_attributes.connection-type.value }}</a>
{{/each}}
{{/if}}
</div>
{{/if}}
{{#if showOTGOptions}}
<div class="connection-types mt-4">

View File

@@ -42,52 +42,41 @@ $allProducts = site()->getPosts(
['post_type' => 'product', 'nopaging' => true],
["id", "title", "permalink", "meta._product_attributes"]
);
$homeSafeStandardVsAutoAlertProducts = [];
$currentProductIsHomeSafe = false;
$productsWithWearingStyle = [];
$currentProductIsHome = false;
$productsWithConnectionType = [];
$HomeSafeProducts = [];
foreach ($allProducts as $lifelineProduct) {
if (strpos($lifelineProduct["title"], "Home") !== false) {
$autoAlertProducts[] = $lifelineProduct;
foreach ($allProducts as $maProduct) {
if (strpos($maProduct["title"], "Home") !== false) {
$homesystemProducts[] = $maProduct;
}
if (is_array($lifelineProduct["_product_attributes"]) &&
array_key_exists("style", $lifelineProduct["_product_attributes"]) &&
if (is_array($maProduct["_product_attributes"]) &&
array_key_exists("style", $maProduct["_product_attributes"]) &&
is_array($currentProduct["_product_attributes"]) &&
array_key_exists("connection-type", $currentProduct["_product_attributes"]) &&
$currentProduct["_product_attributes"]["connection-type"]["value"] == $lifelineProduct["_product_attributes"]["connection-type"]["value"]
$currentProduct["_product_attributes"]["connection-type"]["value"] == $maProduct["_product_attributes"]["connection-type"]["value"]
) {
$productsWithWearingStyle[] = $lifelineProduct;
$productsWithWearingStyle[] = $maProduct;
}
if (is_array($lifelineProduct["_product_attributes"]) &&
array_key_exists("connection-type", $lifelineProduct["_product_attributes"]) &&
if (is_array($maProduct["_product_attributes"]) &&
array_key_exists("connection-type", $maProduct["_product_attributes"]) &&
is_array($currentProduct["_product_attributes"]) &&
array_key_exists("style", $currentProduct["_product_attributes"]) &&
$currentProduct["_product_attributes"]["style"]["value"] == $lifelineProduct["_product_attributes"]["style"]["value"]
) {
$productsWithConnectionType[] = $lifelineProduct;
}
$currentProduct["_product_attributes"]["style"]["value"] == $maProduct["_product_attributes"]["style"]["value"]
)
if (strpos($currentProduct["title"], "Home") !== false) {
$currentProductIsHomeSafe = true;
$currentProductIsHome = true;
}
if (is_array($lifelineProduct["_product_attributes"]) &&
array_key_exists("connection-type", $lifelineProduct["_product_attributes"]) &&
if (is_array($maProduct["_product_attributes"]) &&
array_key_exists("connection-type", $maProduct["_product_attributes"]) &&
is_array($currentProduct["_product_attributes"]) &&
array_key_exists("connection-type", $currentProduct["_product_attributes"]) &&
$currentProduct["_product_attributes"]["connection-type"]["value"] == $lifelineProduct["_product_attributes"]["connection-type"]["value"]
) {
if (is_array($lifelineProduct["_product_attributes"]["style"])) {
if ($lifelineProduct["_product_attributes"]["style"]["value"] === "Wristband") {
$homeSafeStandardVsAutoAlertProducts[] = $lifelineProduct;
}
} else {
$homeSafeStandardVsAutoAlertProducts[] = $lifelineProduct;
}
$currentProduct["_product_attributes"]["connection-type"]["value"] == $maProduct["_product_attributes"]["connection-type"]["value"]) {
}
}
@@ -121,17 +110,11 @@ echo site()->render("single_product", [
"product" => $currentProduct,
"add-to-cart-url" => do_shortcode("[add_to_cart_url id='".$currentProduct->ID."']"),
"flex-content" => $flexOutput,
"showHomesafeOptions" => strtolower(substr($currentProduct["title"], 0, 4)) === "home",
"homeSafeProducts" => array_reverse($homeSafeProducts),
"showHomeOptions" => strtolower(substr($currentProduct["title"], 0, 4)) === "home",
"showOTGOptions" => strtolower($currentProduct["title"]) === "mobile system" || strtolower($currentProduct["title"]) === "mini mobile system",
"OTGProducts" => array_reverse($ontheGoProducts),
"hasWearingStyle" => is_array($currentProduct["_product_attributes"]) && array_key_exists("style", $currentProduct["_product_attributes"]),
"productsWithWearingStyle" => $productsWithWearingStyle,
"productsWithConnectionType" => array_reverse($productsWithConnectionType),
"productsWithWearingStyle" => $productsWithWearingStyle,
"autoAlertProducts" => array_reverse($autoAlertProducts),
"currentProductIsHomeSafe" => $currentProductIsHomeSafe,
"homeSafeStandardVsAutoAlertProducts" => array_reverse($homeSafeStandardVsAutoAlertProducts),
"homesystemProducts" => array_reverse($homesystemProducts),
"currentProductIsHome" => $currentProductIsHome,
]);
get_footer('shop');