<?php

// //////////////// CONFIG SOUBOR ESHOPU ////////////////////////////////////
// ********************************************************************** //
// CONFIG SOUBOR JE SOUBOREM PHP                                          //
// RADKY ZAKOMENTUJETE ZNACKAMI // NEBO #                                 //
// v pripade problemu kontaktujte autory na: eshop@wpj.cz                 //
// ********************************************************************** //
// //////////////////////////////////////////////////////////////////////////

require_once dirname(__FILE__).'/../../../../../web/config_x.php';

/*
 * ======================================================================
 *       NASTAVENI MODULU ESHOPU
 * ======================================================================
 */

/*
 * -----------------------------------------------
 *       MODULY: ZBOŽÍ
 * -----------------------------------------------
 */

// Zboží
$cfg['Modules']['products'] = [
    'weight' => true,
    'sets' => 'js_multisets', // sety typu beany
    'modern_prices' => true,
    //    'units' => true,
    'descr_plus' => true, // popis+
    //    'price_buy' => true,
    //    'show_max' => 5,
    //    'note' => true,
    //    'recycling_fee' => true,
    'in_store_spec' => '\External\CykloSpecialityBundle\Query\Product::getInStoreField',
];
$cfg['Modules']['product_reservations'] = true;
// parametry
// $cfg['Modules']['parameters'] = [
//    'configurations' => true,
// ];
// Sekce zboží
$cfg['Modules']['products_sections'] = [
    'virtual_to_db' => true,
    'custom_url' => true,
    'annotation' => true,
];

// Výrobci
$cfg['Modules']['producers'] = true;
// Oblíbené položky zákazníků
$cfg['Modules']['products_favorites'] = true;
// Hlidaci pes
$cfg['Modules']['watchdog'] = true;
// Indexovatelné filtry
$cfg['Modules']['indexed_filter'] = true;
// Varianty zboží
$cfg['Modules']['products_variations'] = [
    'variationCode' => true,
];
// Fotky u variant
$cfg['Modules']['products_variations_photos'] = true;
// Sety (jednoduché)
$cfg['Modules']['products_sets'] = true;
// Dárky
$cfg['Modules']['products_gifts'] = true;
// Šablony produktů
$cfg['Modules']['templates'] = [
    'product_detail_positions' => [
        'description' => 'Popis',
        'price' => 'Cena',
    ],
];
// Kolekce produktů
$cfg['Modules']['products_collections'] = true;
// Odkazy
$cfg['Modules']['links'] = true;
// Přílohy
$cfg['Modules']['attachments'] = true;
// Související
$cfg['Modules']['products_related'] = true;
// Hodnocení zboží
// $cfg['Modules']['reviews'] = true;
// Ceníky zboží
$cfg['Modules']['pricelists'] = true;
// Množstevní slevy
// $cfg['Modules']['quantity_discount'] = true;
// Věrnostní program
// $cfg['Modules']['bonus_program'] = true;
// Příplatky
$cfg['Modules']['products_charges'] = true;
// OSS
$cfg['Modules']['oss_vats'] = true;

$cfg['Modules']['graphql'] = [
    'admin_api' => true,
];
// Historie cen
$cfg['Modules']['price_history'] = true;

$cfg['Modules']['labels'] = [
    'product_labels' => true,
    'colors' => [
        [
            'type' => 'black',
            'descr' => 'Černý',
        ],
        [
            'type' => 'red',
            'descr' => 'Červený',
        ],
        [
            'type' => 'green',
            'descr' => 'Zelený',
        ],
        [
            'type' => 'orange',
            'descr' => 'Oranžový',
        ],
        [
            'type' => 'gray',
            'descr' => 'Šedý',
        ],
        [
            'type' => 'hidden',
            'descr' => 'Nezobrazovat',
        ],
    ],
];

/*
 * -----------------------------------------------
 *       MODULY: OBJEDNÁVKY
 * -----------------------------------------------
 */

// Objednávky
$cfg['Modules']['orders'] = [
    'country_selection' => true,
    'store_in_disable' => true,
];
// Hromadné zpracování objednávek
// $cfg['Modules']['orders_mass_process'] = true;
// Editace objednávky zákazníkem
// $cfg['Modules']['order_edit'] = true;
// Vratky staré - z objednávky
// $cfg['Modules']['replacement'] = true;
// Vratky
// $cfg['Modules']['returns'] = true;
// Reklamace
// $cfg['Modules']['reclamations'] = true;
// Pokladna
// $cfg['Modules']['pos'] = true;
// Nové slevy
$cfg['Modules']['order_discount'] = [
    'discounts_coupons' => true,
];
// Nákupní seznamy
// $cfg['Modules']['products_shopping_list'] = true;
// FB / Google přihlášení
$cfg['Modules']['user_oauth'] = true;

/*
 * -----------------------------------------------
 *       MODULY: SKLAD
 * -----------------------------------------------
 */

// Naskladňovací faktury
// $cfg['Modules']['stock_in'] = true;
// Dodavatelé produktů - jen uložení který dodavatel má který produkt
// $cfg['Modules']['suppliers'] = true;
// Skladem u dodavatele - stav produktu, počítá in_store i z dodavatelů
// $cfg['Modules']['products_suppliers'] = true;
// Sklad
// $cfg['Modules']['warehouse'] = true;
// Hlídání produktů které dojdou
// $cfg['Modules']['missing_products'] = true;
// Prodejny
$cfg['Modules']['stores'] = [
    'hide_main_store' => true,
];
// Inventura
// $cfg['Modules']['inventory'] = true;
// Produkty dodavatelů
// $cfg['Modules']['orders_of_suppliers'] = true;

/*
 * -----------------------------------------------
 *       MODULY: OBSAH
 * -----------------------------------------------
 */

// Banery
$cfg['Modules']['sliders'] = true;
// Články
$cfg['Modules']['articles'] = [
    'limit' => 24, // stránkování po kolika
];
// Sekce článků
$cfg['Modules']['articles_sections'] = true;
// Autoři článků
$cfg['Modules']['articles_authors'] = true;
// Prodejci
$cfg['Modules']['sellers'] = true;

/*
 * -----------------------------------------------
 *       MODULY: NÁSTROJE
 * -----------------------------------------------
 */

// Automatické importy
// $cfg['Modules']['automatic_import'] = true;
// Konfigurovatelné feedy
$cfg['Modules']['feed_generator'] = true;
// Telfa
// $cfg['Modules']['telfa'] = true;
// Konfigurace autopilota
$cfg['Modules']['automation_configurator'] = true;

// JS shop
$cfg['Modules']['js_shop'] = [
    'redirectLocation' => [
        'type' => 'redirectShopCustom',
        'map' => [
            'SK' => 'CZ',
        ],
        'fallback' => 'CZ',
    ],
];

$cfg['Modules']['js_menu'] = true;

/*
 * -----------------------------------------------
 *       MODULY: NASTAVENÍ
 * -----------------------------------------------
 */

$cfg['Modules']['async_emails'] = true;

$cfg['Modules']['b2b'] = true;

// Incomaker
$cfg['Modules']['incomaker'] = true;
// Balíkobot
// $cfg['Modules']['balikonos'] = [
//     'provider' => 'balikobot',
// ];
// Ceníky dopravy
$cfg['Modules']['delivery_pricelist'] = true;
// Přesměrování na platební bránu
$cfg['Modules']['orders']['payment_redirect'] = true;
// GoPay
$cfg['Modules']['payments'] = [
    'PayPal' => [
        'order_status_finished' => null,
    ],
    //    # nezapomenout pridat gopay do composer.json
    'GoPay' => [
        'order_status_finished' => null,
    ],
];
// Cenové hladiny zboží
// $cfg['Modules']['price_levels'] = true;
// Kontaktní formuláře
$cfg['Modules']['forms'] = [
    'bike' => [
        'title' => 'Kontaktní formulář',
        'template' => 'form/bike.tpl',
        'message' => 'email/bike_message.tpl',
        'subject' => 'email/bike_subject.tpl',
    ],
];
// Převodníky
$cfg['Modules']['convertors'] = true;
// Měny
$cfg['Modules']['currencies'] = true;
// Překlady
$cfg['Modules']['translations'] = true;
// CDN
$cfg['Modules']['cdn'] = true;
// Metriky
$cfg['Modules']['metrics'] = true;
// Filter cache
$cfg['Modules']['filter_cache'] = true;
// Videa
$cfg['Modules']['videos'] = true;
// Nákupní seznamy
$cfg['Modules']['products_shopping_list'] = true;
// Omezení prodeje
$cfg['Modules']['restrictions'] = true;
// Konfigurace autopilota
$cfg['Modules']['automation_configurator'] = true;
// Bunny cache
$cfg['Modules']['proxy_cache'] = [
    'home' => true,
    'category' => true,
    'product' => true,
    'content' => true,
];

/*
 * ======================================================================
 *       NASTAVENI ZBOZI V KATALOGU
 * ======================================================================
 * DeliveryTime: nastaveni doby doruceni zbozi
 */

$cfg['Products']['DeliveryTime'] = [
    '1' => 'Dodáváme do %s dnů',
    '0' => 'Skladem',
    '-1' => 'Není skladem',
    //   '-2' => 'na dotaz',
];

// DeliveryTime indexy, ktere je mozne vlozit do kosiku
$cfg['Products']['allowSoldoutToCart'] = [
    '1' => 'Dodáváme do %s dnů',
];

// Nastaveni kroku kosiku
$cfg['Order']['Steps'] = [
    'cart' => [
        'title' => 'Košík',
        'name' => '',
        'data' => ['items'],
    ],
    'delivery' => [
        'title' => 'Doprava a platba',
        'name' => 'doprava-platba',
        'data' => ['delivery', 'payment'],
    ],
    'user' => [
        'title' => 'Kontakt',
        'name' => 'udaje',
        'data' => ['user'],
    ],
];

$cfg['Blocks']['identifiers'] = [
    'default' => ['title' => 'Výchozí'],
    'geometry' => ['title' => 'Geometrie'],
    'configurator' => ['title' => 'Konfigurátor'],
];

$cfg['Links']['Types'] = [
    'link' => 'Odkaz',
    '360' => '360° foto',
    'youtube' => 'YouTube',
];

/*
 * ======================================================================
 *       NASTAVENI OBRAZKU
 * ======================================================================
 */

$cfg['Photo'] = [
    'default' => [
        'crop' => false,
        'background' => 0xFFFFFF,
        'watermark' => false,
        'logo' => false,
        'png' => false,
    ],
    'types' => [
        'product_large' => [
            'size' => [1920, 1024],
            'watermark' => false,
            'upscale' => false,
            'crop' => 'scale',
        ],
        'product_catalog' => [
            'size' => [326, 254],
        ],
        'product_detail' => [
            'size' => [700, 700],
        ],
        'product_gallery' => [
            'size' => [115, 93],
        ],
        'admin' => [
            'size' => [64, 48],
        ],
        'section' => [
            'size' => [142, 142],
        ],
        'producer' => [
            'size' => [155, 45],
            'png' => true,
            'svg' => true,
        ],
        'payment' => [
            'size' => [60, 60],
            'svg' => true,
        ],
        'delivery' => [
            'size' => [90, 40],
            'svg' => true,
        ],
        'subsections' => [
            'size' => [60, 60],
            'type' => 'section',
        ],
        'producer-small' => [
            'size' => [126, 39],
            'upscale' => true,
            'type' => 'producer',
        ],
        'product_cart' => [
            'size' => [100, 100],
        ],
        'slider_home' => [
            'size' => [1046, 552],
            'crop' => true,
            'type' => 'slider',
            'lang' => true,
            'upscale' => true,
        ],
        'article_thumb' => [
            'size' => [472, 334],
            'crop' => true,
        ],
        'article_thumb_lg' => [
            'size' => [1240, 598],
            'crop' => true,
        ],
        'product_gallery_lg' => [
            'size' => [470, 336],
            'crop' => 'width',
        ],
        'seller' => [
            'size' => [358, 438],
        ],
        'seller_thumb' => [
            'size' => [386, 273],
        ],
        'seller_gallery' => [
            'size' => [1046, 552],
        ],
        'slider_home_md' => [
            'size' => [440, 380],
            'crop' => true,
            'type' => 'slider',
            'lang' => true,
            'upscale' => true,
        ],
        'slider_home_sm' => [
            'size' => [767, 546],
            'crop' => true,
            'type' => 'slider',
            'lang' => true,
            'upscale' => true,
        ],
        'articles_authors' => [
            'size' => [76, 76],
            'crop' => true,
        ],
        'article_thumb_small' => [
            'size' => [200, 142],
            'crop' => true,
        ],
        'category_header' => [
            'size' => [1046, 500],
            'crop' => true,
        ],
        'section_menu' => [
            'size' => [358, 386],
        ],
        'slider_squares' => [
            'size' => [484, 484],
            'crop' => true,
            'type' => 'slider',
            'lang' => true,
            'upscale' => true,
        ],
        'slider_squares_lg' => [
            'size' => [736, 240],
            'crop' => true,
            'type' => 'slider',
            'lang' => true,
            'upscale' => true,
        ],
        'category_header_sm' => [
            'size' => [543, 260],
            'crop' => true,
        ],
        'slider_home_about' => [
            'size' => [794, 577],
            'crop' => true,
            'type' => 'slider',
            'lang' => true,
            'upscale' => true,
        ],
    ],
    'id_to_type' => [
        0 => 'product_large',
        1 => 'product_gallery',
        2 => 'product_catalog',
        3 => 'product_detail',
        4 => 'product_gallery',
        5 => 'admin',
        6 => 'section',
        7 => 'producer',
        8 => 'payment',
        9 => 'delivery',
        10 => 'subsections',
        11 => 'producer-small',
        12 => 'article_thumb',
        13 => 'product_cart',
        14 => 'slider_home',
        15 => 'article_thumb_lg',
        16 => 'product_gallery_lg',
        17 => 'seller',
        18 => 'seller_thumb',
        19 => 'seller_gallery',
        20 => 'slider_home_md',
        21 => 'slider_home_sm',
        22 => 'articles_authors',
        23 => 'article_thumb_small',
        24 => 'category_header',
        25 => 'section_menu',
        26 => 'slider_squares',
        27 => 'slider_squares_lg',
        28 => 'category_header_sm',
        29 => 'slider_home_about',
    ],
];

/*
 * ======================================================================
 *       FLAGY
 * ======================================================================
 */

$cfg['Products']['Flags'] = [
    'N' => [
        'plural' => 'Novinky',
        'singular' => 'Novinka',
        'short' => 'N',
        'catalog_class' => 'new',
    ],
    'D' => [
        'plural' => 'Akce',
        'singular' => 'Akce',
        'short' => 'A',
        'catalog_class' => 'action',
    ],
    'L' => [
        'plural' => 'Na úvodu',
        'singular' => 'Na úvodu',
        'url' => '',
        'short' => 'Ú',
    ],
    'A' => [
        'plural' => 'Výprodej',
        'singular' => 'Výprodej',
        'short' => 'V',
        'catalog_class' => 'sale',
    ],
    'MS' => [
        'plural' => 'Multiset',
        'singular' => 'Multiset',
        'short' => 'MS',
    ],
    'J' => [
        'plural' => 'Jmenovka',
        'singular' => 'Jmenovka',
        'short' => 'J',
    ],
];

$cfg['tpl'] = [
    'user' => ['version' => 2],
    'articles' => ['version' => 2],
    'search' => ['version' => 2],
    'ordering_user' => ['version' => 2],
    'header_search' => ['version' => 2],
    // 'submenu' => ['version' => 2],
    // 'slider_product' => true,
    // 'submenu_product' => true,
    'language_currency_switcher' => true,
];

require_once dirname(__FILE__).'/../../../../../../shared/config_db.php';
