<?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', // react multisety
    'units' => true,
    'descr_plus' => true, // popis+
    'price_buy' => true,
    'show_max' => 5,
    'note' => true,
    'recycling_fee' => true,
];
// parametry
// $cfg['Modules']['parameters'] = [
//    'configurations' => true,
// ];
// sekce
$cfg['Modules']['products_sections'] = [
    //    'annotation' => true,
    'custom_url' => 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'] = [
    'category_variations' => [15 => [], 18 => [], 22 => []],
    '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'] = true;
// Kolekce produktů
$cfg['Modules']['products_collections'] = true;
// Odkazy
$cfg['Modules']['links'] = true;
// Přílohy
$cfg['Modules']['attachments'] = true;
// Související
$cfg['Modules']['products_related'] = [
    'types' => true,
];
// Dynamické související produkty
$cfg['Modules']['dynamic_related_products'] = true;
// Hodnocení zboží
$cfg['Modules']['reviews'] = [
    'show_in_category' => true,
];
// Ceníky zboží
$cfg['Modules']['pricelists'] = true;
// Množstevní slevy
$cfg['Modules']['quantity_discount'] = true;
// Věrnostní program
$cfg['Modules']['bonus_program'] = true;
// Globální slevy
$cfg['Modules']['global_discounts'] = true;
// Příplatky
$cfg['Modules']['products_charges'] = true;

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

// Daktela
$cfg['Modules']['daktela'] = true;

// HTML stránky
$cfg['Modules']['html_pages'] = [
    'labels' => [
        'bonus_program_dealer',
        'bonus_program_b2b',
        'faq',
    ],
];
/*
 * -----------------------------------------------
 *       MODULY: OBJEDNÁVKY
 * -----------------------------------------------
 */

// Objednávky
// $cfg['Modules']['orders'] = [
//     'invoice_pdf' => true,
// ];
// Hromadné zpracování objednávek
$cfg['Modules']['orders_mass_process'] = true;
// Objednávkový řady
$cfg['Modules']['invoices'] = 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;

/*
 * -----------------------------------------------
 *       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'] = true;
// Inventura
// $cfg['Modules']['inventory'] = true;
// Produkty dodavatelů
// $cfg['Modules']['orders_of_suppliers'] = true;

$cfg['Modules']['price_history'] = 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;
// Prodejci
$cfg['Modules']['sellers'] = true;

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

// Automatické importy
$cfg['Modules']['automatic_import'] = true;
// Konfigurovatelné feedy
$cfg['Modules']['feed_generator'] = true;
// Incomaker
$cfg['Modules']['incomaker'] = true;
// Telfa
// $cfg['Modules']['telfa'] = true;
// Autopilot
$cfg['Modules']['automation_configurator'] = true;
// DROPSHIPMENT
$cfg['Modules']['dropship'] = true;

$cfg['Modules']['recaptcha']['cloudflare'] = 2;

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

// MailerLite
// $cfg['Modules']['mailerlite'] = true;
// Balíkobot
$cfg['Modules']['balikonos'] = [
    'provider' => 'balikobot',
];
// Ceníky dopravy
$cfg['Modules']['delivery_pricelist'] = true;
// Platební brány
$cfg['Modules']['payments'] = [
    'GoPay' => true,
];
// Cenové hladiny zboží
$cfg['Modules']['price_levels'] = true;

// Kontaktní formuláře
$cfg['Modules']['forms'] = [
    'b2b' => [
        'title' => 'Velkoobchodní zákazníci',
        'template' => 'form/b2b.tpl',
        'message' => 'email/b2b.tpl',
        'subject' => 'email/b2b_subject.tpl',
        'message_answer' => 'email/b2b_answer.tpl',
        'subject_answer' => 'email/b2b_subject_answer.tpl',
        'email' => 'obchod@cbdway.cz',
    ],
];
// Měny
$cfg['Modules']['currencies'] = true;
// Překlady
$cfg['Modules']['translations'] = true;
// Párování plateb FIO banka
$cfg['Modules']['bank_auto_payments'] = [
    'fio_bank' => true,
];

// FB / Google přihlášení
$cfg['Modules']['user_oauth'] = true;

// JS shop
$cfg['Modules']['js_shop'] = true;
// GraphQL API
$cfg['Modules']['graphql'] = true;

$cfg['Modules']['info_panels'] = [
    'types' => [
        [
            'type' => 'cart',
            'descr' => 'Košík',
        ],
    ],
];

/*
 * ======================================================================
 *       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ů',
    '-2' => 'na dotaz',
];

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

/*
 * ======================================================================
 *       NASTAVENI OBJEDNAVEK
 * ======================================================================
 * Status: nastaveni stavu objednavek
 */

$cfg['Order']['Status']['global'] = [
    '0' => 'nová',
    '1' => 'zpracovává se',
    '3' => 'nezaplaceno',
    '4' => 'není skladem',
    '2' => 'vyřízena',
];

// Nastaveni vyznamu statusu
$cfg['Order']['Status']['active'] = [0, 1, 3, 4];
$cfg['Order']['Status']['handled'] = [2];
$cfg['Order']['Status']['notpacked'] = [0, 1, 3, 4];

/*
 * ======================================================================
 *       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' => [254, 254],
        ],
        'product_detail' => [
            'size' => [524, 524],
            'removeBackground' => 0xFAFAFA,
            'crop' => 'height',
            'quality' => 95,
            'sharpen' => 0.7,
        ],
        'product_gallery' => [
            'size' => [115, 93],
        ],
        'admin' => [
            'size' => [64, 48],
        ],
        'section' => [
            'size' => [142, 142],
        ],
        'producer' => [
            'size' => [120, 35],
            'png' => true,
        ],
        'payment' => [
            'size' => [60, 60],
            'svg' => true,
        ],
        'delivery' => [
            'size' => [90, 40],
            'svg' => true,
        ],
        'subsections' => [
            'size' => [53, 53],
            'type' => 'section',
        ],
        'producer-small' => [
            'size' => [126, 39],
            'upscale' => true,
            'type' => 'producer',
        ],
        'product_cart' => [
            'size' => [100, 100],
        ],
        'slider_home' => [
            'size' => [1420, 553],
            'crop' => true,
            'type' => 'slider',
            'lang' => true,
            'upscale' => true,
        ],
        'article_thumb' => [
            'size' => [460, 330],
            'crop' => true,
        ],
        'article_thumb_lg' => [
            'size' => [700, 502],
            'crop' => true,
        ],
        'gallery_item' => [
            'size' => [303, 303],
            'png' => true,
        ],
        'slider_home_mobile' => [
            'size' => [523, 653],
            'upscale' => true,
        ],
        'slider_home_double' => [
            'size' => [700, 400],
        ],
        'slider_home_catelog' => [
            'size' => [220, 220],
        ],
        'category_header' => [
            'size' => [1420, 449],
            'upscale' => false,
            'quality' => 95,
            'sharpen' => 0.7,
        ],
        'slider_home_tablet' => [
            'size' => [700, 400],
            'crop' => true,
            'type' => 'slider',
            'lang' => true,
            'upscale' => true,
        ],
        'product_variations' => [
            'size' => [115, 93],
            'removeBackground' => 0xFAFAFA,
        ],
        'catalog_list' => [
            'size' => [137, 137],
        ],
        'product_content_photo' => [
            'size' => [600, 555],
        ],
    ],
    '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 => 'gallery_item',
        17 => 'slider_home_mobile',
        18 => 'slider_home_double',
        19 => 'category_header',
        20 => 'slider_home_tablet',
        21 => 'product_variations',
        22 => 'catalog_list',
        23 => 'product_content_photo',
    ],
];

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

// Nastaveni flagu objednavek
$cfg['Order']['Flags'] = [
    'SDE' => [
        'name' => 'Převzato',
    ],
    'U' => [
        'name' => 'Uzávěrka',
    ],
];

$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',
    ],
    'PS' => [
        'plural' => 'set',
        'singular' => 'set',
        'short' => 'S',
    ],
    'VO' => [
        'plural' => 'VO',
        'singular' => 'VO',
        'short' => 'VO',
    ],
    'ED' => [
        'plural' => 'ED',
        'singular' => 'ED',
        'short' => 'ED',
    ],
    'B2C' => [
        'plural' => 'B2C',
        'singular' => 'B2C',
        'short' => 'BC',
    ],
    'MS' => [
        'plural' => 'Multiset',
        'singular' => 'Multiset',
        'short' => 'MS',
    ],
    'UZ' => [
        'plural' => 'Uzávěrka',
        'singular' => 'Uzávěrka',
        'short' => 'UZ',
    ],
    'B' => [
        'plural' => 'Bestsellery',
        'singular' => 'Bestsellery',
        'short' => 'B',
    ],
];

$cfg['tpl'] = [
    'user' => ['version' => 2],
    'articles' => ['version' => 2],
    'search' => ['version' => 2],
    'ordering_user' => ['version' => 2],
    'language_currency_switcher' => true,
    'category_banner_small' => true,
    'country_switcher' => false,
    'currency_switcher' => true,
    'banner_power' => false,
    'hide_producers_filter' => false,
];

$cfg['Blocks']['identifiers'] = [
    '' => ['title' => 'Výchozí'],
    'product_side' => ['title' => 'Složení'],
    'dark_text' => ['title' => 'Tmavé písmo'],
    'light_text' => ['title' => 'Světlé písmo'],
];

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