homepage and mini mobile systems

This commit is contained in:
2024-12-18 07:06:24 -08:00
parent 23a9c365e8
commit 90505b964a
48 changed files with 11210 additions and 903 deletions

View File

@@ -52,7 +52,8 @@ foreach ($allProducts as $maProduct) {
$homesystemProducts[] = $maProduct;
}
if (is_array($maProduct["_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"]) &&
@@ -61,22 +62,25 @@ foreach ($allProducts as $maProduct) {
$productsWithWearingStyle[] = $maProduct;
}
if (is_array($maProduct["_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"] == $maProduct["_product_attributes"]["style"]["value"]
)
)
if (strpos($currentProduct["title"], "Home") !== false) {
$currentProductIsHome = true;
}
if (strpos($currentProduct["title"], "Home") !== false) {
$currentProductIsHome = true;
}
if (is_array($maProduct["_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"] == $maProduct["_product_attributes"]["connection-type"]["value"]) {
$currentProduct["_product_attributes"]["connection-type"]["value"] == $maProduct["_product_attributes"]["connection-type"]["value"]
) {
}
}
@@ -99,7 +103,6 @@ foreach ($variations as $variation) {
$variation_id = $variation['variation_id'];
$attributes = $variation['attributes']['attribute_rate-plan'];
$price_html = $variation['price_html'];
}
$cart = WC()->cart;
@@ -108,7 +111,7 @@ echo site()->render("single_product", [
"attributes" => $attributes,
"gallery" => $wooGallery,
"product" => $currentProduct,
"add-to-cart-url" => do_shortcode("[add_to_cart_url id='".$currentProduct->ID."']"),
"add-to-cart-url" => do_shortcode("[add_to_cart_url id='" . $currentProduct['id'] . "']"),
"flex-content" => $flexOutput,
"showHomeOptions" => strtolower(substr($currentProduct["title"], 0, 4)) === "home",
"showOTGOptions" => strtolower($currentProduct["title"]) === "mobile system" || strtolower($currentProduct["title"]) === "mini mobile system",