{*
* 2007-2020 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@buy-addons.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author    Buy-addons    <contact@buy-addons.com>
* @copyright 2007-2020 Buy-addons
* @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}
<script language="javascript" type="text/javascript">
    var email_dbboo = "{$email_dbboo|escape:'htmlall':'UTF-8'}";
    var error_email = "{$error_email|escape:'htmlall':'UTF-8'}";
    var error_type = "{$error_type|escape:'htmlall':'UTF-8'}";
    var error_size = "{$error_size|escape:'htmlall':'UTF-8'}";
    var error_captcha = "{$error_captcha|escape:'htmlall':'UTF-8'}";
    var success_submit = "{$success_submit|escape:'htmlall':'UTF-8'}";
    var file_invalid = "{$file_invalid|escape:'htmlall':'UTF-8'}";
</script>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css">
<style type="text/css">

    @media (max-width: 768px){
        .product_display:nth-of-type(1)::before {
            content: "{l s='Product' mod='askforaquotemodul'}";
            padding-top: 35px;
        }
    }
    @media (max-width: 768px)
    {
        .product_display:nth-of-type(2)::before {
            content: "{l s='Description' mod='askforaquotemodul'}";
        }
    }
    @media (max-width: 768px)
    {
        .product_display:nth-of-type(3)::before {
            content: "{l s='Unit price' mod='askforaquotemodul'}";
            padding-top: 5px;
        }
    }
    @media (max-width: 768px)
    {
        .product_display:nth-of-type(4)::before {
            content: "{l s='Qty' mod='askforaquotemodul'}";
            padding-top: 15px;
        }
    }
    @media (max-width: 768px)
    {
        .product_display:nth-of-type(5)::before {
            content: "{l s='Total' mod='askforaquotemodul'}";
            padding-top: 3px;
        }
    }
    @media (max-width: 768px)
    {
        .product_display:nth-of-type(6)::before {
            content: "{l s='Remove?' mod='askforaquotemodul'}";
            padding-top: 8px;
        }
    }

</style>

{capture name=path}
    <span class="navigation_page">
        {l s='Your Quote' mod='askforaquotemodul'}
    </span>
{/capture}
<form action="" method="post" enctype="multipart/form-data">
<div class = "body_details">
    <div class = "header_quotes">
        <h4 class = "title_header">{l s='YOUR QUOTES CART' mod='askforaquotemodul'}</h4>
    </div>
    <div class = "quote_body_new_dbboo";>
    
    {if $details_product_quote == 0}
        <div >
            <p class="alert alert-warning">{l s='No product in your quote' mod='askforaquotemodul'}</p>
        </div>
    {else}
        {if $success_submit == 1}
            <div>
                    <p class="alert alert-success show_success_quote">{l s='Your ask for a quote is complete.' mod='askforaquotemodul'}</p>
            </div>
        {else}
        <div>
            <p class="alert alert-danger show_warning" style="display:none">{l s='Captcha error' mod='askforaquotemodul'}</p>
        </div>
        <div>
            <p class="alert alert-danger show_warning_file_type" style="display:none">{l s=' File invalid (allow type of file: ' mod='askforaquotemodul'}{$lower_file_extension|escape:'htmlall':'UTF-8'})</p>
        </div>
        <div>
            <p class="alert alert-danger show_warning_file_size" style="display:none">{l s='File Size < 5MB' mod='askforaquotemodul'}</p>
        </div>
        <div>
            <p class="alert alert-danger show_warning_email" style="display:none">{l s='Email Invalid' mod='askforaquotemodul'}</p>
        </div>
        <div>
            <p class="alert alert-danger show_warning_file_invalid" style="display:none">{l s='File Invalid' mod='askforaquotemodul'}</p>
        </div>
       

        <div class="table_block">
            <table class="table" style="border-top: none;border: 1px solid #ececec;">
                <thead>
                    <tr>
                        {if $option_price_total == 1}
                            <th style="border-left: none;border-right: none;">{l s='Product' mod='askforaquotemodul'}</th>
                            <th style="border-left: none;border-right: none;">{l s='Description' mod='askforaquotemodul'}</th>
                            <th style="border-left: none;border-right: none;">{l s='Unit price' mod='askforaquotemodul'}</th>            
							<th style="border-left: none;border-right: none;">{l s='Qty' mod='askforaquotemodul'}</th>
                            <th style="border-left: none;border-right: none;">{l s='Total' mod='askforaquotemodul'}</th>            
							<th style="border-left: none;border-right: none;">{l s='Remove?' mod='askforaquotemodul'}</th>
                            {else}
                            <th style="border-left: none;border-right: none;">{l s='Product' mod='askforaquotemodul'}</th>
                            <th style="border-left: none;border-right: none;">{l s='Description' mod='askforaquotemodul'}</th>
                            <th style="border-left: none;border-right: none;display:none;">{l s='Unit price' mod='askforaquotemodul'}</th>            
							<th style="border-left: none;border-right: none;">{l s='Qty' mod='askforaquotemodul'}</th>
                            <th style="border-left: none;border-right: none;display:none;">{l s='Total' mod='askforaquotemodul'}</th>            
							<th style="border-left: none;border-right: none;text-align:center;">{l s='Remove?' mod='askforaquotemodul'}</th>
                            {/if}
                    </tr>
                </thead>
                <tbody class = "table_body">

                    {foreach from=$details_product_quote key=key item=item}
                        <tr class = "{$item->id_combi_dbboo|escape:'htmlall':'UTF-8'}" style="border:none;">
                            <td class = "product_display" style = "width: 120px; border-left: none;border-right: none;">
                                <a href="{$item->link_pro|escape:'htmlall':'UTF-8'}">
                                    <img src="{$item->img_doubleboo|escape:'htmlall':'UTF-8'}" style="border: 1px solid #cacaca;border-radius: 6px;width:80px;" alt="{$item->name|escape:'htmlall':'UTF-8'}">
                                </a>
                            </td>
                            <td class = "product_display" style="border-left: none;border-right: none;">
                                <a href="{$item->link_pro|escape:'htmlall':'UTF-8'}">
                                    <p>{$item->name|escape:'htmlall':'UTF-8'}</p>
                                </a>
                                {if empty($details_product_quote[$key]->attr_dbboo)}
                                {else}
                                    <small>{$details_product_quote[$key]->attr_dbboo|escape:'htmlall':'UTF-8'}</small><br>
                                {/if}
                                
                                {if empty($details_product_quote[$key]->reference)}
                                {else}
                                    <small>{l s='SKU' mod='askforaquotemodul'}: {$details_product_quote[$key]->reference|escape:'htmlall':'UTF-8'}</small><br>
                                {/if}
                            </td>
                            {if $option_price_total == 1}
                                <td class = "product_display quote_unit_price" style="border-left: none;border-right: none;">
                                    {$item->price_full|escape:'htmlall':'UTF-8'}
                                </td>
                            {else}
                                <td class = "product_display quote_unit_price" style="border-left: none;border-right: none;display:none;">
                                    {$item->price_full|escape:'htmlall':'UTF-8'}
                                </td>
                            {/if}
                            <td class = "product_display" style="border-left: none;border-right: none;width: 20%;">
                                <div >
                                    <div style="width:40px; float:left;height:40px;    margin-right: 1px;">
                                        <input class = "count_dbboo{$item->id_combi_dbboo|escape:'htmlall':'UTF-8'}_{$item->id|escape:'htmlall':'UTF-8'}" size="3" maxlength="6" type="text" value="{$item->so_sp|escape:'htmlall':'UTF-8'}" style = "border: 1px solid #bdbdbd;border-radius: 3px;text-align: center;width: 100%;height: 100%;" disabled>
                                    </div>
                                    <div>
                                        <div>
                                            <a onclick="up_product({$item->id_combi_dbboo|escape:'htmlall':'UTF-8'},{$item->id|escape:'htmlall':'UTF-8'})" href="javascript:void(0);" class = "btn btn-default up_count" id = "{$item->id_combi_dbboo|escape:'htmlall':'UTF-8'}_{$item->id|escape:'htmlall':'UTF-8'}" rel="1_1"><i class="icon-plus"></i></a>
                                            <br>
                                            <a onclick="down_product({$item->id_combi_dbboo|escape:'htmlall':'UTF-8'},{$item->id|escape:'htmlall':'UTF-8'})"href="javascript:void(0);" class = "btn btn-default down_count" id = "{$item->id_combi_dbboo|escape:'htmlall':'UTF-8'}_{$item->id|escape:'htmlall':'UTF-8'}" rel="1_1"><i class="icon-minus"></i></a>
                                        </div>
                                    </div>

                                </div>
                            </td>
                            {if $option_price_total == 1}
                                <td class = "product_display quote_total_price" style="border-left: none;border-right: none;">
                                    <span class = "price{$item->id_combi_dbboo|escape:'htmlall':'UTF-8'}_{$item->id|escape:'htmlall':'UTF-8'}" value = "{$item->price_tax|escape:'htmlall':'UTF-8'}">{$item->total_full|escape:'htmlall':'UTF-8'}</span>
                                </td>
                            {else}
                                <td class = "product_display quote_total_price" style="border-left: none;border-right: none;display:none;">
                                    <span class = "price{$item->id_combi_dbboo|escape:'htmlall':'UTF-8'}_{$item->id|escape:'htmlall':'UTF-8'}" value = "{$item->price_tax|escape:'htmlall':'UTF-8'}">{$item->total_full|escape:'htmlall':'UTF-8'}</span>
                                </td>
                            {/if}

                            <td class = "product_display" style="border-left: none;border-right: none;">
                                <a onclick="del_product({$item->id_combi_dbboo|escape:'htmlall':'UTF-8'},{$item->id|escape:'htmlall':'UTF-8'})" class = "del_btn del_btn_pri" fun_delete="1" data-id-rm = "{$item->id|escape:'htmlall':'UTF-8'}" data-id-combi="{$item->id_combi_dbboo|escape:'htmlall':'UTF-8'}" href="javascript:void(0);" rel="1_1" style = "font-size: 20px;display: block;margin: auto;width: 20px;height: 25px;color: #777;"><i class="icon-trash"></i></a>
                            </td>
                        </tr>

                    {/foreach}
                    {if $option_price_total == 1}
                        <tr class="total_display" style = "border:none;">
                            <td colspan="4" align="right" style= "text-align: right;border-left: none;border-right: none;"><h5><b>{l s='Total' mod='askforaquotemodul'}:</b></h5></td>
                            <td colspan="2" style="border-left: none;border-right: none;">
                                <span class = "total" value = "{$num_total['total_price']|escape:'htmlall':'UTF-8'}" id="dbboo"  >{$num_total['total_price_full']|escape:'htmlall':'UTF-8'}</span>
                                <input type = "hidden" name="total_dbboo" value="{$num_total['total_price']|escape:'htmlall':'UTF-8'}"/>
                            </td>
                        </tr>
                    {else}
                        <tr class="total_display" style = "border:none;display:none;">
                            <td colspan="4" align="right" style= "text-align: right;border-left: none;border-right: none;"><h5><b>{l s='Total' mod='askforaquotemodul'}:</b></h5></td>
                            <td colspan="2" style="border-left: none;border-right: none;">
                                <span class = "total" name="total_dbboo" value = "{$num_total['total_price']|escape:'htmlall':'UTF-8'}" id="dbboo"  >{$num_total['total_price_full']|escape:'htmlall':'UTF-8'}</span>
                                <input type = "hidden" name="total_dbboo" value="{$num_total['total_price']|escape:'htmlall':'UTF-8'}"/>
                            </td>
                        </tr>
                    {/if}


                </tbody>
            </table>
        </div>
        {if $check_login == 1}
            <div>
                <a href="{$link_encode_quote|escape:'htmlall':'UTF-8'}" class="btn btn_login_quote">
                    <span>{l s='Login to submit a quote' mod='askforaquotemodul'}  <i class="icon-chevron-right right"></i></span>
                </a>
            </div>
        {else}
        
            <div>
                <div class = "name_input">
                    <div class = "col-lg-2"><label >{l s='First name *' mod='askforaquotemodul'}</label></div>
                    <div class = "col-lg-4 name_dbboo"><input type="text" class="text_input_dbboo first_name_dbboo form-control" name="first_name" style="width:80%" value = "{$first_name|escape:'htmlall':'UTF-8'}" required></input></div>
                    <div class = "col-lg-2" style = "width:120px;"><label >{l s='Last name *' mod='askforaquotemodul'}</label></div>
                    <div class = "col-lg-4 name_dbboo"><input type="text" class="text_input_dbboo last_name_dbboo form-control" name="last_name" style="width:80%" value = "{$last_name|escape:'htmlall':'UTF-8'}" required></input></div>
                    {if $option_company_name == 1}
                        <div class="col-lg-12" style="padding:0;">
                            <div class = "col-lg-2"><label >{l s='Company name' mod='askforaquotemodul'}</label></div>
                            <div class = "col-lg-10 name_dbboo" style="padding-right: 0px;"><input type="text" class="text_input_dbboo company_name_dbboo form-control" name="company_name" style="width:100%" value = "{$company_name|escape:'htmlall':'UTF-8'}" /></div>
                        </div>
						<div class="col-lg-12" style="padding:0;">
                            <div class = "col-lg-2"><label >{l s='Company address' mod='askforaquotemodul'}</label></div>
                            <div class = "col-lg-10 name_dbboo" style="padding-right: 0px;"><input type="text" class="text_input_dbboo company_name_dbboo form-control" name="company_address" style="width:100%" value = "{$company_address|escape:'htmlall':'UTF-8'}" /></div>
                        </div>
                    {else}
						<input type="hidden" name="company_name" value="{$company_name|escape:'htmlall':'UTF-8'}" />
						<input type="hidden" name="company_address" value="{$company_address|escape:'htmlall':'UTF-8'}" />
                    {/if}
                    <div class="col-lg-12" style="padding:0;">
                        <div class = "col-lg-2 " ><label >{l s='Phone number' mod='askforaquotemodul'}</label></div>
                        <div class = "col-lg-10" style = "padding-right: 0px;"><input type="text" class="text_input_dbboo phone_number_dbboo form-control" name="phone_number" value = "{$phone_number|escape:'htmlall':'UTF-8'}" style="width:100%" onpaste="return false;" ></input></div>
                    </div>
                    <div class="col-lg-12" style="padding:0;">
                        <div class = "col-lg-2 "><label >{l s='Email *' mod='askforaquotemodul'}</label></div>
                        <div class = "col-lg-10 "style = "padding-right: 0px;"><input type="text" class="text_input_dbboo email_dbboo form-control" name="email_dbboo" style="width:100%" value = "{$email|escape:'htmlall':'UTF-8'}" required></input></div>    
                    </div>
                    <div class="col-lg-12" style="padding:0;">
                        <div class = "col-lg-2 "><label>{l s='Subject ' mod='askforaquotemodul'}</label></div>
                        <div class = "col-lg-10 " style = "padding-right: 0px;"><input type="text" class="text_input_dbboo quote_name_dbboo form-control" name="quote_name" style="width:100%" value = "{$quote_name|escape:'htmlall':'UTF-8'}" =></input></div>
                    </div>
                    <div class="col-lg-12" style="padding:0;">
                        <div class = "col-lg-2 "><label >{l s='Message ' mod='askforaquotemodul'}</label></div>
                        <div class = "col-lg-10 " style = "padding-right: 0px;"><textarea class="text_input_dbboo quote_message form-control" name="bargain_message" rows="3" style="width:100%" >{$quote_message|escape:'htmlall':'UTF-8'}</textarea></div>
                    </div>
                </div>    
            </div>
            <div class= "col-lg-12 attach_file_class">
                <div class = "col-lg-2" style="padding-left: 0px;"><label >{l s='Attached file' mod='askforaquotemodul'}</label></div>
                <div class = "col-lg-10 "style = "padding-left: 5px;"><input type="file" name="fileToUpload_dbboo" id="fileToUpload_dbboo"></div>
            </div>
            {if $option_show_captcha == 1}
			<div class = "captcha_doubleboo">
				<div class = "col-lg-2 title_captcha"><label >{l s='Captcha *' mod='askforaquotemodul'}</label></div>
				<div class = "col-lg-3 name_dbboo"><input type="text" class="text_input_dbboo text_captcha form-control" name="catpcha" required></input></div>
				<img class ="img_captcha_code" src="{$web_version|escape:'htmlall':'UTF-8'}modules/askforaquotemodul/classes/imagerandom.php?time={$smarty.now|escape:'htmlall':'UTF-8'}" id="img-captcha"/>
			</div>
            {/if}

            <div>
                <img class = "img_loading" width="15px;" src="{$head_link_img|escape:'htmlall':'UTF-8'}modules/askforaquotemodul/views/img/ajax_loadding.gif" id="img_loading_gif"/>
                <button class="btn btn-default_mine_1" id="submit_quote" name="submit_quote_dbboo" type="submit" value="Submit now"><span>{l s='Submit now' mod='askforaquotemodul'} <i class="icon-chevron-right right"></i></span></button>
            </div>
        
        {/if}
    
    {/if}
    {/if}
    </div>
</div>
</form>