{*
* 2007-2024 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@prestashop.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    PrestaShop SA <contact@prestashop.com>
*  @copyright 2007-2024 PrestaShop SA
*  @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}
{extends file='catalog/listing/product-list.tpl'}

{block name='breadcrumb'}
    <nav data-depth="{$breadcrumb.count|intval}" class="breadcrumb">
      <ol>
          {foreach from=$breadcrumb.links item=path name=breadcrumb}
              <li>
                {if not $smarty.foreach.breadcrumb.last}
                  <a href="{$path.url|escape:'htmlall':'UTF-8'}"><span>{$path.title|escape:'htmlall':'UTF-8'}</span></a>
                {else}
                  <span>{$path.title|escape:'htmlall':'UTF-8'}</span>
                {/if}
              </li>
          {/foreach}
      </ol>
    </nav>

    {* <h1>{strip}
            {$shop_name|escape:'htmlall':'UTF-8'}
        {/strip}
    </h1> *}
    <div class="mb-3 seller-panel p-1">
        <div class="row">
            <div class="col-md-12">
                <h2 class="p-0 mb-1">{strip}{$seller.company|escape:'htmlall':'UTF-8'}{/strip}</h2>
            </div>
        </div>
        <div class="row">
            <div class="col-xs-12 col-sm-2">
                <img class="img-fluid" src="{if $logoUrl}{$logoUrl|escape:'htmlall':'UTF-8'}{else}{$urls.base_url|escape:'htmlall':'UTF-8'}modules/agilemultisellerpro/views/img/no.jpg{/if}" title="{$seller.company|escape:'htmlall':'UTF-8'}" alt="{$seller.company|escape:'htmlall':'UTF-8'}" />
            </div>

            <div class="col-xs-12 col-sm-8 col-lg-6">
                <small><strong>{l s='Address:' d='Modules.Agilemultisellerpro.Multipleshop'}<br/></strong></small>
                {$seller.address1|escape:'htmlall':'UTF-8'}<br />
                {if $seller.address2}{$seller.address2|escape:'htmlall':'UTF-8'}<br />{/if}
                {$seller.city|escape:'htmlall':'UTF-8'}
                {if $seller.name_state}, {$seller.name_state|escape:'htmlall':'UTF-8'}{/if}
                &nbsp;{$seller.postcode|escape:'htmlall':'UTF-8'}<br />
                {$seller.name_country|escape:'htmlall':'UTF-8'}
                {if !empty($seller.phone)}
                     <br />
                    {l s='Phone' d='Modules.Agilemultisellerpro.Multipleshop'}:{$seller.phone|escape:'htmlall':'UTF-8'}
                {/if}

                {for $i=1 to 10}
                    {if isset($conf) and $conf[sprintf("AGILE_MS_SELLER_TEXT%s",$i)]}
                        {$field_name = sprintf("ams_custom_text%s",$i)}
                        {if $seller.{$field_name}}
                            <label for="{$field_name|escape:'htmlall':'UTF-8'}">{$custom_labels[$field_name]|escape:'htmlall':'UTF-8'}:&nbsp;</label>
                            {$seller.{$field_name}|escape:'htmlall':'UTF-8'}<br>
                        {/if}
                    {/if}
                {/for}
                {for $i=1 to 2}
                    {if isset($conf) and $conf[sprintf("AGILE_MS_SELLER_HTML%s",$i)]}
                        {$field_name = sprintf("ams_custom_html%s",$i)}
                        {if $seller.{$field_name}}
                            <label for="{$field_name|escape:'htmlall':'UTF-8'}">{$custom_labels[$field_name]|escape:'htmlall':'UTF-8'}:&nbsp;</label>
                            {$seller.{$field_name}|escape:"quotes" nofilter}<br>
                        {/if}
                    {/if}
                {/for}
                {for $i=1 to 10}
                    {if isset($conf) and $conf[sprintf("AGILE_MS_SELLER_NUMBER%s",$i)]}
                        {$field_name = sprintf("ams_custom_number%s",$i)}
                        {if $seller.{$field_name}}
                            <label for="{$field_name|escape:'htmlall':'UTF-8'}">{$custom_labels[$field_name]|escape:'htmlall':'UTF-8'}:&nbsp;</label>
                            {$seller.{$field_name}|escape:'htmlall':'UTF-8'}<br>
                        {/if}
                    {/if}
                {/for}
                {for $i=1 to 5}
                    {if isset($conf) and $conf[sprintf("AGILE_MS_SELLER_DATE%s",$i)]}
                        {$field_name = sprintf("ams_custom_date%s",$i)}
                        {if $seller.{$field_name}}
                            <label for="{$field_name|escape:'htmlall':'UTF-8'}">{$custom_labels[$field_name]|escape:'htmlall':'UTF-8'}:&nbsp;</label>
                            {$seller.{$field_name}|escape:'htmlall':'UTF-8'}<br>
                        {/if}
                    {/if}
                {/for}
                {for $i=1 to 8}
                    {if isset($conf) and $conf[sprintf("AGILE_MS_SELLER_STRING%s",$i)]}
                        {$field_name = sprintf("ams_custom_string%s",$i)}
                        {if $seller.{$field_name}}
                            <label for="{$field_name|escape:'htmlall':'UTF-8'}">{$custom_labels[$field_name]|escape:'htmlall':'UTF-8'}:&nbsp;</label>
                            {$seller.{$field_name}|escape:'htmlall':'UTF-8'}<br>
                        {/if}
                    {/if}
                {/for}
                {if $seller.description}
                    <div class="mt-1">
                        {$seller.description nofilter}
                    </div>
                {/if}
            </div>

            <div class="col-xs-12 col-lg-4">
                <div class="seller-rating">
                    <h3>{l s='Average' d='Modules.Agilemultisellerpro.Multipleshop'} {$avgSellerRating|escape:'htmlall':'UTF-8'}</h3>

                    {foreach from=$criterions item=rating}
                        <div class="seller-rating__row">
                            <div class="seller-rating__name">
                                {$rating.name|escape:'html':'UTF-8'}<br />
                            </div>
                            <div class="seller-rating__img">
                                {$rating.stars nofilter}
                            </div>
                            <div class="seller-rating__grade">
                                {$rating.rating|round:1|floatval}
                            </div>
                        </div>
                    {/foreach}

                    {if $feedbackList}
                        <div class="mt-1">
                            <a href="#seller_rating_feedback">{l s='Feedback List' d='Modules.Agilemultisellerpro.Multipleshop'}</a>
                        </div>
                    {/if}
                </div>
            </div>
        </div>
    </div>

    {* {$smarty.block.parent} *}
{/block}

{block name="left_column"}
  <div id="left-column" class="col-xs-12 col-sm-4 col-md-3">
    <div class="block-categories products-selection">
            <div class="{* filter-by-row *}">
                <form class="seller-filter-product-search" action="{$link->getModuleLink('agilemultisellerpro', 'seller', ['shop_virtual_url' => $shop_uri])|escape:'html':'UTF-8'}" method="get">
                    <input type="hidden" name="page" value="1"/>
                    <input type="hidden" name="order" value="{if isset($seller_sort_selected)}{$seller_sort_selected|escape:'htmlall':'UTF-8'}{/if}"/>
                    <input type="hidden" name="id_selectedcategory" value="{if isset($id_selectedcategory)}{$id_selectedcategory|escape:'htmlall':'UTF-8'}{/if}">
                    <input class="form-control" type="text" name="query" placeholder="{l s='Current seller\'s products' d='Modules.Agilemultisellerpro.Multipleshop'}" value="{if isset($seller_filter_query)}{$seller_filter_query|escape:'htmlall':'UTF-8'}{/if}"/>
                    <input class="button" type="submit" value="Search">
                    <span class="icon_search"><i class="material-icons search" aria-hidden="true"></i></span>
                </form>
                {if $categories}
                    <p class="h2 text-uppercase facet-label mt-2">{l s='Category' d='Modules.Agilemultisellerpro.Multipleshop'}</p>

                    <div class="products-sort-order dropdown">
                        <button
                                class="btn-unstyle select-title filter-by-select"
                                rel="nofollow"
                                data-toggle="dropdown"
                                aria-label="{l s='Filter by category' d='Shop.Theme.Global'}"
                                aria-haspopup="true"
                                aria-expanded="false">
                            <span>{$current_category.name|escape:'htmlall':'UTF-8'}</span>
                            <i class="material-icons float-xs-right">&#xE5C5;</i>
                        </button>
                        <div class="dropdown-menu">
                            {foreach from=$categories item=cate}
                                <a
                                        rel="nofollow"
                                        href="#"
                                        class="select-list select-filter-by"
                                        data-idcategory = "{$cate.id_category|escape:'htmlall':'UTF-8'}"
                                >
                                    {$cate.name|escape:'htmlall':'UTF-8'}
                                </a>
                            {/foreach}
                        </div>
                    </div>
                {/if}
            </div>

        </div>
    </div>
{/block}

{block name='product_list_footer'}
    {$feedbackList nofilter}

    {$smarty.block.parent}
{/block}

