{*
* 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
*}
<div id="product-shipping" class="panel product-tab">
	<h3>{$field.label|escape:'htmlall':'UTF-8'}</h3>

	{include file="module:agilemultisellerpro/views/templates/front/_partials/form-fields.tpl"
		field=[
			'name' => 'width',
			'type' => 'number',
			'required' => false,
			'label' => {l s='Width (package)' d='Modules.Agilemultisellerpro.Product'},
			'value' => {$product->width|floatval|string_format:'%.2f'},
			'availableValues' => [
				'otherAttr' => 'step="0.01" min="0"',
				'group' => [
					'after' => {$field.availableValues.ps_dimension_unit|escape:'htmlall':'UTF-8'}
				]
			],
			'maxLength' => 14,
			'errors' => [],
			'autocomplete' => '',
			'isLang' => false
		]
	}

	{include file="module:agilemultisellerpro/views/templates/front/_partials/form-fields.tpl"
		field=[
			'name' => 'height',
			'type' => 'number',
			'required' => false,
			'label' => {l s='Height (package)' d='Modules.Agilemultisellerpro.Product'},
			'value' => {$product->height|floatval|string_format:'%.2f'},
			'availableValues' => [
				'otherAttr' => 'step="0.01" min="0"',
				'group' => [
					'after' => {$field.availableValues.ps_dimension_unit|escape:'htmlall':'UTF-8'}
				]
			],
			'maxLength' => 14,
			'errors' => [],
			'autocomplete' => '',
			'isLang' => false
		]
	}

	{include file="module:agilemultisellerpro/views/templates/front/_partials/form-fields.tpl"
		field=[
			'name' => 'depth',
			'type' => 'number',
			'required' => false,
			'label' => {l s='Depth (package)' d='Modules.Agilemultisellerpro.Product'},
			'value' => {$product->depth|floatval|string_format:'%.2f'},
			'availableValues' => [
				'otherAttr' => 'step="0.01" min="0"',
				'group' => [
					'after' => {$field.availableValues.ps_dimension_unit|escape:'htmlall':'UTF-8'}
				]
			],
			'maxLength' => 14,
			'errors' => [],
			'autocomplete' => '',
			'isLang' => false
		]
	}

	{include file="module:agilemultisellerpro/views/templates/front/_partials/form-fields.tpl"
		field=[
			'name' => 'weight',
			'type' => 'number',
			'required' => false,
			'label' => {l s='Weight (package)' d='Modules.Agilemultisellerpro.Product'},
			'value' => {$product->weight|floatval|string_format:'%.2f'},
			'availableValues' => [
				'otherAttr' => 'step="0.01" min="0"',
				'group' => [
					'after' => {$field.availableValues.ps_weight_unit|escape:'htmlall':'UTF-8'}
				]
			],
			'maxLength' => 14,
			'errors' => [],
			'autocomplete' => '',
			'isLang' => false
		]
	}

	{include file="module:agilemultisellerpro/views/templates/front/_partials/form-fields.tpl"
		field=[
			'name' => 'additional_shipping_cost',
			'type' => 'number',
			'required' => false,
			'label' => {l s='Additional shipping cost (per quantity)' d='Modules.Agilemultisellerpro.Product'},
			'value' => {$product->additional_shipping_cost|floatval|string_format:'%.2f'},
			'availableValues' => [
				'otherAttr' => 'step="0.01" min="0"',
				'group' => [
					'after' => "{$currency.sign|escape:'htmlall':'UTF-8'} {if $field.availableValues.country_display_tax_label}({l s='tax excl.' d='Modules.Agilemultisellerpro.Product'}){/if}"
				]
			],
			'maxLength' => 14,
			'errors' => [],
			'autocomplete' => '',
			'isLang' => false
		]
	}

	<div class="form-group row">
		<label class="col-md-3 form-control-label">{l s='Carriers'  d='Modules.Agilemultisellerpro.Product'}</label>

		<div class="col-md-9 js-input-column">
				<div class="col-md-6 pl-0">
						<label class="form-control-label" for="availableCarriers">{l s='Available carriers'  d='Modules.Agilemultisellerpro.Product'}</label>

						<select class="form-control" name="availableCarriers" id="availableCarriers" multiple size="4">
							{foreach $field.availableValues.carrier_list as $carrier}
								{if !isset($carrier.selected) || !$carrier.selected}
									<option value="{$carrier.id_reference|escape:'htmlall':'UTF-8'}">{$carrier.name|escape:'htmlall':'UTF-8'}</option>
								{/if}
							{/foreach}
						</select>

						<button class="btn btn-primary btn-block" id="addCarrier" type="button">
							{l s='Add'  d='Modules.Agilemultisellerpro.Product'}&nbsp;<i class="icon-arrow-right"></i>
						</button>
				</div>

				<div class="col-md-6 pl-0">
						<label class="form-control-label" for="selectedCarriers">{l s='Selected carriers'  d='Modules.Agilemultisellerpro.Product'}</label>

						<select class="form-control" name="carriers[]" id="selectedCarriers" multiple size="4">
							{foreach $field.availableValues.carrier_list as $carrier}
								{if isset($carrier.selected) && $carrier.selected}
									<option value="{$carrier.id_reference|escape:'htmlall':'UTF-8'}" selected="selected">{$carrier.name|escape:'htmlall':'UTF-8'}</option>
								{/if}
							{/foreach}
						</select>

						<button class="btn btn-primary btn-block" id="removeCarrier" type="button">
							{l s='Remove'  d='Modules.Agilemultisellerpro.Product'}&nbsp;<i class="icon-arrow-left"></i>
						</button>
				</div>

				<div class="col-xs-12 p-0 mt-1">
					&nbsp;* {l s='If no carrier is selected then all the carriers will be available for customers orders. Otherwise only Selected carriers will be used.' d='Modules.Agilemultisellerpro.Product'}
					{if $is_seller_shipping_installed}
						<br>
						** {l s='If you choose to restrict carriers for the product, the Default Carrier must be included.' d='Modules.Agilemultisellerpro.Product'}
					{/if}
				</div>
		</div>
	</div>
</div>
{* The selected carrier id in V1.5 is carriers_restriction *}
