// fix products

This commit is contained in:
Kevin Granger
2013-10-18 18:38:02 +02:00
parent 316f10a352
commit 5f52a9e171
17 changed files with 220 additions and 185 deletions
@@ -8390,6 +8390,12 @@ td.actions {
padding-bottom: 4px;
display: inline-block; }
/* line 36, admin-theme/_admin-tree.sass */
.tree-panel-heading-controls {
margin: -20px -20px 20px;
padding: 5px;
border-bottom: solid 1px #dfdfdf; }
/* line 2, admin-theme/_admin-forms.sass */
label.control-label {
font-size: 13px;
@@ -31,4 +31,9 @@
background-color: none
.tree-actions
padding-bottom: 4px
display: inline-block
display: inline-block
.tree-panel-heading-controls
margin: -20px -20px 20px
padding: 5px
border-bottom: solid 1px #DFDFDF
@@ -70,15 +70,20 @@
<input type="hidden" name="inputAccessories" id="inputAccessories" value="{foreach from=$accessories item=accessory}{$accessory.id_product}-{/foreach}" />
<input type="hidden" name="nameAccessories" id="nameAccessories" value="{foreach from=$accessories item=accessory}{$accessory.name|escape:'htmlall':'UTF-8'}¤{/foreach}" />
<div id="ajax_choose_product">
<input type="text" value="" id="product_autocomplete_input" />
<div class="input-group">
<input type="text" value="" id="product_autocomplete_input" />
<span class="input-group-addon"><i class="icon-search"></i></span>
</div>
</div>
<div id="divAccessories">
{* @todo : donot use 3 foreach, but assign var *}
{foreach from=$accessories item=accessory}
<div class="form-control-static">
<button type="button" class="btn btn-default delAccessory" name="{$accessory.id_product}">
<i class="icon-remove text-danger"></i>
</button>
{$accessory.name|escape:'htmlall':'UTF-8'}{if !empty($accessory.reference)}{$accessory.reference}{/if}
<span class="delAccessory" name="{$accessory.id_product}" style="cursor: pointer;">
<img src="../img/admin/delete.gif" class="middle" alt="" />
</span>
</div>
{/foreach}
</div>
</div>
@@ -30,7 +30,7 @@
{include file="controllers/products/multishop/check_fields.tpl" product_tab="Customization"}
<div class="row">
<div class="form-group">
<label class="control-label col-lg-3" for="uploadable_files">
{include file="controllers/products/multishop/checkbox.tpl" field="uploadable_files" type="default"}
<span class="label-tooltip" data-toggle="tooltip"
@@ -42,7 +42,7 @@
<input type="text" name="uploadable_files" id="uploadable_files" value="{$uploadable_files|htmlentities}" />
</div>
</div>
<div class="row">
<div class="form-group">
<label class="control-label col-lg-3" for="text_fields">
{include file="controllers/products/multishop/checkbox.tpl" field="text_fields" type="default"}
<span class="label-tooltip" data-toggle="tooltip"
@@ -56,7 +56,7 @@
</div>
{if $has_file_labels}
<hr/>
<div class="row">
<div class="form-group">
<label class="control-label col-lg-3">
{l s='Define the label of the file fields:'}
</label>
@@ -67,7 +67,7 @@
{/if}
{if $has_text_labels}
<hr/>
<div class="row">
<div class="form-group">
<label class="control-label col-lg-3">
{l s='Define the label of the text fields:'}
</label>
@@ -230,7 +230,7 @@
</script>
<div id="product-tab-content-wait" style="display:none">
<div id="loading">{l s='Loading...'}</div>
<div id="loading"><i class="icon-refresh icon-spin"></i>&nbsp;{l s='Loading...'}</div>
</div>
<form id="product_form" class="form-horizontal col-lg-10" action="{$form_action}" method="post" enctype="multipart/form-data" name="product" style="display:none;">
@@ -239,12 +239,9 @@
{if !$product->active && $product->isAssociatedToShop()}
<div class="alert alert-info draft" >
<p>
<span >
{l s='Your product will be saved as a draft.'}</span>
<span style="float:right"><a href="#" class="button" style="display: block" onclick="submitAddProductAndPreview()" >{l s='Save and preview'}</a></span>
<input type="hidden" name="fakeSubmitAddProductAndPreview" id="fakeSubmitAddProductAndPreview" />
</p>
{l s='Your product will be saved as a draft.'}
<a href="#" class="btn btn-default" onclick="submitAddProductAndPreview()" ><i class="icon-eye-open"></i>&nbsp;{l s='Save and preview'}</a>
<input type="hidden" name="fakeSubmitAddProductAndPreview" id="fakeSubmitAddProductAndPreview" />
</div>
{/if}
@@ -22,7 +22,5 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<div class="panel-heading">
<i class="icon-tags"></i>&nbsp;{l s=$title}
<div class="pull-right">{if isset($toolbar)}{$toolbar}{/if}</div>
</div>
<div class="tree-panel-heading-controls">{if isset($toolbar)}{$toolbar}{/if}</div>
@@ -22,4 +22,8 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
{if isset($actions)}{foreach from=$actions item=action} {$action->render()}{/foreach}{/if}
{if isset($actions)}
{foreach from=$actions item=action}
{$action->render()}
{/foreach}
{/if}
@@ -235,13 +235,16 @@
<input type="text" id="related_product_autocomplete_input" autocomplete="off" class="ac_input" />
<span class="input-group-addon"><i class="icon-search"></i></span>
</div>
<div class="form-control-static">
<span id="related_product_name"><i class="icon-warning-sign"></i>&nbsp;{l s='No related product'}</span>
<span id="related_product_remove" style="display:none">
<a class="btn btn-default" href="#" onclick="removeRelatedProduct(); return false" id="related_product_remove_link">
<i class="icon-remove text-danger"></i>
</a>
</span>
</div>
<span id="related_product_remove" style="display:none">
<a class="btn btn-default" href="#" onclick="removeRelatedProduct(); return false" id="related_product_remove_link">
<i class="icon-trash"></i>
</a>
</span>
<span id="related_product_name">{l s='No related product'}</span>
</div>
<script>
var no_related_product = '{l s='No related product'}';
@@ -112,7 +112,7 @@ $(document).ready(function () {
</div>
{include file="controllers/products/multishop/check_fields.tpl" product_tab="Prices"}
<div class="row">
<div class="form-group">
<label class="control-label col-lg-3" for="wholesale_price">
{include file="controllers/products/multishop/checkbox.tpl" field="wholesale_price" type="default"}
<span class="label-tooltip" data-toggle="tooltip"
@@ -127,7 +127,7 @@ $(document).ready(function () {
</div>
</div>
<div class="row">
<div class="form-group">
<label class="control-label col-lg-3" for="priceTE">
{include file="controllers/products/multishop/checkbox.tpl" field="price" type="price"}
<span class="label-tooltip" data-toggle="tooltip"
@@ -142,7 +142,7 @@ $(document).ready(function () {
</div>
</div>
<div class="row">
<div class="form-group">
<label class="control-label col-lg-3" for="id_tax_rules_group">
{include file="controllers/products/multishop/checkbox.tpl" field="id_tax_rules_group" type="default"}
{l s='Tax rule:'}
@@ -182,7 +182,7 @@ $(document).ready(function () {
</div>
{if $tax_exclude_taxe_option}
<div class="row">
<div class="form-group">
<div class="col-lg-9 col-lg-offset-3">
<div class="alert">
{l s='Taxes are currently disabled'} :
@@ -193,7 +193,7 @@ $(document).ready(function () {
</div>
{/if}
<div class="row" {if !$ps_use_ecotax} style="display:none;"{/if}>
<div class="form-group" {if !$ps_use_ecotax} style="display:none;"{/if}>
<label class="control-label col-lg-3" for="ecotax">
{include file="controllers/products/multishop/checkbox.tpl" field="ecotax" type="default"}
<span class="label-tooltip" data-toggle="tooltip"
@@ -207,7 +207,7 @@ $(document).ready(function () {
</div>
</div>
<div class="row" {if !$country_display_tax_label || $tax_exclude_taxe_option}style="display:none;"{/if} >
<div class="form-group" {if !$country_display_tax_label || $tax_exclude_taxe_option}style="display:none;"{/if} >
<label class="control-label col-lg-3" for="priceTI">{l s='Retail price with tax:'}</label>
<div class="input-group col-lg-2">
<span class="input-group-addon">{$currency->prefix}{$currency->suffix}</span>
@@ -216,7 +216,7 @@ $(document).ready(function () {
</div>
</div>
<div class="row">
<div class="form-group">
<label class="control-label col-lg-3" for="unit_price">
{include file="controllers/products/multishop/checkbox.tpl" field="unit_price" type="unit_price"}
<span class="label-tooltip" data-toggle="tooltip"
@@ -233,7 +233,7 @@ $(document).ready(function () {
</div>
{if $ps_tax && $country_display_tax_label}
<div class="row">
<div class="form-group">
<div class="col-lg-9 col-lg-offset-3">
<div class="alert alert-warning">
<span>{l s='or'}
@@ -245,7 +245,7 @@ $(document).ready(function () {
</div>
{/if}
<div class="row">
<div class="form-group">
<label class="control-label col-lg-3" for="on_sale">
{include file="controllers/products/multishop/checkbox.tpl" field="on_sale" type="default"}
</label>
@@ -259,7 +259,7 @@ $(document).ready(function () {
</div>
</div>
<div class="row">
<div class="form-group">
<div class="col-lg-9 col-lg-offset-3">
<div class="alert alert-success">
<strong>{l s='Final retail price:'}</strong>
@@ -291,13 +291,13 @@ $(document).ready(function () {
{l s='You can set specific prices for clients belonging to different groups, different countries, etc...'}
</div>
<div class="row">
<div class="form-group">
<div class="col-lg-12">
<a class="btn btn-default" href="#" id="show_specific_price">
<i class="icon-plus-sign"></i> {l s='Add a new specific price'}
</a>
<a class="btn btn-default" href="#" id="hide_specific_price" style="display:none">
<i class="icon-remove"></i> {l s='Cancel new specific price'}
<i class="icon-remove text-danger"></i> {l s='Cancel new specific price'}
</a>
</div>
</div>
@@ -312,7 +312,7 @@ $(document).ready(function () {
<div id="add_specific_price" class="well" style="display: none;">
<div class="col-lg-12">
<div class="form-group">
<label class="control-label col-lg-3" for="{if !$multi_shop}spm_currency_0{else}sp_id_shop{/if}">{l s='For:'}</label>
<label class="control-label col-lg-3" for="{if !$multi_shop}spm_currency_0{else}sp_id_shop{/if}">{l s='For'}</label>
<div class="col-lg-9">
<div class="row">
{if !$multi_shop}
@@ -356,10 +356,14 @@ $(document).ready(function () {
</div>
<div class="form-group">
<label class="control-label col-lg-3" for="customer">{l s='Customer:'}</label>
<label class="control-label col-lg-3" for="customer">{l s='Customer'}</label>
<div class="col-lg-9">
<input type="hidden" name="sp_id_customer" id="id_customer" value="0" />
<input type="text" name="customer" value="{l s='All customers'}" id="customer" autocomplete="off" />
<div class="input-group">
<input type="text" name="customer" value="{l s='All customers'}" id="customer" autocomplete="off" />
<span class="input-group-addon"><i class="icon-search"></i></span>
</div>
</div>
<img src="../img/admin/field-loader.gif" id="customerLoader" alt="{l s='Loading...'}" style="display: none;" />
<div id="customers"></div>
@@ -380,11 +384,24 @@ $(document).ready(function () {
{/if}
<div class="form-group">
<label class="control-label col-lg-3" for="sp_from">{l s='Available from:'}</label>
<div class="input-group col-lg-4">
<input class="datepicker" type="text" name="sp_from" value="" style="text-align: center" id="sp_from" />
<span class="input-group-addon">{l s='to'}</span>
<input class="datepicker" type="text" name="sp_to" value="" style="text-align: center" id="sp_to" />
<label class="control-label col-lg-3" for="sp_from">{l s='Available'}</label>
<div class="col-lg-9">
<div class="row">
<div class="col-lg-6">
<div class="input-group">
<span class="input-group-addon">{l s='from'}</span>
<input class="datepicker" type="text" name="sp_from" value="" style="text-align: center" id="sp_from" />
<span class="input-group-addon"><i class="icon-calendar-empty"></i></span>
</div>
</div>
<div class="col-lg-6">
<div class="input-group">
<span class="input-group-addon">{l s='to'}</span>
<input class="datepicker" type="text" name="sp_to" value="" style="text-align: center" id="sp_to" />
<span class="input-group-addon"><i class="icon-calendar-empty"></i></span>
</div>
</div>
</div>
</div>
</div>
@@ -471,21 +488,21 @@ $(document).ready(function () {
});
</script>
<table id="specific_prices_list" class="table">
<table id="specific_prices_list" class="table table-bordered">
<thead>
<tr>
<th class="cell border" >{l s='Rule'}</th>
<th class="cell border" >{l s='Combination'}</th>
<th>{l s='Rule'}</th>
<th>{l s='Combination'}</th>
{if $multi_shop}<th>{l s='Shop'}</th>{/if}
<th class="cell border">{l s='Currency'}</th>
<th class="cell border">{l s='Country'}</th>
<th class="cell border">{l s='Group'}</th>
<th class="cell border">{l s='Customer'}</th>
<th class="cell border">{l s='Fixed price'}</th>
<th class="cell border">{l s='Impact'}</th>
<th class="cell border">{l s='Period'}</th>
<th class="cell border">{l s='From (quantity)'}</th>
<th class="cell border">{l s='Action'}</th>
<th>{l s='Currency'}</th>
<th>{l s='Country'}</th>
<th>{l s='Group'}</th>
<th>{l s='Customer'}</th>
<th>{l s='Fixed price'}</th>
<th>{l s='Impact'}</th>
<th>{l s='Period'}</th>
<th>{l s='From (quantity)'}</th>
<th>{l s='Action'}</th>
</tr>
</thead>
<tbody>
@@ -44,8 +44,8 @@
<div class="alert alert-warning" id="available_quantity_ajax_msg" style="display: none;"></div>
<div class="alert alert-danger" id="available_quantity_ajax_error_msg" style="display: none;"></div>
<div class="alert alert-success" id="available_quantity_ajax_success_msg" style="display: none;"></div>
<div {if $product->is_virtual || $product->cache_is_pack}style="display:none;"{/if} class="row stockForVirtualProduct">
<div class="col-lg-12">
<div class="row" {if $product->is_virtual || $product->cache_is_pack}style="display:none;"{/if} class="row stockForVirtualProduct">
<div class="col-lg-9 col-lg-offset-3">
<p class="checkbox">
<label for="advanced_stock_management">
<input type="checkbox" name="advanced_stock_management" class="advanced_stock_management" id="advanced_stock_management"
@@ -58,12 +58,14 @@
disabled="disabled"
{/if}
/>
{l s='I want to use the advanced stock management system for this product.'}
{if $stock_management_active == 0 && !$product->cache_is_pack}&nbsp;-&nbsp;<strong>{l s='This requires you to enable advanced stock management.'}</strong>
{else if $product->cache_is_pack}&nbsp;-&nbsp;{l s='This parameter depends on the product(s) in the pack.'}
{/if}
{l s='I want to use the advanced stock management system for this product.'}
</label>
</p>
{if $stock_management_active == 0 && !$product->cache_is_pack}
<p class="text-danger"><i class="icon-warning-sign"></i>&nbsp;{l s='This requires you to enable advanced stock management.'}</p>
{else if $product->cache_is_pack}
<p class="text-info">{l s='This parameter depends on the product(s) in the pack.'}</p>
{/if}
</div>
</div>
@@ -105,45 +107,43 @@
<p>{l s='Given the quantities of the products in this pack, the maximum quantity should be:'} {$pack_quantity}</p>
</div>
{/if}
<table class="table">
<colgroup>
<col width="50">
<col>
</colgroup>
<thead>
<tr>
<th><span class="title_box">{l s='Quantity'}</span></th>
<th><span class="title_box">{l s='Designation'}</span></th>
</tr>
</thead>
{foreach from=$attributes item=attribute}
<tr>
<td class="available_quantity" id="qty_{$attribute['id_product_attribute']}">
<span>{$available_quantity[$attribute['id_product_attribute']]}</span>
<input type="text" value="{$available_quantity[$attribute['id_product_attribute']]|htmlentities}"/>
</td>
<td>{$product_designation[$attribute['id_product_attribute']]}</td>
</tr>
{/foreach}
</table>
<div class="row">
<div class="col-lg-9 col-lg-offset-3">
<table class="table">
<thead>
<tr>
<th><span class="title_box">{l s='Quantity'}</span></th>
<th><span class="title_box">{l s='Designation'}</span></th>
</tr>
</thead>
{foreach from=$attributes item=attribute}
<tr>
<td class="available_quantity" id="qty_{$attribute['id_product_attribute']}">
<span>{$available_quantity[$attribute['id_product_attribute']]}</span>
<input type="text" class="fixed-width-sm" value="{$available_quantity[$attribute['id_product_attribute']]|htmlentities}"/>
</td>
<td>{$product_designation[$attribute['id_product_attribute']]}</td>
</tr>
{/foreach}
</table>
</div>
</div>
<div id="when_out_of_stock" class="row">
<label class="control-label col-lg-3">{l s='When out of stock:'}</label>
<div class="col-lg-9">
<p class="checkbox">
<p class="radio">
<label id="label_out_of_stock_1" for="out_of_stock_1">
<input {if $product->out_of_stock == 0} checked="checked" {/if} id="out_of_stock_1" type="radio" checked="checked" value="0" class="out_of_stock" name="out_of_stock">
{l s='Deny orders'}
</label>
</p>
<p class="checkbox">
<p class="radio">
<label id="label_out_of_stock_2" for="out_of_stock_2">
<input {if $product->out_of_stock == 1} checked="checked" {/if} id="out_of_stock_2" type="radio" value="1" class="out_of_stock" name="out_of_stock">
{l s='Allow orders'}
</label>
</p>
<p class="checkbox">
<p class="radio">
<label id="label_out_of_stock_3" for="out_of_stock_3">
<input {if $product->out_of_stock == 2} checked="checked" {/if} id="out_of_stock_3" type="radio" value="2" class="out_of_stock" name="out_of_stock">
{l s='Default'}:
@@ -176,25 +176,25 @@
<h3>{l s='Availability settings'}</h3>
{if !$has_attribute}
<div class="row">
<div class="form-group">
<label class="control-label col-lg-3" for="minimal_quantity">{l s='Minimum quantity:'}</label>
<div class="col-lg-1">
<input maxlength="6" name="minimal_quantity" id="minimal_quantity" type="text" value="{$product->minimal_quantity|default:1}" />
<div class="col-lg-9">
<input class="form-control fixed-width-sm" maxlength="6" name="minimal_quantity" id="minimal_quantity" type="text" value="{$product->minimal_quantity|default:1}" />
<p class="help-block">{l s='The minimum quantity to buy this product (set to 1 to disable this feature)'}</p>
</div>
<p class="help-block">{l s='The minimum quantity to buy this product (set to 1 to disable this feature)'}</p>
</div>
{/if}
{if $ps_stock_management}
<div class="row">
<label class="control-label col-lg-5" for="available_now_{$default_language}">
<div class="form-group">
<label class="control-label col-lg-3" for="available_now_{$default_language}">
{include file="controllers/products/multishop/checkbox.tpl" field="available_now" type="default" multilang="true"}
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Forbidden characters:'} &#60;&#62;;&#61;#&#123;&#125;">
{l s='Displayed text when in-stock:'}
</span>
</label>
<div class="col-lg-5">
<div class="col-lg-9">
<div class="row">
{include file="controllers/products/input_text_lang.tpl"
languages=$languages
@@ -203,8 +203,8 @@
</div>
</div>
</div>
<div class="row">
<label class="control-label col-lg-5" for="available_later_{$default_language}">
<div class="form-group">
<label class="control-label col-lg-3" for="available_later_{$default_language}">
{include file="controllers/products/multishop/checkbox.tpl" field="available_later" type="default" multilang="true"}
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Forbidden characters:'} &#60;&#62;;&#61;#&#123;&#125;">
@@ -212,7 +212,7 @@
</span>
</label>
<div class="col-lg-5">
<div class="col-lg-9">
<div class="row">
{include file="controllers/products/input_text_lang.tpl"
languages=$languages
@@ -223,9 +223,19 @@
</div>
{if !$countAttributes}
<label for="available_date">{l s='Available date:'}</label>
<input id="available_date" name="available_date" value="{$product->available_date}" class="datepicker" type="text" />
<p>{l s='The available date when this product is out of stock.'}</p>
<div class="form-group">
<label class="control-label col-lg-3" for="available_date">{l s='Available date:'}</label>
<div class="col-lg-9">
<div class="input-group fixed-width-md">
<input id="available_date" name="available_date" value="{$product->available_date}" class="datepicker" type="text" />
<div class="input-group-addon">
<i class="icon-calendar-empty"></i>
</div>
</div>
<p class="help-block">{l s='The available date when this product is out of stock.'}</p>
</div>
</div>
{/if}
{/if}
@@ -28,7 +28,7 @@
{include file="controllers/products/multishop/check_fields.tpl" product_tab="Seo"}
<div class="row">
<div class="form-group">
<label class="control-label col-lg-3" for="meta_title_{$id_lang}">
{include file="controllers/products/multishop/checkbox.tpl" field="meta_title" type="default" multilang="true"}
<span class="label-tooltip" data-toggle="tooltip"
@@ -37,18 +37,16 @@
</span>
</label>
<div class="col-lg-8">
<div class="row">
{include file="controllers/products/input_text_lang.tpl"
languages=$languages
input_name='meta_title'
input_value=$product->meta_title
maxchar=70
}
</div>
{include file="controllers/products/input_text_lang.tpl"
languages=$languages
input_name='meta_title'
input_value=$product->meta_title
maxchar=70
}
</div>
</div>
<div class="row">
<div class="form-group">
<label class="control-label col-lg-3" for="meta_description_{$id_lang}">
{include file="controllers/products/multishop/checkbox.tpl" field="meta_description" type="default" multilang="true"}
<span class="label-tooltip" data-toggle="tooltip"
@@ -57,18 +55,16 @@
</span>
</label>
<div class="col-lg-8">
<div class="row">
{include file="controllers/products/input_text_lang.tpl"
languages=$languages
input_name='meta_description'
input_value=$product->meta_description
maxchar=160
}
</div>
</div>
</div>
<div class="row">
<div class="form-group">
<label class="control-label col-lg-3" for="meta_keywords_{$id_lang}">
{include file="controllers/products/multishop/checkbox.tpl" field="meta_keywords" type="default" multilang="true"}
<span class="label-tooltip" data-toggle="tooltip"
@@ -77,15 +73,13 @@
</span>
</label>
<div class="col-lg-8">
<div class="row">
{include file="controllers/products/input_text_lang.tpl" languages=$languages
input_value=$product->meta_keywords
input_name='meta_keywords'}
</div>
</div>
</div>
<div class="row">
<div class="form-group">
<label class="control-label col-lg-3" for="link_rewrite_{$id_lang}">
{include file="controllers/products/multishop/checkbox.tpl" field="link_rewrite" type="seo_friendly_url" multilang="true"}
<span class="label-tooltip" data-toggle="tooltip"
@@ -95,12 +89,10 @@
</label>
<div class="col-lg-6">
<div class="row">
{include file="controllers/products/input_text_lang.tpl"
languages=$languages
input_value=$product->link_rewrite
input_name='link_rewrite'}
</div>
</div>
<div class="col-lg-2">
<button type="button" class="btn btn-default" id="generate-friendly-url" onmousedown="updateFriendlyURLByName();"><i class="icon-random"></i> {l s='Generate'}</button>
@@ -111,8 +103,8 @@
<div class="col-lg-9 col-lg-offset-3">
{foreach from=$languages item=language}
<div class="alert alert-warning translatable-field lang-{$language.id_lang}">
<i class="icon-link"></i> {l s='The product link will look like this:'}
{$curent_shop_url|escape:'htmlall':'UTF-8'}lang/{if isset($product->id)}{$product->id}{else}<b>id_product</b>{/if}-<span id="friendly-url_{$language.id_lang}">{$product->link_rewrite[$default_language]}</span>.html
<i class="icon-link"></i> {l s='The product link will look like this:'}<br/>
<strong>{$curent_shop_url|escape:'htmlall':'UTF-8'}lang/{if isset($product->id)}{$product->id}{else}id_product{/if}-<span id="friendly-url_{$language.id_lang}">{$product->link_rewrite[$default_language]}</span>.html</strong>
</div>
{/foreach}
</div>
@@ -30,40 +30,40 @@
<div class="alert alert-info">{l s='Warning, if you change the value of fields with an orange bullet %s, the value will be changed for all other shops for this product' sprintf=$bullet_common_field}</div>
{/if}
<div class="row">
<label class="control-label col-lg-5" for="width">{$bullet_common_field} {l s='Width (package):'}</label>
<div class="form-group">
<label class="control-label col-lg-3" for="width">{$bullet_common_field} {l s='Width (package):'}</label>
<div class="input-group col-lg-2">
<span class="input-group-addon">{$ps_dimension_unit}</span>
<input maxlength="6" id="width" name="width" type="text" value="{$product->width}" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" />
</div>
</div>
<div class="row">
<label class="control-label col-lg-5" for="height">{$bullet_common_field} {l s='Height (package):'}</label>
<div class="form-group">
<label class="control-label col-lg-3" for="height">{$bullet_common_field} {l s='Height (package):'}</label>
<div class="input-group col-lg-2">
<span class="input-group-addon">{$ps_dimension_unit}</span>
<input maxlength="6" id="height" name="height" type="text" value="{$product->height}" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" />
</div>
</div>
<div class="row">
<label class="control-label col-lg-5" for="depth">{$bullet_common_field} {l s='Depth (package):'}</label>
<div class="form-group">
<label class="control-label col-lg-3" for="depth">{$bullet_common_field} {l s='Depth (package):'}</label>
<div class="input-group col-lg-2">
<span class="input-group-addon">{$ps_dimension_unit}</span>
<input maxlength="6" id="depth" name="depth" type="text" value="{$product->depth}" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" />
</div>
</div>
<div class="row">
<label class="control-label col-lg-5" for="weight">{$bullet_common_field} {l s='Weight (package):'}</label>
<div class="form-group">
<label class="control-label col-lg-3" for="weight">{$bullet_common_field} {l s='Weight (package):'}</label>
<div class="input-group col-lg-2">
<span class="input-group-addon">{$ps_weight_unit}</span>
<input maxlength="6" id="weight" name="weight" type="text" value="{$product->weight}" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" />
</div>
</div>
<div class="row">
<label class="control-label col-lg-5" for="additional_shipping_cost">
<div class="form-group">
<label class="control-label col-lg-3" for="additional_shipping_cost">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='A carrier tax will be applied.'}">
{l s='Additional shipping cost (per quantity):'}
@@ -76,12 +76,12 @@
</div>
</div>
<div class="row">
<label class="control-label col-lg-5" for="availableCarriers">{l s='Carriers:'}</label>
<div class="input-group col-lg-7">
<div class="row">
<div class="col-lg-6">
<label for="availableCarriers">{l s='Available carriers'}</label>
<div class="form-group">
<label class="control-label col-lg-3" for="availableCarriers">{l s='Carriers:'}</label>
<div class="col-lg-9">
<div class="form-control-static row">
<div class="col-xs-6">
<p>{l s='Available carriers'}</p>
<select multiple id="availableCarriers" name="availableCarriers">
{foreach $carrier_list as $carrier}
{if !isset($carrier.selected) || !$carrier.selected}
@@ -91,8 +91,8 @@
</select>
<a href="#" id="addCarrier" class="btn btn-default btn-block">{l s='Add'} <i class="icon-arrow-right"></i></a>
</div>
<div class="col-lg-6">
<label for="selectedCarriers">{l s='Selected carriers'}</label>
<div class="col-xs-6">
<p>{l s='Selected carriers'}</p>
<select multiple id="selectedCarriers" name="selectedCarriers[]">
{foreach $carrier_list as $carrier}
{if isset($carrier.selected) && $carrier.selected}
@@ -22,7 +22,7 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<a href="{$link}"{if isset($action)}onclick="{$action}"{/if}{if isset($id)} id="{$id}"{/if} class="btn btn-default btn-sm">
<a href="{$link}"{if isset($action)}onclick="{$action}"{/if}{if isset($id)} id="{$id}"{/if} class="btn btn-default">
{if isset($icon_class)}<i class="{$icon_class}"></i>{/if}
{l s=$label}
</a>
@@ -24,14 +24,17 @@
*}
<!-- <label for="node-search">{l s=$label}</label> -->
<span class="pull-right">
<div class="input-group fixed-width-xl pull-right">
<div class="input-group-addon">
<i class="icon-search"></i>
</div>
<input type="text"
{if isset($id)}id="{$id}"{/if}
{if isset($name)}name="{$name}"{/if}
class="{if isset($class)} {$class}{/if} fixed-width-xl"
class="{if isset($class)} {$class}{/if}"
placeholder="search..."
/>
</span>
</div>
{if isset($typeahead_source) && isset($id)}
+22 -25
View File
@@ -3239,7 +3239,7 @@ class AdminProductsControllerCore extends AdminController
if (!is_array($specific_prices) || !count($specific_prices))
$content .= '
<tr>
<td colspan="13">'.$this->l('No specific prices.').'</td>
<td class="text-center" colspan="13"><i class="icon-warning-sign"></i>&nbsp;'.$this->l('No specific prices.').'</td>
</tr>';
else
{
@@ -3285,8 +3285,8 @@ class AdminProductsControllerCore extends AdminController
{
$content .= '
<tr '.($i % 2 ? 'class="alt_row"' : '').'>
<td class="cell border">'.$rule_name.'</td>
<td class="cell border">'.$attributes_name.'</td>';
<td>'.$rule_name.'</td>
<td>'.$attributes_name.'</td>';
$can_delete_specific_prices = true;
if (Shop::isFeatureActive())
@@ -3294,20 +3294,20 @@ class AdminProductsControllerCore extends AdminController
$id_shop_sp = $specific_price['id_shop'];
$can_delete_specific_prices = (count($this->context->employee->getAssociatedShops()) > 1 && !$id_shop_sp) || $id_shop_sp;
$content .= '
<td class="cell border">'.($id_shop_sp ? $shops[$id_shop_sp]['name'] : $this->l('All shops')).'</td>';
<td>'.($id_shop_sp ? $shops[$id_shop_sp]['name'] : $this->l('All shops')).'</td>';
}
$price = Tools::ps_round($specific_price['price'], 2);
$fixed_price = ($price == Tools::ps_round($obj->price, 2) || $specific_price['price'] == -1) ? '--' : Tools::displayPrice($price, $current_specific_currency);
$content .= '
<td class="cell border">'.($specific_price['id_currency'] ? $currencies[$specific_price['id_currency']]['name'] : $this->l('All currencies')).'</td>
<td class="cell border">'.($specific_price['id_country'] ? $countries[$specific_price['id_country']]['name'] : $this->l('All countries')).'</td>
<td class="cell border">'.($specific_price['id_group'] ? $groups[$specific_price['id_group']]['name'] : $this->l('All groups')).'</td>
<td class="cell border" title="'.$this->l('ID:').' '.$specific_price['id_customer'].'">'.(isset($customer_full_name) ? $customer_full_name : $this->l('All customers')).'</td>
<td class="cell border">'.$fixed_price.'</td>
<td class="cell border">'.$impact.'</td>
<td class="cell border">'.$period.'</td>
<td class="cell border">'.$specific_price['from_quantity'].'</th>
<td class="cell border">'.((!$rule->id && $can_delete_specific_prices) ? '<a class="btn btn-default" name="delete_link" href="'.self::$currentIndex.'&id_product='.(int)Tools::getValue('id_product').'&action=deleteSpecificPrice&id_specific_price='.(int)($specific_price['id_specific_price']).'&token='.Tools::getValue('token').'"><i class="icon-trash"></i></a>': '').'</td>
<td>'.($specific_price['id_currency'] ? $currencies[$specific_price['id_currency']]['name'] : $this->l('All currencies')).'</td>
<td>'.($specific_price['id_country'] ? $countries[$specific_price['id_country']]['name'] : $this->l('All countries')).'</td>
<td>'.($specific_price['id_group'] ? $groups[$specific_price['id_group']]['name'] : $this->l('All groups')).'</td>
<td title="'.$this->l('ID:').' '.$specific_price['id_customer'].'">'.(isset($customer_full_name) ? $customer_full_name : $this->l('All customers')).'</td>
<td>'.$fixed_price.'</td>
<td>'.$impact.'</td>
<td>'.$period.'</td>
<td>'.$specific_price['from_quantity'].'</th>
<td>'.((!$rule->id && $can_delete_specific_prices) ? '<a class="btn btn-default" name="delete_link" href="'.self::$currentIndex.'&id_product='.(int)Tools::getValue('id_product').'&action=deleteSpecificPrice&id_specific_price='.(int)($specific_price['id_specific_price']).'&token='.Tools::getValue('token').'"><i class="icon-trash"></i></a>': '').'</td>
</tr>';
$i++;
unset($customer_full_name);
@@ -3317,7 +3317,7 @@ class AdminProductsControllerCore extends AdminController
$content .= '
</tbody>
</table>
</fieldset>';
</div>';
$content .= '
<script type="text/javascript">
@@ -3344,14 +3344,14 @@ class AdminProductsControllerCore extends AdminController
// Reindex array starting from 0
$specific_price_priorities = array_values($specific_price_priorities);
$content .= '<fieldset>
$content .= '<div class="panel">
<h3>'.$this->l('Priority management').'</h3>
<div class="alert alert-info">
'.$this->l('Sometimes one customer can fit into multiple price rules. Priorities allow you to define which rule applies to the customer.').'
</div>';
$content .= '
<div class="row">
<div class="form-group">
<label class="control-label col-lg-3" for="specificPricePriority1">'.$this->l('Priorities:').'</label>
<div class="input-group col-lg-9">
<select id="specificPricePriority1" name="specificPricePriority[]">
@@ -3383,15 +3383,14 @@ class AdminProductsControllerCore extends AdminController
</select>
</div>
</div>
<div class="row">
<div class="col-lg-9 col-offset-3">
<div class="form-group">
<div class="col-lg-9 col-lg-offset-3">
<p class="checkbox">
<label for="specificPricePriorityToAll"><input type="checkbox" name="specificPricePriorityToAll" id="specificPricePriorityToAll" />'.$this->l('Apply to all products').'</label>
</p>
</div>
</div>
</fieldset>
</div>
';
return $content;
}
@@ -3423,16 +3422,14 @@ class AdminProductsControllerCore extends AdminController
$template = $this->context->smarty->createTemplate('controllers/products/input_text_lang.tpl',
$this->context->smarty);
return '<div class="form-group">'
return '<div class="form-group"><div class="input-group">'
.$template->assign(array(
'languages' => $languages,
'input_name' => 'label_'.$type.'_'.(int)($id_customization_field),
'input_value' => $input_value
))->fetch()
.'</div>'
.'<div class="form-group">'
.'<input type="checkbox" name="require_'.$type.'_'.(int)($id_customization_field).'" id="require_'.$type.'_'.(int)($id_customization_field).'" value="1" '.($required ? 'checked="checked"' : '').' style="float:left;margin:1px 4px 0 0"/><label for="require_'.$type.'_'.(int)($id_customization_field).'" style="float:none;font-weight:normal"> '.$this->l('Required').'</label>'
.'</div>';
.'<span class="input-group-addon"><span class="checkbox"><input type="checkbox" name="require_'.$type.'_'.(int)($id_customization_field).'" id="require_'.$type.'_'.(int)($id_customization_field).'" value="1" '.($required ? 'checked="checked"' : '').'/><label for="require_'.$type.'_'.(int)($id_customization_field).'"> '.$this->l('Required').'</label></span></span>'
.'</div></div>';
}
protected function _displayLabelFields(&$obj, &$labels, $languages, $default_language, $type)
+9 -9
View File
@@ -632,7 +632,7 @@ product_tabs['Associations'] = new function(){
var $nameAccessories = $('#nameAccessories');
/* delete product from select + add product line to the div, input_name, input_ids elements */
$divAccessories.html($divAccessories.html() + productName + ' <span class="delAccessory" name="' + productId + '" style="cursor: pointer;"><img src="../img/admin/delete.gif" /></span><br />');
$divAccessories.html($divAccessories.html() + '<div class="form-control-static"><button type="button" class="delAccessory btn btn-default" name="' + productId + '"><i class="icon-remove text-danger"></i></button>&nbsp;'+ productName +'</div>');
$nameAccessories.val($nameAccessories.val() + productName + '¤');
$inputAccessories.val($inputAccessories.val() + productId + '-');
$('#product_autocomplete_input').val('');
@@ -669,7 +669,7 @@ product_tabs['Associations'] = new function(){
{
input.value += inputCut[i] + '-';
name.value += nameCut[i] + '¤';
div.innerHTML += nameCut[i] + ' <span class="delAccessory" name="' + inputCut[i] + '" style="cursor: pointer;"><img src="../img/admin/delete.gif" /></span><br />';
div.innerHTML += '<div class="form-control-static"><button type="button" class="delAccessory btn btn-default" name="' + inputCut[i] +'"><i class="icon-remove text-danger"></i></button>&nbsp;' + nameCut[i] + '</div>';
}
else
$('#selectAccessories').append('<option selected="selected" value="' + inputCut[i] + '-' + nameCut[i] + '">' + inputCut[i] + ' - ' + nameCut[i] + '</option>');
@@ -825,13 +825,13 @@ product_tabs['Informations'] = new function(){
scroll:false,
cacheLength:0,
formatItem: function(item) {
return item[0]+' - '+item[1];
return item[0]+' - '+item[1];
}
}).result(function(e, i){
if(i != undefined)
addRelatedProduct(i[1], i[0]);
$(this).val('');
});
if(i != undefined)
addRelatedProduct(i[1], i[0]);
$(this).val('');
});
addRelatedProduct(id_product_redirected, product_name_redirected);
};
@@ -1046,7 +1046,7 @@ product_tabs['Pack'] = new function(){
var lineDisplay = curPackItemQty+ 'x ' +curPackItemName;
var divContent = $('#divPackItems').html();
divContent += '<li><button class="btn btn-default delPackItem" name="' + curPackItemId + '" ><i class="icon-trash"></i></button>'+
divContent += '<li><button class="btn btn-default delPackItem" name="' + curPackItemId + '" ><i class="icon-remove text-danger"></i></button>'+
lineDisplay+'</li>';
// QTYxID-QTYxID
@@ -1098,7 +1098,7 @@ product_tabs['Pack'] = new function(){
{
input.value += inputCut[i] + '-';
name.value += nameCut[i] + '¤';
div.innerHTML += nameCut[i] + '<li><button class="btn btn-default delPackItem" name="' + inputQty[1] + '"><i class="icon-trash"></i></button></li>';
div.innerHTML += nameCut[i] + '<li><button class="btn btn-default delPackItem" name="' + inputQty[1] + '"><i class="icon-remove text-danger"></i></button></li>';
}
}
+2 -4
View File
@@ -647,19 +647,17 @@ function addRelatedProduct(id_product_to_add, product_name)
if (!id_product_to_add || id_product == id_product_to_add)
return;
$('#related_product_name').html(product_name);
$('#related_product_name').parent('p').css('margin-top', 0);
$('input[name=id_product_redirected]').val(id_product_to_add);
$('#related_product_autocomplete_input').hide();
$('#related_product_autocomplete_input').parent().hide();
$('#related_product_remove').show();
}
function removeRelatedProduct()
{
$('#related_product_name').html(no_related_product);
$('#related_product_name').parent('p').css('margin-top', '0.5em');
$('input[name=id_product_redirected]').val(0);
$('#related_product_remove').hide();
$('#related_product_autocomplete_input').fadeIn();
$('#related_product_autocomplete_input').parent().fadeIn();
}
function showRedirectProductSelectOptions(show)