<?php
$_['limitedtimediscount'] = array(
    'title'         => 'LimitedTimeDiscount',
    'name'          => $name = 'limitedtimediscount',
    'version'       => '2.1',

    //=== Internal
    'path'          => 'module/' . $name,
    'model'         => 'model_module_' . $name,
    'ext_link'      => 'extension/module',
    'ext_type'      => '&type=module',
    'setting_code'  => $name,               // Refer to db table `setting`, column `code`
    'setting_key'   => $name . '_setting',  // Refer to db table `setting`, column `key`

    'sess_token'    => $token = 'token',
    'url_token'     => $token . '=%s',
    'store_id'      => 0,

    //=== Default
    'setting'   => array(
        'status'            => 0,
        'date_start'        => date('Y-m-d', strtotime('-1 days')),
        'date_end'          => '',
        'discount'          => array(
            'code_prefix'           => 'LTD',
            'type'                  => 'P',
            'discount'              => 10,      // Discount amount
            'delay'                 => 20,      // second
            'duration'              => 30,      // minute
            'repeat'                => 60 * 6,  // 6 hours
            'total_check'           => 0,
            'total'                 => 99,      // Minimum cart value
            'logged'                => 0,
            'shipping'              => 0,
            'product_check'         => 0,
            'coupon_product'        => array(),
            'category_check'        => 0,
            'coupon_category'       => array(),
            'manufacturer_check'    => 0,
            'coupon_manufacturer'   => array(),
            'uses_total'            => 3,
            'uses_customer'         => 3,
            'date_end_interval'     => '+14 days', // now + interval
            'status'                => 1
        ),
        'modal'             => array(
            'border_size'       => 0,
            'border_color'      => '#444444',
            'background'        => '#ffffff',
            'message'           => array(
                // Used as message fallback
                0 => '<div style="text-align:center; line-height:1; text-transform:uppercase;">
    <div style="font-size:42px; font-weight:bold; color:#E40F37; margin: 10px 0 25px;">Get {discount_value} OFF</div>
    <div style="font-size:18px;">Use discount code</div>
    <div style="font-size:22px; font-weight:bold; display:inline-block; margin:10px 0 30px 0; padding:15px 60px; background-color:#09a938; color:#fff;">{discount_code}</div>
    <div style="font-size:22px;">Won\'t last forever</div>
    <div style="font-size:28px; margin:10px -20px -20px; padding:15px 20px 20px; background:#5f0ec7; color:#fff;">{countdown}</div>
</div>',
            ),
            'custom_css'        => '',
        ),
        'popup'             => array(
            'border_size'       => 2,
            'border_color'      => '#7db7cc',
            'background'        => '#def2f9',
            'position'          => 'bottomright',
            'message'           => array(
                // Used as message fallback
                0 => '<p>Coupon code {discount_value} off</p>
{discount_code}
{countdown}',
            ),
            'custom_css'        => '',
        ),
    )
);
