Projekt

Allgemein

Profil

GX-Bug #58892 » modifier.show_left_column.php

Moritz Bunjes, 06.09.2018 17:40

 
1
<?php
2
/* --------------------------------------------------------------
3
   modifier.show_left_column.php 2018-09-06
4
   Gambio GmbH
5
   http://www.gambio.de
6
   Copyright (c) 2018 Gambio GmbH
7
   Released under the GNU General Public License (Version 2)
8
   [http://www.gnu.org/licenses/gpl-2.0.html]
9
   --------------------------------------------------------------
10
*/
11

    
12
function smarty_modifier_show_left_column($string)
13
{
14
    $applicationBottomExtenderComponent = MainFactory::create_object('ApplicationBottomExtenderComponent');
15
    $applicationBottomExtenderComponent->set_data('GET', $_GET);
16
    $applicationBottomExtenderComponent->init_page();
17
    $page = $applicationBottomExtenderComponent->get_page();
18
    
19
    $hideOnIndex          = $GLOBALS['coo_template_control']->findSettingValueByName('gx-index-full-width');
20
    $hideOnSearch         = $GLOBALS['coo_template_control']->findSettingValueByName('gx-advanced-search-result-full-width');
21
    $hideOnContent        = $GLOBALS['coo_template_control']->findSettingValueByName('gx-shop-content-full-width');
22
    $hideOnProductInfo    = $GLOBALS['coo_template_control']->findSettingValueByName('gx-product-info-full-width');
23
    $hideOnProductListing = $GLOBALS['coo_template_control']->findSettingValueByName('gx-product-listing-full-width');
24
    $hideOnCart           = $GLOBALS['coo_template_control']->findSettingValueByName('gx-shopping-cart-full-width');
25
    $hideOnWishlist       = $GLOBALS['coo_template_control']->findSettingValueByName('gx-wishlist-full-width');
26
    $hideOnCheckout       = $GLOBALS['coo_template_control']->findSettingValueByName('gx-checkout-full-width');
27
    $hideOnAccount        = $GLOBALS['coo_template_control']->findSettingValueByName('gx-account-full-width');
28
    
29
    if (($page === 'Index' && $hideOnIndex) 
30
        || ($page === 'Search' && $hideOnSearch)
31
        || ($page === 'Content' && $hideOnContent)
32
        || ($page === 'ProductInfo' && $hideOnProductInfo)
33
        || ($page === 'Cat' && $hideOnProductListing)
34
        || ($page === 'Cart' && $hideOnCart)
35
        || ($page === 'Wishlist' && $hideOnWishlist)
36
        || ($page === 'Checkout' && $hideOnCheckout)
37
        || (($page === 'Account' || $page === 'AccountHistory' || $page === 'AddressBookProcess') && $hideOnAccount)
38
    ) 
39
    {
40
        return false;
41
    }
42
    
43
    return true;
44
}
(2-2/2)