// Move controller templates to subfolder controllers/
This commit is contained in:
@@ -0,0 +1,391 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 8971 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
|
||||
$('div.productTabs').find('a').each(function() {
|
||||
$(this).attr('href', '#');
|
||||
});
|
||||
|
||||
$('div.productTabs a').click(function() {
|
||||
var id = $(this).attr('id');
|
||||
$('.nav-profile').removeClass('selected');
|
||||
$(this).addClass('selected');
|
||||
$('.tab-profile').hide()
|
||||
$('.'+id).show();
|
||||
});
|
||||
|
||||
$('.ajaxPower').change(function(){
|
||||
var tout = $(this).attr('rel').split('||');
|
||||
var id_tab = tout[0];
|
||||
var id_profile = tout[1];
|
||||
var perm = tout[2];
|
||||
var enabled = $(this).is(':checked')? 1 : 0;
|
||||
var tabsize = tout[3];
|
||||
var tabnumber = tout[4];
|
||||
var table = 'table#table_'+id_profile;
|
||||
|
||||
perfect_access_js_gestion(this, perm, id_tab, tabsize, tabnumber, table);
|
||||
|
||||
$.ajax({
|
||||
url: "{$link->getAdminLink('AdminAccess')}",
|
||||
cache: false,
|
||||
data : {
|
||||
ajaxMode : '1',
|
||||
id_tab: id_tab,
|
||||
id_profile: id_profile,
|
||||
perm: perm,
|
||||
enabled: enabled,
|
||||
submitAddAccess: '1',
|
||||
action: 'updateAccess',
|
||||
ajax: '1',
|
||||
token: '{getAdminToken tab='AdminAccess'}',
|
||||
},
|
||||
success : function(res,textStatus,jqXHR)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (res == 'ok')
|
||||
showSuccessMessage("{l s='Update successful'}");
|
||||
else
|
||||
showErrorMessage("{l s='Update error'}");
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
jAlert('Technical error');
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(".changeModuleAccess").change(function(){
|
||||
var tout = $(this).attr('rel').split('||');
|
||||
var id_module = tout[0];
|
||||
var perm = tout[1];
|
||||
var id_profile = tout[2];
|
||||
var enabled = $(this).is(':checked')? 1 : 0;
|
||||
var table = 'table#table_module_'+id_profile;
|
||||
|
||||
if (id_module == -1)
|
||||
$(table+' .ajax-ma-'+perm).each(function(key, value) {
|
||||
$(this).attr("checked", enabled);
|
||||
});
|
||||
else if (!enabled)
|
||||
$(table+' #ajax-ma-'+perm+'-master').each(function(key, value) {
|
||||
$(this).attr("checked", enabled);
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: "{$link->getAdminLink('AdminAccess')}",
|
||||
cache: false,
|
||||
data : {
|
||||
ajaxMode: '1',
|
||||
id_module: id_module,
|
||||
perm: perm,
|
||||
enabled: enabled,
|
||||
id_profile: id_profile,
|
||||
changeModuleAccess: '1',
|
||||
action: 'updateModuleAccess',
|
||||
ajax: '1',
|
||||
token: '{getAdminToken tab='AdminAccess'}',
|
||||
},
|
||||
success : function(res,textStatus,jqXHR)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (res == 'ok')
|
||||
showSuccessMessage("{l s='Update successful'}");
|
||||
else
|
||||
showErrorMessage("{l s='Update error'}");
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
jAlert('Technical error');
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<div class="toolbarBox">
|
||||
{if $show_toolbar}
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn}
|
||||
<div class="pageTitle">
|
||||
<h3>{block name=pageTitle}
|
||||
<span id="current_obj" style="font-weight: normal;">{$title|default:' '}</span>
|
||||
{/block}</h3>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||
</div>
|
||||
|
||||
<div class="productTabs">
|
||||
<ul class="tab">
|
||||
{foreach $profiles as $profile}
|
||||
<li class="tab-row">
|
||||
<a class="nav-profile {if $profile.id_profile == $current_profile}selected{/if}" id="profile-{$profile.id_profile}" href="{$current}&token={$token}&id_profile={$profile.id_profile}">{$profile.name}</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<form id="{$table}_form" class="defaultForm" action="{$current}&{$submit_action}=1&token={$token}" method="post" enctype="multipart/form-data">
|
||||
{if $form_id}
|
||||
<input type="hidden" name="id_{$table}" id="id_{$table}" value="{$form_id}" />
|
||||
{/if}
|
||||
|
||||
{assign var=tabsize value=count($tabs)}
|
||||
{foreach $tabs AS $tab}
|
||||
{if $tab.id_tab > $tabsize}
|
||||
{assign var=tabsize value=$tab.id_tab}
|
||||
{/if}
|
||||
{/foreach}
|
||||
|
||||
{foreach $profiles as $profile}
|
||||
|
||||
<div class="profile-{$profile.id_profile} tab-profile" style="display:{if $profile.id_profile == $current_profile}block{else}none{/if}">
|
||||
|
||||
{if $profile.id_profile != $admin_profile}
|
||||
<table class="table float" cellspacing="0" style="margin-right:50px" id="table_{$profile.id_profile}">
|
||||
<tr>
|
||||
<th class="center">
|
||||
{l s='Tabs'}
|
||||
</th>
|
||||
<th class="center">
|
||||
<input type="checkbox" name="1" id="viewall"
|
||||
{if $access_edit == 1}
|
||||
rel="-1||{$profile.id_profile}||view||{$tabsize}||{count($tabs)}" class="ajaxPower"
|
||||
{else}
|
||||
disabled="disabled"
|
||||
{/if} />
|
||||
{l s='View'}
|
||||
</th>
|
||||
<th class="center">
|
||||
<input type="checkbox" name="1" id="addall"
|
||||
{if $access_edit == 1}
|
||||
rel="-1||{$profile.id_profile}||add||{$tabsize}||{count($tabs)}" class="ajaxPower"
|
||||
{else}
|
||||
disabled="disabled"
|
||||
{/if} />
|
||||
{l s='Add'}
|
||||
</th>
|
||||
<th class="center">
|
||||
<input type="checkbox" name="1" id="editall"
|
||||
{if $access_edit == 1}
|
||||
rel="-1||{$profile.id_profile}||edit||{$tabsize}||{count($tabs)}" class="ajaxPower"
|
||||
{else}
|
||||
disabled="disabled"
|
||||
{/if} />
|
||||
{l s='Edit'}
|
||||
</th>
|
||||
<th class="center">
|
||||
<input type="checkbox" name="1" id="deleteall"
|
||||
{if $access_edit == 1}
|
||||
rel="-1||{$profile.id_profile}||delete||{$tabsize}||{count($tabs)}" class="ajaxPower"
|
||||
{else}
|
||||
disabled="disabled"
|
||||
{/if} />
|
||||
{l s='Delete'}
|
||||
</th>
|
||||
<th class="center">
|
||||
<input type="checkbox" name="1" id="allall"
|
||||
{if $access_edit == 1}
|
||||
rel="-1||{$profile.id_profile}||all||{$tabsize}||{count($tabs)}" class="ajaxPower"
|
||||
{else}
|
||||
disabled="disabled"
|
||||
{/if} />
|
||||
{l s='All'}
|
||||
</th>
|
||||
</tr>
|
||||
{if !count($tabs)}
|
||||
<tr>
|
||||
<td colspan="6">{l s='No tab'}</td>
|
||||
</tr>
|
||||
{else}
|
||||
{foreach $tabs AS $tab}
|
||||
|
||||
{assign var=access value=$accesses[$profile.id_profile]}
|
||||
|
||||
{if !$tab.id_parent OR $tab.id_parent == -1}
|
||||
{assign var=is_child value=false}
|
||||
{assign var=result_accesses value=0}
|
||||
<tr>
|
||||
<td{if !$is_child} class="bold"{/if}>{if $is_child} » {/if}<strong>{$tab.name}</strong></td>
|
||||
{foreach $perms as $perm}
|
||||
{if $access_edit == 1}
|
||||
<td>
|
||||
<input type="checkbox"
|
||||
id="{$perm}{$access[$tab.id_tab]['id_tab']}"
|
||||
rel="{$access[$tab.id_tab]['id_tab']}||{$profile.id_profile}||{$perm}||{$tabsize}||{count($tabs)}"
|
||||
class="ajaxPower {$perm} {$access[$tab.id_tab]['id_tab']}"
|
||||
{if $access[$tab.id_tab][$perm] == 1}checked="checked"{/if}/>
|
||||
</td>
|
||||
{else}
|
||||
<td>
|
||||
<input type="checkbox"
|
||||
disabled="disabled"
|
||||
{if $access[$tab.id_tab][$perm] == 1}checked="checked"{/if}/>
|
||||
</td>
|
||||
{/if}
|
||||
{assign var=result_accesses value=$result_accesses + $access[$tab.id_tab][$perm]}
|
||||
{/foreach}
|
||||
<td>
|
||||
<input type="checkbox"
|
||||
id='all{$access[$tab.id_tab]['id_tab']}'
|
||||
{if $access_edit == 1}
|
||||
rel="{$access[$tab.id_tab]['id_tab']}||{$profile.id_profile}||all||{$tabsize}||{count($tabs)}"
|
||||
class="ajaxPower all {$access[$tab.id_tab]['id_tab']}"
|
||||
{else}
|
||||
class="all {$access[$tab.id_tab]['id_tab']}"
|
||||
disabled="disabled"
|
||||
{/if}
|
||||
{if $result_accesses == 4}checked="checked"{/if}/>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{foreach $tabs AS $child}
|
||||
{if $child.id_parent === $tab.id_tab}
|
||||
{if isset($access[$child.id_tab])}
|
||||
{assign var=is_child value=true}
|
||||
{assign var=result_accesses value=0}
|
||||
<tr>
|
||||
<td{if !$is_child} class="bold"{/if}>{if $is_child} » {/if}<strong>{$child.name}</strong></td>
|
||||
{foreach $perms as $perm}
|
||||
{if $access_edit == 1}
|
||||
<td>
|
||||
<input type="checkbox"
|
||||
id="{$perm}{$access[$child.id_tab]['id_tab']}"
|
||||
rel="{$access[$child.id_tab]['id_tab']}||{$profile.id_profile}||{$perm}||{$tabsize}||{count($tabs)}"
|
||||
class="ajaxPower {$perm} {$access[$child.id_tab]['id_tab']}"
|
||||
{if $access[$child.id_tab][$perm] == 1}checked="checked"{/if}/>
|
||||
</td>
|
||||
{else}
|
||||
<td>
|
||||
<input type="checkbox"
|
||||
disabled="disabled"
|
||||
{if $access[$child.id_tab][$perm] == 1}checked="checked"{/if}/>
|
||||
</td>
|
||||
{/if}
|
||||
{assign var=result_accesses value=$result_accesses + $access[$child.id_tab][$perm]}
|
||||
{/foreach}
|
||||
<td>
|
||||
<input type="checkbox"
|
||||
id='all{$access[$child.id_tab]['id_tab']}'
|
||||
{if $access_edit == 1}
|
||||
rel="{$access[$child.id_tab]['id_tab']}||{$profile.id_profile}||all||{$tabsize}||{count($tabs)}"
|
||||
class="ajaxPower all {$access[$child.id_tab]['id_tab']}"
|
||||
{else}
|
||||
class="all {$access[$child.id_tab]['id_tab']}"
|
||||
disabled="disabled"
|
||||
{/if}
|
||||
{if $result_accesses == 4}checked="checked"{/if}/>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
|
||||
{/if}
|
||||
|
||||
{/foreach}
|
||||
{/if}
|
||||
</table>
|
||||
|
||||
<table class="table" cellspacing="0" style="margin-left:20px" id="table_module_{$profile.id_profile}">
|
||||
<tr>
|
||||
<th>{l s='Modules'}</th>
|
||||
<th class="center">
|
||||
<input type="checkbox"
|
||||
id="ajax-ma-view-master"
|
||||
{if $access_edit == 1}
|
||||
class="changeModuleAccess" rel="-1||view||{$profile.id_profile}"
|
||||
{else}
|
||||
disabled="disabled"
|
||||
{/if} /> {l s='View'}
|
||||
</th>
|
||||
<th class="center">
|
||||
<input type="checkbox"
|
||||
id="ajax-ma-configure-master"
|
||||
{if $access_edit == 1}
|
||||
class="changeModuleAccess" rel="-1||configure||{$profile.id_profile}"
|
||||
{else}
|
||||
disabled="disabled"
|
||||
{/if} /> {l s='Configure'}</th>
|
||||
</tr>
|
||||
|
||||
{if !count($modules)}
|
||||
<tr>
|
||||
<td colspan="3">{l s='No modules installed'}</td>
|
||||
</tr>
|
||||
{else}
|
||||
{foreach $modules[$profile.id_profile] AS $module}
|
||||
<tr>
|
||||
<td>» {$module.name}</td>
|
||||
<td>
|
||||
<input type="checkbox"
|
||||
value="1"
|
||||
{if $module.view == true}checked="checked"{/if}
|
||||
{if $access_edit == 1}
|
||||
class="ajax-ma-view changeModuleAccess"
|
||||
rel="{$module.id_module}||view||{$profile.id_profile}"
|
||||
{else}
|
||||
class="ajax-ma-view"
|
||||
disabled="disabled"
|
||||
{/if}
|
||||
/>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox"
|
||||
value="1"
|
||||
{if $module.configure == true}checked="checked"{/if}
|
||||
{if $access_edit == 1}
|
||||
class="ajax-ma-configure changeModuleAccess"
|
||||
rel="{$module.id_module}||configure||{$profile.id_profile}"
|
||||
{else}
|
||||
class="ajax-ma-configure"
|
||||
disabled="disabled"
|
||||
{/if}
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</table>
|
||||
|
||||
<div class="clear"> </div>
|
||||
|
||||
{else}
|
||||
{l s='Administrator permissions can\'t be modified.'}
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
|
||||
{/foreach}
|
||||
</form>
|
||||
@@ -0,0 +1,51 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 9856 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{if $existingExport}
|
||||
<div class="hint" style="display:block;">
|
||||
{l s='The last export has been found for this section:'}
|
||||
<a href="{$smarty.server.REQUEST_URI}&download={$type}">{l s='Click here'}</a>
|
||||
</div>
|
||||
<br />
|
||||
{/if}
|
||||
|
||||
<label for="clientPrefix">{l s='Client prefix:'}</label>
|
||||
<div class="margin-form">
|
||||
<input type="text" value="{$clientPrefix}" name="clientPrefix" />
|
||||
<span class="input-error"></span>
|
||||
</div>
|
||||
|
||||
<label for="beginDate">{l s='Begin to:'}</label>
|
||||
<div class="margin-form">
|
||||
<input class="datepicker" id="beginDate_{$type}" type="text" name="beginDate" value="{$begin_date}" />
|
||||
<span class="input-error">{l s='The date has not the right format'}</span>
|
||||
</div>
|
||||
|
||||
<label for="endDate">{l s='End to:'}</label>
|
||||
<div class="margin-form">
|
||||
<input class="datepicker" id="endDate_{$type}" type="text" name="endDate" value="{$end_date}" />
|
||||
<span class="input-error">{l s='The date has not the right format'}</span>
|
||||
</div>
|
||||
@@ -0,0 +1,42 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 9856 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<div class="formAccountingExport" id="block_global_export">
|
||||
<fieldset>
|
||||
<legend>{$title}</legend>
|
||||
<form id="reconfiliation_form" action="{$smarty.server.REQUEST_URI}" method="POST">
|
||||
{include file="controllers/accounting_export/common_form.tpl"}
|
||||
<label for="clientPrefix">{l s='Journal:'}</label>
|
||||
<div class="margin-form">
|
||||
<input type="text" name="journal" value="{$journal}"/>
|
||||
</div>
|
||||
<div class="margin-form">
|
||||
<input id="submitGlobalExport" type="submit" class="button" name="submitAccountingExportType" />
|
||||
<input type="hidden" name="exportType" value="global_export"/>
|
||||
</div>
|
||||
</form>
|
||||
</fieldset>
|
||||
</div>
|
||||
@@ -0,0 +1,117 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 9856 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function validateInputDate(input, displayError)
|
||||
{
|
||||
{literal}
|
||||
dateRegex = /^\d{4}-\d{1,2}-\d{1,2}$/
|
||||
{/literal}
|
||||
|
||||
if (!input.val().match(dateRegex))
|
||||
{
|
||||
input.parent().find('span.input-error').fadeIn('fast');
|
||||
return false;
|
||||
}
|
||||
input.parent().find('span.input-error').css('display','none');
|
||||
return true;
|
||||
}
|
||||
|
||||
function validateAccountingForm()
|
||||
{
|
||||
validation = true;
|
||||
|
||||
$('span.input-error').css('display', 'none');
|
||||
$('.datepicker:visible').each(function() {
|
||||
if (!(validateInputDate($(this), true)))
|
||||
validation = false;
|
||||
});
|
||||
|
||||
return validation;
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#export_menu').find('a').each(function() {
|
||||
$(this).click(function() {
|
||||
blockID = 'block_' + $(this).attr('id');
|
||||
if (!$('#' + blockID).is(':visible'))
|
||||
{
|
||||
|
||||
$('.formAccountingExport:visible').each(function() {
|
||||
$(this).fadeOut('fast', function() {
|
||||
$('#' + blockID).fadeIn('fast');
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#' + '{$defaultType}').fadeIn('fast');
|
||||
|
||||
$('.datepicker').each(function() {
|
||||
$(this).change(function() {
|
||||
validateInputDate($(this), true);
|
||||
});
|
||||
$(this).datepicker({
|
||||
prevText: '',
|
||||
nextText: '',
|
||||
dateFormat: 'yy-mm-dd'
|
||||
});
|
||||
});
|
||||
|
||||
$('.formAccountingExport form input[type="submit"]').each(function()
|
||||
{
|
||||
$(this).click(function() {
|
||||
return validateAccountingForm();
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
{foreach from=$preventList key=name item=preventType}
|
||||
{if !empty($preventType)}
|
||||
<div class="{$name}">
|
||||
{foreach from=$preventType item=translationPrevent}
|
||||
{$translationPrevent}
|
||||
{/foreach}
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
|
||||
<div id="export_menu">
|
||||
<div class="toolbarBox">
|
||||
<div class="pageTitle">
|
||||
<h3>
|
||||
<span id="current_obj" style="font-weight: normal;">{l s='Export:'}</span>
|
||||
</h3>
|
||||
{l s='Select which export you want to do:'}<br />
|
||||
{foreach from=$exportTypeList item=export}
|
||||
<a id="{$export['type']}" class="button" href="javascript:void(0);">{$export['name']}</a>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 9856 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<div class="formAccountingExport" id="block_reconciliation_export">
|
||||
<fieldset>
|
||||
<legend>{$title}</legend>
|
||||
<form id="reconfiliation_form" action="{$smarty.server.REQUEST_URI}" method="POST">
|
||||
{include file="controllers/accounting_export/common_form.tpl"}
|
||||
|
||||
<div class="margin-form">
|
||||
<input id="submitReconciliationExport" type="submit" class="button" name="submitAccountingExportType" />
|
||||
<input type="hidden" name="exportType" value="reconciliation_export"/>
|
||||
</div>
|
||||
</form>
|
||||
</fieldset>
|
||||
</div>
|
||||
@@ -0,0 +1,63 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 9856 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{if !empty($error)}
|
||||
<div class="hint" style="display:block">{$error}</div>
|
||||
{else}
|
||||
<div class="toolbarBox">
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn}
|
||||
<div class="pageTitle">
|
||||
<h3>
|
||||
<span id="current_obj" style="font-weight: normal;">{$title|default:' '}</span>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<fieldset>
|
||||
<legend>{l s='Account number'}</legend>
|
||||
<div class="hint" style="display:block">
|
||||
{l s='Configure the account number by zone for:'} <b>{$shop_details['name']}</b>
|
||||
</div>
|
||||
<br />
|
||||
<form id="{$table}_form" method="POST" action="{$smarty.server.REQUEST_URI}">
|
||||
<label>{l s='Default number for this shop'}</label>
|
||||
<div class="margin-form">
|
||||
<input type="text" name="default_account_number" value="{$shop_details['default_account_number']}" />
|
||||
<p>{l s='If a zone field is empty it will use this default number.'}</p>
|
||||
</div>
|
||||
{foreach from=$shop_details['zones'] key=id_zone item=currentZone}
|
||||
<label>{$currentZone['name']}</label>
|
||||
<div class="margin-form">
|
||||
<input type="text" name="zone_{$id_zone}" value="{$currentZone['account_number']|escape:htmlall}" />
|
||||
|
||||
</div>
|
||||
{/foreach}
|
||||
<div class="margin-form">
|
||||
<input type="submit" class="button" id="{$table}_form_submit_btn" name="UpdateNumbers" value="{l s='Save'}"/>
|
||||
</div>
|
||||
</form>
|
||||
<div class="separation"></div>
|
||||
</fieldset>
|
||||
{/if}
|
||||
@@ -0,0 +1,28 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<iframe frameborder="no" style="margin:0px;padding:0px;width:100%;height:920px" src="http://addons.prestashop.com/iframe/search.php?parentUrl={$parentDomain}"></iframe>
|
||||
<div class="clear"> </div>
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<iframe frameborder="no" style="margin:0px;padding:0px;width:960px;height:920px" src="http://addons.prestashop.com/iframe/myaccount.php?parentUrl={$parentDomain}"></iframe>
|
||||
<div class="clear"> </div>
|
||||
@@ -0,0 +1,105 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{extends file="helper/form/form.tpl"}
|
||||
|
||||
{block name="label"}
|
||||
{/block}
|
||||
|
||||
{block name="start_field_block"}
|
||||
{if $input.type == 'text_customer'}
|
||||
{if isset($customer)}
|
||||
<label>{$input.label}</label>
|
||||
<div class="margin-form"><a style="display: block; padding-top: 4px;" href="?tab=AdminCustomers&id_customer={$customer->id}&viewcustomer&token={$tokenCustomer}">{$customer->lastname} {$customer->firstname} ({$customer->email})</a></div>
|
||||
<input type="hidden" name="id_customer" value="{$customer->id}" />
|
||||
<input type="hidden" name="email" value="{$customer->email}" />
|
||||
{else}
|
||||
<script type="text/javascript">
|
||||
$('input[name=email]').live('blur', function(e)
|
||||
{
|
||||
var email = $(this).val();
|
||||
if (email.length > 5)
|
||||
{
|
||||
var data = {};
|
||||
data.email = email;
|
||||
data.token = "{$token}";
|
||||
data.ajax = 1;
|
||||
data.controller = "AdminAddresses";
|
||||
data.action = "loadNames";
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "ajax-tab.php",
|
||||
data: data,
|
||||
dataType: 'json',
|
||||
async : true,
|
||||
success: function(msg)
|
||||
{
|
||||
if (msg)
|
||||
{
|
||||
var infos = msg.infos.split('_');
|
||||
$('input[name=firstname]').val(infos[0]);
|
||||
$('input[name=lastname]').val(infos[1]);
|
||||
}
|
||||
},
|
||||
error: function(msg)
|
||||
{
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<label>{l s='Customer e-mail'}</label>
|
||||
<div class="margin-form">
|
||||
<input type="text" size="33" name="email" value="{$fields_value[$input.name]|escape:'htmlall':'UTF-8'}" style="text-transform: lowercase;" /> <sup>*</sup>
|
||||
</div>
|
||||
{/if}
|
||||
{else}
|
||||
{if $input.name == 'vat_number'}
|
||||
{if $vat == 'is_applicable'}
|
||||
<div id="vat_area" style="display: visible">
|
||||
{else if $vat == 'management'}
|
||||
<div id="vat_area" style="display: hidden">
|
||||
{else}
|
||||
<div style="display: none;">
|
||||
{/if}
|
||||
{else if $input.name == 'id_state'}
|
||||
<div id="contains_states" {if $contains_states}style="display:none;"{/if}>
|
||||
{/if}
|
||||
<label>{$input.label} </label>
|
||||
<div class="margin-form">
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block name="end_field_block"}
|
||||
{* close div margin-form *}
|
||||
{if $input.type != 'text_customer'}
|
||||
</div>
|
||||
{/if}
|
||||
{* close hidden div *}
|
||||
{if $input.name == 'vat_number' || $input.name == 'id_state'}
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
@@ -0,0 +1,39 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 9197 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<script>
|
||||
function confirmProductAttached(productList)
|
||||
{
|
||||
var confirm_text = "{l s='This attachment is used by the following products:'}";
|
||||
if (confirm('{$confirm}'))
|
||||
return confirm(confirm_text + product_list);
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
|
||||
<a href="{$href}" onclick="{if isset($product_attachements[$id])}return confirmProductAttached('{$product_list[$id]}'){else}return confirm('{$confirm}'){/if}">
|
||||
<img src="../img/admin/delete.gif" alt="{$action}" title="{$action}" />
|
||||
</a>
|
||||
|
||||
@@ -0,0 +1,145 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<script type="text/javascript">
|
||||
i18n_tax_exc = "{l s='Tax Excl.:'}";
|
||||
i18n_tax_inc = "{l s='Tax Incl.:'}";
|
||||
|
||||
var product_tax = "{$tax_rates}";
|
||||
function calcPrice(element, element_has_tax)
|
||||
{
|
||||
name = element.attr("name");
|
||||
var element_price = element.val().replace(/,/g, ".");
|
||||
var other_element_price = "0";
|
||||
|
||||
if (!isNaN(element_price) && element_price > 0)
|
||||
{
|
||||
if (element_has_tax)
|
||||
other_element_price = parseFloat(element_price / ((product_tax / 100) + 1));
|
||||
else
|
||||
other_element_price = ps_round(parseFloat(element_price * ((product_tax / 100) + 1)), 2);
|
||||
}
|
||||
|
||||
$("#related_to_"+name).val(other_element_price);
|
||||
}
|
||||
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
$(".price_impact").each(function()
|
||||
{
|
||||
calcPrice($(this), false);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="toolbarBox">
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn}
|
||||
<div class="pageTitle">
|
||||
<h3>
|
||||
<span id="current_obj" style="font-weight: normal;">{$title|default:' '}</span>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if $generate}
|
||||
<div class="module_confirmation conf confirm">
|
||||
{$combinations_size} {l s='product(s) successfully created.'}
|
||||
</div>
|
||||
{/if}
|
||||
<script type="text/javascript" src="../js/attributesBack.js"></script>
|
||||
<form enctype="multipart/form-data" method="post" id="generator" action="{$url_generator}">
|
||||
<fieldset style="margin-bottom: 35px;">
|
||||
<legend><img src="../img/admin/asterisk.gif" />{l s='Attributes generator'}</legend>
|
||||
<div style="display: block; margin-bottom: 20px;" class="hint">{l s='To generate the attributes, click on the "Ctrl", select your attributes and click "Add".'}</div>
|
||||
<div style="float: left; margin-right:50px;">
|
||||
<div>
|
||||
<select multiple name="attributes[]" id="attribute_group" style="width: 200px; height: 350px; margin-bottom: 10px;">
|
||||
{foreach $attribute_groups as $k => $attribute_group}
|
||||
{if isset($attribute_js[$attribute_group['id_attribute_group']])}
|
||||
<optgroup name="{$attribute_group['id_attribute_group']}" id="{$attribute_group['id_attribute_group']}" label="{$attribute_group['name']|escape:'htmlall':'UTF-8'}">
|
||||
{foreach $attribute_js[$attribute_group['id_attribute_group']] as $k => $v}
|
||||
<option name="{$k}" id="attr_{$k}" value="{$v|escape:'htmlall':'UTF-8'}" title="{$v|escape:'htmlall':'UTF-8'}">{$v|escape:'htmlall':'UTF-8'}</option>
|
||||
{/foreach}
|
||||
</optgroup>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<p style="text-align: center;">
|
||||
<input class="button" type="button" style="margin: 0 0 10px 20px;" value="{l s='Add'}" class="button" onclick="add_attr_multiple();" />
|
||||
<input class="button" type="button" style="margin: 0 0 10px 20px;" value="{l s='Delete'}" class="button" onclick="del_attr_multiple();" /><br />
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
{l s='Add or modify attributes for product:'} <b>{$product_name}</b>
|
||||
<br /><br />
|
||||
<div style="padding-top:10px; float: left; width: 570px;">
|
||||
<div style="float:left;">
|
||||
<label>{l s='Quantity'}</label>
|
||||
<div class="margin-form">
|
||||
<input type="text" size="20" name="quantity" value="0"/>
|
||||
</div>
|
||||
<label>{l s='Reference'}</label>
|
||||
<div class="margin-form">
|
||||
<input type="text" size="20" name="reference" value="{$product_reference}"/>
|
||||
</div>
|
||||
</div>
|
||||
<div style="float:left; text-align:center; margin-left:20px;">
|
||||
<input type="submit" class="button" style="margin-bottom:5px;" name="generate" value="{l s='Generate'}" /><br />
|
||||
</div>
|
||||
<br style="clear:both;" />
|
||||
<div style="margin-top: 15px;">
|
||||
{foreach $attribute_groups as $k => $attribute_group}
|
||||
{if isset($attribute_js[$attribute_group['id_attribute_group']])}
|
||||
<br class="clear"/>
|
||||
<table class="table" cellpadding="0" cellspacing="0" align="left" style="margin-bottom: 10px; display: none;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th id="tab_h1" style="width: 150px">{$attribute_group['name']|escape:'htmlall':'UTF-8'}</th>
|
||||
<th id="tab_h2" style="width: 350px" colspan="2">{l s='Price impact'} {$currency_sign}</th>
|
||||
<th style="width: 150px">{l s='Weight impact'} ({$weight_unit})</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="table_{$attribute_group['id_attribute_group']}" name="result_table">
|
||||
</tbody>
|
||||
</table>
|
||||
{if isset($attributes[$attribute_group['id_attribute_group']])}
|
||||
{foreach $attributes[$attribute_group['id_attribute_group']] AS $k => $attribute}
|
||||
<script type="text/javascript">
|
||||
$('#table_{$attribute_group['id_attribute_group']}').append(create_attribute_row({$k}, {$attribute_group['id_attribute_group']}, '{$attribute['attribute_name']|addslashes}', {$attribute['price']}, {$attribute['weight']}));
|
||||
toggle(getE('table_' + {$attribute_group['id_attribute_group']}).parentNode, true);
|
||||
</script>
|
||||
{/foreach}
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
@@ -0,0 +1,55 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 8971 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{extends file="helper/form/form.tpl"}
|
||||
|
||||
{block name="label"}
|
||||
{if $input.type == 'color'}
|
||||
<div id="colorAttributeProperties" style="display:{if $colorAttributeProperties}block{else}none{/if}";>
|
||||
{/if}
|
||||
{if isset($input.label)}
|
||||
<label>{$input.label} </label>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
|
||||
{block name="end_field_block"}
|
||||
{if $input.type == 'text' && $input.name == 'texture'}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block name="script"}
|
||||
var attributesGroups = {ldelim}{$strAttributesGroups}{rdelim};
|
||||
$('#id_attribute_group').change(function() {
|
||||
var val = $(this).val();
|
||||
if (attributesGroups[val])
|
||||
$('#colorAttributeProperties').show();
|
||||
else
|
||||
$('#colorAttributeProperties').hide();
|
||||
});
|
||||
{/block}
|
||||
@@ -0,0 +1,133 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 9608 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<tbody>
|
||||
{if count($list)}
|
||||
{foreach $list AS $index => $tr}
|
||||
<tr
|
||||
{if $is_dnd_identifier}id="tr_{$tr.id_attribute_group}_{$tr.$identifier}_{if isset($tr.position['position'])}{$tr.position['position']}{else}0{/if}"{/if}
|
||||
{if $index is odd}class="alt_row"{/if}
|
||||
{if isset($tr.color) && $color_on_bg}style="background-color: {$tr.color}"{/if}
|
||||
>
|
||||
<td class="center">
|
||||
{if {$has_bulk_actions}}
|
||||
{if isset($list_skip_actions.delete)}
|
||||
{if !in_array($tr.$identifier, $list_skip_actions.delete)}
|
||||
<input type="checkbox" name="{$table}Box[]" value="{$tr.$identifier}" class="noborder" />
|
||||
{/if}
|
||||
{else}
|
||||
<input type="checkbox" name="{$table}Box[]" value="{$tr.$identifier}" class="noborder" />
|
||||
{/if}
|
||||
{/if}
|
||||
</td>
|
||||
{foreach $fields_display AS $key => $params}
|
||||
<td
|
||||
{if isset($params.position)}
|
||||
id="td_{if $id_category}{$id_category}{else}0{/if}_{$tr.$identifier}"
|
||||
{/if}
|
||||
class="{if !$no_link}pointer{/if}
|
||||
{if isset($params.position) && $order_by == 'position'} dragHandle{/if}
|
||||
{if isset($params.align)} {$params.align}{/if}"
|
||||
|
||||
{if (!isset($params.position) && !$no_link)}
|
||||
onclick="document.location = '{$current_index}&{$identifier}={$tr.$identifier}{if $view}&view{else}&update{/if}{$table}&token={$token}'">
|
||||
{else}
|
||||
>
|
||||
{/if}
|
||||
{if isset($params.prefix)}{$params.prefix}{/if}
|
||||
{if isset($params.color) && isset($tr[$params.color])}
|
||||
<span class="color_field" style="background-color: {$tr.color}">
|
||||
{/if}
|
||||
{if isset($params.active)}
|
||||
{$tr.$key}
|
||||
{elseif isset($params.activeVisu)}
|
||||
<img src="../img/admin/{if $tr.$key}enabled.gif{else}disabled.gif{/if}"
|
||||
alt="{if $tr.$key}{l s='Enabled'}{else}{l s='Disabled'}{/if}" title="{if $tr.$key}{l s='Enabled'}{else}{l s='Disabled'}{/if}" />
|
||||
{elseif isset($params.position)}
|
||||
{if $order_by == 'position' && $order_way != 'DESC'}
|
||||
<a href="{$tr.$key.position_url_down}" {if !($tr.$key.position != $positions[count($positions) - 1])}style="display: none;"{/if}>
|
||||
<img src="../img/admin/{if $order_way == 'ASC'}down{else}up{/if}.gif" alt="{l s='Down'}" title="{l s='Down'}" />
|
||||
</a>
|
||||
|
||||
<a href="{$tr.$key.position_url_up}" {if !($tr.$key.position != $positions.0)}style="display: none;"{/if}>
|
||||
<img src="../img/admin/{if $order_way == 'ASC'}up{else}down{/if}.gif" alt="{l s='Up'}" title="{l s='Up'}" />
|
||||
</a>
|
||||
{else}
|
||||
{$tr.$key.position + 1}
|
||||
{/if}
|
||||
{elseif isset($params.image)}
|
||||
{$tr.$key}
|
||||
{elseif (isset($params.icon))}
|
||||
<img src="../img/admin/{$tr[$key]}" alt="{$tr[$key]}" title="{$tr[$key]}" />
|
||||
{elseif isset($params.price)}
|
||||
{$tr.$key}
|
||||
{elseif isset($params.float)}
|
||||
{$tr.$key}
|
||||
{elseif isset($params.type) && $params.type == 'date'}
|
||||
{$tr.$key}
|
||||
{elseif isset($params.type) && $params.type == 'datetime'}
|
||||
{$tr.$key}
|
||||
{* If type is 'editable', an input is created *}
|
||||
{elseif isset($params.type) && $params.type == 'editable' && isset($tr.id)}
|
||||
<input type="text" name="{$key}_{$tr.id}" value="{$tr.$key}" class="{$key}" />
|
||||
{elseif isset($params.callback)}
|
||||
{$tr.$key}
|
||||
{elseif isset($tr.$key) && $key == 'color'}
|
||||
<div style="float: left; width: 18px; height: 12px; border: 1px solid #996633; background-color: {$tr.$key}; margin-right: 4px;"></div>
|
||||
{elseif isset($tr.$key)}
|
||||
{$tr.$key|escape:'htmlall':'UTF-8'}
|
||||
{else}
|
||||
--
|
||||
{/if}
|
||||
{if isset($params.suffix)}{$params.suffix}{/if}
|
||||
{if isset($params.color) && isset($tr.color)}
|
||||
</span>
|
||||
{/if}
|
||||
</td>
|
||||
{/foreach}
|
||||
|
||||
{if $shop_link_type}
|
||||
<td class="center" title="{$tr.shop_name}">
|
||||
{if isset($tr.shop_short_name)}
|
||||
{$tr.shop_short_name}
|
||||
{else}
|
||||
{$tr.shop_name}
|
||||
{/if}</td>
|
||||
{/if}
|
||||
{if $has_actions}
|
||||
<td class="center" style="white-space: nowrap;">
|
||||
{foreach $actions AS $action}
|
||||
{if isset($tr.$action)}
|
||||
{$tr.$action}
|
||||
{/if}
|
||||
{/foreach}
|
||||
</td>
|
||||
{/if}
|
||||
</tr>
|
||||
{/foreach}
|
||||
{else}
|
||||
<tr><td class="center" colspan="{count($fields_display) + 2}">{l s='No items found'}</td></tr>
|
||||
{/if}
|
||||
</tbody>
|
||||
@@ -0,0 +1,116 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 9608 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<tbody>
|
||||
{foreach $list AS $index => $tr}
|
||||
<tr
|
||||
{if $is_dnd_identifier}id="tr_{$tr.$identifier}_{$tr.position['position']}"{/if}
|
||||
{if $index is odd}class="alt_row"{/if}
|
||||
{if isset($tr.color) && $color_on_bg}style="background-color: {$tr.color}"{/if}
|
||||
>
|
||||
<td class="center">
|
||||
{if $bulk_actions}
|
||||
{assign var=bulkActionPossible value=true}
|
||||
{foreach $list_skip_actions as $key => $value}
|
||||
{if in_array($tr.$identifier, $value) == true}
|
||||
{assign var=bulkActionPossible value=false}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{if $bulkActionPossible == true}
|
||||
<input type="checkbox" name="{$table}Box[]" value="{$tr.$identifier}" class="noborder" />
|
||||
{/if}
|
||||
{/if}
|
||||
</td>
|
||||
{foreach $fields_display AS $key => $params}
|
||||
<td
|
||||
{if isset($params.position)}
|
||||
id="td_{if $id_category}{$id_category}{else}0{/if}_{$tr.$identifier}"
|
||||
{/if}
|
||||
class="{if !$no_link}pointer{/if}
|
||||
{if isset($params.position) && $order_by == 'position'} dragHandle{/if}
|
||||
{if isset($params.align)} {$params.align}{/if}"
|
||||
|
||||
{if (!isset($params.position) && !$no_link)}
|
||||
onclick="document.location = '{$current_index}&{$identifier}={$tr.$identifier}{if $view}&view{else}&update{/if}{$table}&token={$token}'">{if isset($params.prefix)}{$params.prefix}{/if}
|
||||
{else}
|
||||
>
|
||||
{/if}
|
||||
{if isset($params.active)}
|
||||
{$tr.$key}
|
||||
{elseif isset($params.activeVisu)}
|
||||
<img src="../img/admin/{if $tr.$key}enabled.gif{else}disabled.gif{/if}"
|
||||
alt="{if $tr.$key}{l s='Enabled'}{else}{l s='Disabled'}{/if}" title="{if $tr.$key}{l s='Enabled'}{else}{l s='Disabled'}{/if}" />
|
||||
{elseif isset($params.position)}
|
||||
{if $order_by == 'position' && $order_way != 'DESC'}
|
||||
<a href="{$tr.$key.position_url_down}" {if !($tr.$key.position != $positions[count($positions) - 1])}style="display: none;"{/if}>
|
||||
<img src="../img/admin/{if $order_way == 'ASC'}down{else}up{/if}.gif" alt="{l s='Down'}" title="{l s='Down'}" />
|
||||
</a>
|
||||
|
||||
<a href="{$tr.$key.position_url_up}" {if !($tr.$key.position != $positions.0)}style="display: none;"{/if}>
|
||||
<img src="../img/admin/{if $order_way == 'ASC'}up{else}down{/if}.gif" alt="{l s='Up'}" title="{l s='Up'}" />
|
||||
</a>
|
||||
{else}
|
||||
{$tr.$key.position + 1}
|
||||
{/if}
|
||||
{elseif isset($params.image)}
|
||||
{$tr.$key}
|
||||
{elseif (isset($params.icon))}
|
||||
<img src="../img/admin/{$tr[$key]}" alt="{$tr[$key]}" title="{$tr[$key]}" />
|
||||
{elseif isset($params.price)}
|
||||
{$tr.$key}
|
||||
{elseif isset($params.float)}
|
||||
{$tr.$key}
|
||||
{elseif isset($params.type) && $params.type == 'date'}
|
||||
{$tr.$key}
|
||||
{elseif isset($params.type) && $params.type == 'datetime'}
|
||||
{$tr.$key}
|
||||
{elseif isset($params.callback)}
|
||||
{$tr.$key}
|
||||
{elseif isset($tr.$key) && $key == 'color'}
|
||||
<div style="float: left; width: 18px; height: 12px; border: 1px solid #996633; background-color: {$tr.$key}; margin-right: 4px;"></div>
|
||||
{elseif isset($tr.$key)}
|
||||
{$tr.$key|escape:'htmlall':'UTF-8'}
|
||||
{else}
|
||||
--
|
||||
{/if}
|
||||
{if isset($params.suffix)}{$params.suffix}{/if}
|
||||
</td>
|
||||
{/foreach}
|
||||
|
||||
{if $shop_link_type}
|
||||
<td class="center" {if $name != $tr.shop_name}title="{$tr.shop_name}"{/if}>{if isset($tr.shop_short_name)}{$tr.shop_short_name}{else}{$tr.shop_name}{/if}</td>
|
||||
{/if}
|
||||
{if $has_actions}
|
||||
<td class="center" style="white-space: nowrap;">
|
||||
{foreach $actions AS $action}
|
||||
{if isset($tr.$action)}
|
||||
{$tr.$action}
|
||||
{/if}
|
||||
{/foreach}
|
||||
</td>
|
||||
{/if}
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
@@ -0,0 +1,74 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 8971 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{extends file="helper/view/view.tpl"}
|
||||
|
||||
{block name="override_tpl"}
|
||||
|
||||
<fieldset class="width3">
|
||||
<legend><img src="../img/admin/AdminBackup.gif" alt="" class="icon" /> {l s='Download'}</legend>
|
||||
<p style="font-size: 13px;">
|
||||
<a href="{$backup_url}"><img src="../img/admin/AdminBackup.gif" alt="" class="icon" /></a>
|
||||
<b><a href="{$backup_url}">{l s='Download the Backup file'} ({$backup_weight}{l s='Mb'})</a></b><br /><br />
|
||||
{l s='Tip: You can also download this file by FTP, Backup files are located in "admin/backups" directory.'}</p>
|
||||
</fieldset><br /><br />
|
||||
|
||||
<div class="error width1" style="float: left; margin-right: 10px;">
|
||||
<p>{l s='Disclaimer before creating a new Backup'}</p>
|
||||
<ol style="font-size: 11px; font-weight: normal; line-height: 20px; padding-left: 10px;">
|
||||
<li>{l s='PrestaShop is not responsible for your database, Backups, restore and data.'}</li>
|
||||
<li>{l s='PrestaShop is an Open-source software, you are using it at your own risk under the licence agreement.'}</li>
|
||||
<li>{l s='You should Backup your data on a regular basis (both files and database).'}</li>
|
||||
<li>{l s='This function only backs up your database, not your files.'}</li>
|
||||
<li>{l s='By default, your existing database tables will be deleted during Backup restore (see options).'}</li>
|
||||
<li>{l s='Always verify the quality and integrity of your Backups files.'}</li>
|
||||
<li>{l s='Always verify that your Backups files are complete, up-to-date and valid. Even if you had a success message during the Backup process.'}</li>
|
||||
<li>{l s='Always check your data.'}</li>
|
||||
<li>{l s='Never restore a Backup on a live site.'}</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
<div class="warn width2" style="float: left;">
|
||||
<p>{l s='How-to restore a database Backup in 10 easy steps'}</p>
|
||||
<ol style="font-size: 11px; font-weight: normal; line-height: 20px;">
|
||||
<li>{l s='Turn off the "Enable Shop" option in the "Preferences" tab.'}</li>
|
||||
<li>{l s='Download the Backup from the list below or from your FTP server (in the folder "admin/backups").'}</li>
|
||||
<li>{l s='Check the Backup integrity: look for errors, incomplete file. Verify all your data.'}</li>
|
||||
<li>{l s='Ask your hosting provider for a "phpMyAdmin" access to your database'}</li>
|
||||
<li>{l s='Connect to "phpMyAdmin" and select your current database'}</li>
|
||||
<li>{l s='Unless you enabled the "Drop existing tables" option, you must delete all tables from your current database.'}</li>
|
||||
<li>{l s='At the top of the screen select the tab "Import"'}</li>
|
||||
<li>{l s='Click on the "Browse..." button and select the Backup file from your hard drive'}</li>
|
||||
<li>{l s='Check the max. allowed filesize (ie. Max: 16Mb)'}<br />{l s='If your Backup file exceeds this limit, contact your hosting provider'}</li>
|
||||
<li>{l s='Click on the "Go" button and wait during the import, the process can take several minutes'}</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
{/block}
|
||||
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 9639 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{extends file="helper/list/list_header.tpl"}
|
||||
|
||||
{block name="override_header"}
|
||||
|
||||
<div class="error width1" style="float: left; margin-right: 10px;">
|
||||
<p>{l s='Disclaimer before creating a new Backup'}</p>
|
||||
<ol style="font-size: 11px; font-weight: normal; line-height: 20px; padding-left: 10px;">
|
||||
<li>{l s='PrestaShop is not responsible for your database, Backups, restore and data.'}</li>
|
||||
<li>{l s='PrestaShop is an Open-source software, you are using it at your own risk under the licence agreement.'}</li>
|
||||
<li>{l s='You should Backup your data on a regular basis (both files and database).'}</li>
|
||||
<li>{l s='This function only backs up your database, not your files.'}</li>
|
||||
<li>{l s='By default, your existing database tables will be deleted during Backup restore (see options).'}</li>
|
||||
<li>{l s='Always verify the quality and integrity of your Backups files.'}</li>
|
||||
<li>{l s='Always verify that your Backups files are complete, up-to-date and valid. Even if you had a success message during the Backup process.'}</li>
|
||||
<li>{l s='Always check your data.'}</li>
|
||||
<li>{l s='Never restore a Backup on a live site.'}</li>
|
||||
</ol>
|
||||
<br />
|
||||
|
||||
<form action="{$currentIndex}&add{$table}&token={$token}" method="post" style="text-align:center;">
|
||||
<input type="submit" class="button" value="{l s='I read the disclaimer - Create a new Backup'}" style="padding:10px;font-weight:bold;border:1px solid;cursor:pointer;" />
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="warn width2" style="float: left;">
|
||||
<p>{l s='How-to restore a database Backup in 10 easy steps'}</p>
|
||||
<ol style="font-size: 11px; font-weight: normal; line-height: 20px;">
|
||||
<li>{l s='Turn off the "Enable Shop" option in the "Preferences" tab.'}</li>
|
||||
<li>{l s='Download the Backup from the list below or from your FTP server (in the folder "admin/backups").'}</li>
|
||||
<li>{l s='Check the Backup integrity: look for errors, incomplete file. Verify all your data.'}</li>
|
||||
<li>{l s='Ask your hosting provider for a "phpMyAdmin" access to your database'}</li>
|
||||
<li>{l s='Connect to "phpMyAdmin" and select your current database'}</li>
|
||||
<li>{l s='Unless you enabled the "Drop existing tables" option, you must delete all tables from your current database.'}</li>
|
||||
<li>{l s='At the top of the screen select the tab "Import"'}</li>
|
||||
<li>{l s='Click on the "Browse..." button and select the Backup file from your hard drive'}</li>
|
||||
<li>{l s='Check the max. allowed filesize (ie. Max: 16Mb)'}<br />{l s='If your Backup file exceeds this limit, contact your hosting provider'}</li>
|
||||
<li>{l s='Click on the "Go" button and wait during the import, the process can take several minutes'}</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
{/block}
|
||||
@@ -0,0 +1,41 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{extends file="helper/view/view.tpl"}
|
||||
|
||||
{block name="override_tpl"}
|
||||
|
||||
<div class="conf">{l s='Beginning download ...'}</div>
|
||||
|
||||
<p>{l s='Back-up file should automatically download.'}</p>
|
||||
|
||||
<p>{l s='If not,'} <b><a href="{$url_backup}">{l s='please click here!'}</a></b></p>
|
||||
|
||||
<iframe width="0" height="0" scrolling="no" frameborder="0" src="{$url_backup}"></iframe>
|
||||
|
||||
{/block}
|
||||
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 8971 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{extends file="helper/form/form.tpl"}
|
||||
|
||||
{block name=script}
|
||||
// At the loading
|
||||
($("input[name='is_free']:checked").val() == 0) ? $('#shipping_costs_div').show('toggle'): $('#shipping_costs_div').hide();
|
||||
|
||||
$("input[name='is_free']").live('change', function() {ldelim}
|
||||
($("input[name='is_free']:checked").val() == 0) ? $('#shipping_costs_div').show('toggle'): $('#shipping_costs_div').hide();
|
||||
{rdelim});
|
||||
{/block}
|
||||
|
||||
{block name="label"}
|
||||
{if $input.type == 'select' && $input.name == 'id_tax_rules_group'}
|
||||
<div id="shipping_costs_div" style="display:{if isset($fields_value.is_free) && $fields_value.is_free}none{else}block{/if}">
|
||||
{/if}
|
||||
{if isset($input.label)}
|
||||
<label>{$input.label} </label>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block name="end_field_block"}
|
||||
{if $input.type == 'select' && $input.name == 'range_behavior'}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/block}
|
||||
@@ -0,0 +1,110 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 8971 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<label>{l s='Free shipping'}</label>
|
||||
<div class="margin-form">
|
||||
|
||||
<input type="radio" name="free_shipping" id="free_shipping_on" value="1" {if $currentTab->getFieldValue($currentObject, 'free_shipping')|intval}checked="checked"{/if} />
|
||||
<label class="t" for="free_shipping_on"> <img src="../img/admin/enabled.gif" alt="{l s='Enabled'}" title="{l s='Enabled'}" style="cursor:pointer" /></label>
|
||||
|
||||
<input type="radio" name="free_shipping" id="free_shipping_off" value="0" {if !$currentTab->getFieldValue($currentObject, 'free_shipping')|intval}checked="checked"{/if} />
|
||||
<label class="t" for="free_shipping_off"> <img src="../img/admin/disabled.gif" alt="{l s='Disabled'}" title="{l s='Disabled'}" style="cursor:pointer" /></label>
|
||||
</div>
|
||||
<hr />
|
||||
<label>{l s='Apply a discount'}</label>
|
||||
<div class="margin-form">
|
||||
|
||||
<input type="radio" name="apply_discount" id="apply_discount_percent" value="percent" {if $currentTab->getFieldValue($currentObject, 'reduction_percent')|intval}checked="checked"{/if} />
|
||||
<label class="t" for="apply_discount_percent"> <img src="../img/admin/enabled.gif" alt="{l s='Enabled'}" title="{l s='Enabled'}" style="cursor:pointer" /> {l s='Percent (%)'}</label>
|
||||
|
||||
<input type="radio" name="apply_discount" id="apply_discount_amount" value="amount" {if $currentTab->getFieldValue($currentObject, 'reduction_amount')|intval}checked="checked"{/if} />
|
||||
<label class="t" for="apply_discount_amount"> <img src="../img/admin/enabled.gif" alt="{l s='Enabled'}" title="{l s='Enabled'}" style="cursor:pointer" /> {l s='Amount'}</label>
|
||||
|
||||
<input type="radio" name="apply_discount" id="apply_discount_off" value="off" {if !$currentTab->getFieldValue($currentObject, 'reduction_amount')|intval && !$currentTab->getFieldValue($currentObject, 'reduction_percent')|intval}checked="checked"{/if} />
|
||||
<label class="t" for="apply_discount_off"> <img src="../img/admin/disabled.gif" alt="{l s='Disabled'}" title="{l s='Disabled'}" style="cursor:pointer" /> {l s='None'}</label>
|
||||
</div>
|
||||
<div id="apply_discount_percent_div">
|
||||
<label>{l s='Value (%)'}</label>
|
||||
<div class="margin-form">
|
||||
<input type="text" id="reduction_percent" name="reduction_percent" value="{$currentTab->getFieldValue($currentObject, 'reduction_percent')|floatval}" />
|
||||
<p>{l s='Does not apply to the shipping costs'}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="apply_discount_amount_div">
|
||||
<label>{l s='Value'}</label>
|
||||
<div class="margin-form">
|
||||
<input type="text" id="reduction_amount" name="reduction_amount" value="{$currentTab->getFieldValue($currentObject, 'reduction_amount')|floatval}" />
|
||||
<select name="reduction_currency">
|
||||
{foreach from=$currencies item='currency'}
|
||||
<option value="{$currency.id_currency|intval}" {if $currentTab->getFieldValue($currentObject, 'reduction_currency') == $currency.id_currency || (!$currentTab->getFieldValue($currentObject, 'reduction_currency') && $currency.id_currency == $defaultCurrency)}selected="selected"{/if}>{$currency.iso_code}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
<select name="reduction_tax">
|
||||
<option value="0" {if $currentTab->getFieldValue($currentObject, 'reduction_tax') == 0}selected="selected"{/if}>{l s='Tax excluded'}</option>
|
||||
<option value="1" {if $currentTab->getFieldValue($currentObject, 'reduction_tax') == 1}selected="selected"{/if}>{l s='Tax included'}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div id="apply_discount_to_div">
|
||||
<label>{l s='Apply discount to'}</label>
|
||||
<div class="margin-form">
|
||||
|
||||
<input type="radio" name="apply_discount_to" id="apply_discount_to_order" value="order" {if $currentTab->getFieldValue($currentObject, 'reduction_product')|intval == 0}checked="checked"{/if} />
|
||||
<label class="t" for="apply_discount_to_order"> {l s='Order (without shipping)'}</label>
|
||||
|
||||
<input type="radio" name="apply_discount_to" id="apply_discount_to_product" value="specific" {if $currentTab->getFieldValue($currentObject, 'reduction_product')|intval > 0}checked="checked"{/if} />
|
||||
<label class="t" for="apply_discount_to_product"> {l s='Specific product'}</label>
|
||||
|
||||
<input type="radio" name="apply_discount_to" id="apply_discount_to_cheapest" value="cheapest" {if $currentTab->getFieldValue($currentObject, 'reduction_product')|intval == -1}checked="checked"{/if} />
|
||||
<label class="t" for="apply_discount_to_cheapest"> {l s='Cheapest product'}</label>
|
||||
|
||||
<input type="radio" name="apply_discount_to" id="apply_discount_to_selection" value="selection" {if $currentTab->getFieldValue($currentObject, 'reduction_product')|intval == -2}checked="checked"{/if} />
|
||||
<label class="t" for="apply_discount_to_selection"> {l s='Selected product(s)'}</label>
|
||||
</div>
|
||||
<div id="apply_discount_to_product_div">
|
||||
<label>{l s='Product'}</label>
|
||||
<div class="margin-form">
|
||||
<input type="hidden" id="reduction_product" name="reduction_product" value="{$currentTab->getFieldValue($currentObject, 'reduction_product')|intval}" />
|
||||
<input type="text" id="reductionProductFilter" name="reductionProductFilter" value="{$reductionProductFilter}" style="width:400px" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<label>{l s='Send a free gift'}</label>
|
||||
<div class="margin-form">
|
||||
|
||||
<input type="radio" name="free_gift" id="free_gift_on" value="1" {if $currentTab->getFieldValue($currentObject, 'gift_product')|intval}checked="checked"{/if} />
|
||||
<label class="t" for="free_gift_on"> <img src="../img/admin/enabled.gif" alt="{l s='Enabled'}" title="{l s='Enabled'}" style="cursor:pointer" /></label>
|
||||
|
||||
<input type="radio" name="free_gift" id="free_gift_off" value="0" {if !$currentTab->getFieldValue($currentObject, 'gift_product')|intval}checked="checked"{/if} />
|
||||
<label class="t" for="free_gift_off"> <img src="../img/admin/disabled.gif" alt="{l s='Disabled'}" title="{l s='Disabled'}" style="cursor:pointer" /></label>
|
||||
</div>
|
||||
<div id="free_gift_div">
|
||||
<label>{l s='Product'}</label>
|
||||
<div class="margin-form">
|
||||
<input type="hidden" id="gift_product" name="gift_product" value="{$currentTab->getFieldValue($currentObject, 'gift_product')|intval}" />
|
||||
<input type="text" id="giftProductFilter" name="giftProductFilter" value="{$giftProductFilter}" style="width:400px" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,213 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 8971 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<label>{l s='Limit to a single customer'}</label>
|
||||
<div class="margin-form">
|
||||
<input type="hidden" id="id_customer" name="id_customer" value="{$currentTab->getFieldValue($currentObject, 'id_customer')|intval}" />
|
||||
<input type="text" id="customerFilter" name="customerFilter" value="{$customerFilter}" style="width:400px" />
|
||||
<p>{l s='Optional, the cart rule will be available for everyone if you leave this field blank.'}</p>
|
||||
</div>
|
||||
<label>{l s='Validity'}</label>
|
||||
<div class="margin-form">
|
||||
<strong>{l s='from'}</strong>
|
||||
<input type="text" class="datepicker" name="date_from" value="{if $currentTab->getFieldValue($currentObject, 'date_from')}{$currentTab->getFieldValue($currentObject, 'date_from')}{else}{$defaultDateFrom}{/if}" />
|
||||
<strong>{l s='to'}</strong>
|
||||
<input type="text" class="datepicker" name="date_to" value="{if $currentTab->getFieldValue($currentObject, 'date_to')}{$currentTab->getFieldValue($currentObject, 'date_to')}{else}{$defaultDateTo}{/if}" />
|
||||
<p>{l s='Default period is one year.'}</p>
|
||||
</div>
|
||||
<label>{l s='Minimum amount'}</label>
|
||||
<div class="margin-form">
|
||||
<input type="text" name="minimum_amount" value="{$currentTab->getFieldValue($currentObject, 'minimum_amount')|floatval}" />
|
||||
<select name="minimum_amount_currency">
|
||||
{foreach from=$currencies item='currency'}
|
||||
<option value="{$currency.id_currency|intval}" {if $currentTab->getFieldValue($currentObject, 'minimum_amount_currency') == $currency.id_currency || (!$currentTab->getFieldValue($currentObject, 'minimum_amount_currency') && $currency.id_currency == $defaultCurrency)}selected="selected"{/if}>{$currency.iso_code}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
<select name="minimum_amount_tax">
|
||||
<option value="0" {if $currentTab->getFieldValue($currentObject, 'minimum_amount_tax') == 0}selected="selected"{/if}>{l s='Tax excluded'}</option>
|
||||
<option value="1" {if $currentTab->getFieldValue($currentObject, 'minimum_amount_tax') == 1}selected="selected"{/if}>{l s='Tax included'}</option>
|
||||
</select>
|
||||
<select name="minimum_amount_shipping">
|
||||
<option value="0" {if $currentTab->getFieldValue($currentObject, 'minimum_amount_shipping') == 0}selected="selected"{/if}>{l s='Shipping excluded'}</option>
|
||||
<option value="1" {if $currentTab->getFieldValue($currentObject, 'minimum_amount_shipping') == 1}selected="selected"{/if}>{l s='Shipping included'}</option>
|
||||
</select>
|
||||
<p>{l s='You can choose a minimum amount for the cart either with or without the taxes, with or without shipping.'}</p>
|
||||
</div>
|
||||
<label>{l s='Total available'}</label>
|
||||
<div class="margin-form">
|
||||
<input type="text" name="quantity" value="{$currentTab->getFieldValue($currentObject, 'quantity')|intval}" />
|
||||
</div>
|
||||
<label>{l s='Total available for each user'}</label>
|
||||
<div class="margin-form">
|
||||
<input type="text" name="quantity_per_user" value="{$currentTab->getFieldValue($currentObject, 'quantity_per_user')|intval}" />
|
||||
</div>
|
||||
{if $countries.unselected|@count + $countries.selected|@count > 1}
|
||||
<br />
|
||||
<input type="checkbox" id="country_restriction" name="country_restriction" value="1" {if $countries.unselected|@count}checked="checked"{/if} /> <strong>{l s='Country selection'}</strong>
|
||||
<div id="country_restriction_div" style="border:1px solid #AAAAAA;margin-top:10px;padding:0 10px 10px 10px;background-color:#FFF5D3">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<p><strong>{l s='Selected countries'}</strong></p>
|
||||
<select name="country_select[]" id="country_select_2" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
|
||||
{foreach from=$countries.selected item='country'}
|
||||
<option value="{$country.id_country|intval}"> {$country.name}</option>
|
||||
{/foreach}
|
||||
</select><br /><br />
|
||||
<a style="cursor:pointer;text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px" id="country_select_remove">
|
||||
{l s='Remove'} >>
|
||||
</a>
|
||||
</td>
|
||||
<td style="padding-left:20px;">
|
||||
<p><strong>{l s='Unselected countries'}</strong></p>
|
||||
<select id="country_select_1" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
|
||||
{foreach from=$countries.unselected item='country'}
|
||||
<option value="{$country.id_country|intval}"> {$country.name}</option>
|
||||
{/foreach}
|
||||
</select><br /><br />
|
||||
<a style="cursor:pointer;text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px" id="country_select_add">
|
||||
<< {l s='Add'}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
{if $carriers.unselected|@count + $carriers.selected|@count > 1}
|
||||
<br />
|
||||
<input type="checkbox" id="carrier_restriction" name="carrier_restriction" value="1" {if $carriers.unselected|@count}checked="checked"{/if} /> <strong>{l s='Carrier selection'}</strong>
|
||||
<div id="carrier_restriction_div" style="border:1px solid #AAAAAA;margin-top:10px;padding:0 10px 10px 10px;background-color:#FFF5D3">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<p><strong>{l s='Selected carriers'}</strong></p>
|
||||
<select name="carrier_select[]" id="carrier_select_2" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
|
||||
{foreach from=$carriers.selected item='carrier'}
|
||||
<option value="{$carrier.id_carrier|intval}"> {$carrier.name}</option>
|
||||
{/foreach}
|
||||
</select><br /><br />
|
||||
<a style="cursor:pointer;text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px" id="carrier_select_remove">
|
||||
{l s='Remove'} >>
|
||||
</a>
|
||||
</td>
|
||||
<td style="padding-left:20px;">
|
||||
<p><strong>{l s='Unselected carriers'}</strong></p>
|
||||
<select id="carrier_select_1" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
|
||||
{foreach from=$carriers.unselected item='carrier'}
|
||||
<option value="{$carrier.id_carrier|intval}"> {$carrier.name}</option>
|
||||
{/foreach}
|
||||
</select><br /><br />
|
||||
<a style="cursor:pointer;text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px" id="carrier_select_add">
|
||||
<< {l s='Add'}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
{if $groups.unselected|@count + $groups.selected|@count > 1}
|
||||
<br />
|
||||
<input type="checkbox" id="group_restriction" name="group_restriction" value="1" {if $groups.unselected|@count}checked="checked"{/if} /> <strong>{l s='Customer group selection'}</strong>
|
||||
<div id="group_restriction_div" style="border:1px solid #AAAAAA;margin-top:10px;padding:0 10px 10px 10px;background-color:#FFF5D3">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<p><strong>{l s='Selected groups'}</strong></p>
|
||||
<select name="group_select[]" id="group_select_2" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
|
||||
{foreach from=$groups.selected item='group'}
|
||||
<option value="{$group.id_group|intval}"> {$group.name}</option>
|
||||
{/foreach}
|
||||
</select><br /><br />
|
||||
<a style="text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px" id="group_select_remove">
|
||||
{l s='Remove'} >>
|
||||
</a>
|
||||
</td>
|
||||
<td style="padding-left:20px;">
|
||||
<p><strong>{l s='Unselected groups'}</strong></p>
|
||||
<select id="group_select_1" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
|
||||
{foreach from=$groups.unselected item='group'}
|
||||
<option value="{$group.id_group|intval}"> {$group.name}</option>
|
||||
{/foreach}
|
||||
</select><br /><br />
|
||||
<a style="text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px" id="group_select_add">
|
||||
<< {l s='Add'}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
{if $cart_rules.unselected|@count + $cart_rules.selected|@count > 0}
|
||||
<br />
|
||||
<input type="checkbox" id="cart_rule_restriction" name="cart_rule_restriction" value="1" {if $cart_rules.unselected|@count}checked="checked"{/if} /> <strong>{l s='Other cart rules compatibility'}</strong>
|
||||
<div id="cart_rule_restriction_div" style="border:1px solid #AAAAAA;margin-top:10px;padding:0 10px 10px 10px;background-color:#FFF5D3">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<p><strong>{l s='Combinable cart rules'}</strong></p>
|
||||
<select name="cart_rule_select[]" id="cart_rule_select_2" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
|
||||
{foreach from=$cart_rules.selected item='cart_rule'}
|
||||
<option value="{$cart_rule.id_cart_rule|intval}"> {$cart_rule.name}</option>
|
||||
{/foreach}
|
||||
</select><br /><br />
|
||||
<a style="text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px" id="cart_rule_select_remove">
|
||||
{l s='Remove'} >>
|
||||
</a>
|
||||
</td>
|
||||
<td style="padding-left:20px;">
|
||||
<p><strong>{l s='Uncombinable cart rules'}</strong></p>
|
||||
<select id="cart_rule_select_1" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple="">
|
||||
{foreach from=$cart_rules.unselected item='cart_rule'}
|
||||
<option value="{$cart_rule.id_cart_rule|intval}"> {$cart_rule.name}</option>
|
||||
{/foreach}
|
||||
</select><br /><br />
|
||||
<a style="text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px" id="cart_rule_select_add">
|
||||
<< {l s='Add'}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
<br />
|
||||
<input type="checkbox" id="product_restriction" name="product_restriction" value="1" {if $product_rules|@count}checked="checked"{/if} /> <strong>{l s='Product selection'}</strong>
|
||||
<div id="product_restriction_div" style="border:1px solid #AAAAAA;margin-top:10px;padding:10px 10px 10px 10px;background-color:#FFF5D3">
|
||||
{l s='Add a filter on'}
|
||||
<select id="product_rule_type">
|
||||
<option value="">{l s='-- Choose --'}</option>
|
||||
<option value="products">{l s='Products'}</option>
|
||||
<option value="attributes">{l s='Attributes'}</option>
|
||||
<option value="categories">{l s='Categories'}</option>
|
||||
</select>
|
||||
<a href="javascript:addProductRule();">
|
||||
<img src="../img/admin/add.gif" alt="{l s='Add'}" title="{l s='Add'}" /> {l s='Add'}
|
||||
</a>
|
||||
<hr />
|
||||
<table id="product_rule_table" class="table" cellpadding="0" cellspacing="0">
|
||||
{foreach from=$product_rules item='product_rule'}
|
||||
{$product_rule}
|
||||
{/foreach}
|
||||
</table>
|
||||
</div>
|
||||
@@ -0,0 +1,97 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 8971 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{if $show_toolbar}
|
||||
<div class="toolbar-placeholder">
|
||||
<div class="toolbarBox {if $toolbar_fix}toolbarHead{/if}">
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn}
|
||||
<div class="pageTitle">
|
||||
<h3>
|
||||
{block name=pageTitle}
|
||||
<span id="current_obj" style="font-weight: normal;">{$title|default:' '}</span>
|
||||
{/block}
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||
{/if}
|
||||
|
||||
<div>
|
||||
<div class="productTabs">
|
||||
<ul class="tab">
|
||||
<li class="tab-row">
|
||||
<a class="tab-page" id="cart_rule_link_informations" href="javascript:displayCartRuleTab('informations');">{l s='Informations'}</a>
|
||||
</li>
|
||||
<li class="tab-row">
|
||||
<a class="tab-page" id="cart_rule_link_conditions" href="javascript:displayCartRuleTab('conditions');">{l s='Conditions'}</a>
|
||||
</li>
|
||||
<li class="tab-row">
|
||||
<a class="tab-page" id="cart_rule_link_actions" href="javascript:displayCartRuleTab('actions');">{l s='Actions'}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<form action="{$currentIndex}&token={$currentToken}&addcart_rule" id="cart_rule_form" method="post">
|
||||
{if $currentObject->id}<input type="hidden" name="id_cart_rule" value="{$currentObject->id|intval}" />{/if}
|
||||
<input type="hidden" id="currentFormTab" name="currentFormTab" value="informations" />
|
||||
<div id="cart_rule_informations" class="cart_rule_tab">
|
||||
<h4>{l s='Cart rule informations'}</h4>
|
||||
<div class="separation"></div>
|
||||
{include file='controllers/cart_rules/informations.tpl'}
|
||||
</div>
|
||||
<div id="cart_rule_conditions" class="cart_rule_tab">
|
||||
<h4>{l s='Cart rule conditions'}</h4>
|
||||
<div class="separation"></div>
|
||||
{include file='controllers/cart_rules/conditions.tpl'}
|
||||
</div>
|
||||
<div id="cart_rule_actions" class="cart_rule_tab">
|
||||
<h4>{l s='Cart rule actions'}</h4>
|
||||
<div class="separation"></div>
|
||||
{include file='controllers/cart_rules/actions.tpl'}
|
||||
</div>
|
||||
<div class="separation"></div>
|
||||
<div style="text-align:center">
|
||||
<input type="submit" value="{l s='Save'}" class="button" name="submitAddcart_rule" id="{$table}_form_submit_btn" />
|
||||
<!--<input type="submit" value="{l s='Save and stay'}" class="button" name="submitAddcart_ruleAndStay" id="" />-->
|
||||
</div>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
var product_rules_counter = {if isset($product_rules_counter)}{$product_rules_counter}{else}0{/if};
|
||||
var currentToken = '{$currentToken}';
|
||||
var currentFormTab = '{if isset($smarty.post.currentFormTab)}{$smarty.post.currentFormTab|escape}{else}informations{/if}';
|
||||
|
||||
var languages = new Array();
|
||||
{foreach from=$languages item=language key=k}
|
||||
languages[{$k}] = {
|
||||
id_lang: {$language.id_lang},
|
||||
iso_code: '{$language.iso_code}',
|
||||
name: '{$language.name}'
|
||||
};
|
||||
{/foreach}
|
||||
displayFlags(languages, {$defaultLanguage});
|
||||
</script>
|
||||
|
||||
<script src="../js/admin_cart_rules.js" type="text/javascript"></script>
|
||||
@@ -0,0 +1,82 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 8971 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td style="width:50%">
|
||||
<label>{l s='Name'}</label>
|
||||
<div class="margin-form">
|
||||
<div class="translatable">
|
||||
{foreach from=$languages item=language}
|
||||
<div class="lang_{$language.id_lang}" style="display:{if $language.id_lang == $defaultLanguage}block{else}none{/if};float:left">
|
||||
<input type="text" id="name_{$language.id_lang}" name="name_{$language.id_lang}" value="{$currentTab->getFieldValue($currentObject, 'name', $language.id_lang)}" style="width:300px" />
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
<p class="clear">{l s='Will be displayed in the cart summary as well as on the invoice.'}</p>
|
||||
</div>
|
||||
<label>{l s='Code'}</label>
|
||||
<div class="margin-form">
|
||||
<input type="text" id="code" name="code" value="{$currentTab->getFieldValue($currentObject, 'code')}" />
|
||||
<img src="../img/admin/news-new.gif" onclick="gencode(8);" style="cursor:pointer" />
|
||||
<p>{l s='Optional, the rule will automatically be applied if you leave this field blank.'}</p>
|
||||
</div>
|
||||
<label>{l s='Partial use'}</label>
|
||||
<div class="margin-form">
|
||||
|
||||
<input type="radio" name="partial_use" id="partial_use_on" value="1" {if $currentTab->getFieldValue($currentObject, 'partial_use')|intval}checked="checked"{/if} />
|
||||
<label class="t" for="partial_use_on"> <img src="../img/admin/enabled.gif" alt="{l s='Allowed'}" title="{l s='Allowed'}" style="cursor:pointer" /></label>
|
||||
|
||||
<input type="radio" name="partial_use" id="partial_use_off" value="0" {if !$currentTab->getFieldValue($currentObject, 'partial_use')|intval}checked="checked"{/if} />
|
||||
<label class="t" for="partial_use_off"> <img src="../img/admin/disabled.gif" alt="{l s='Not allowed'}" title="{l s='Not allowed'}" style="cursor:pointer" /></label>
|
||||
<p>
|
||||
{l s='Only applicable if the voucher value is greater than the cart total.'}<br />
|
||||
{l s='If you do not allow partial use, the voucher value will be lowered to the total order amount, but if you do, a new voucher will be created with the remainder.'}
|
||||
</p>
|
||||
</div>
|
||||
<label>{l s='Priority'}</label>
|
||||
<div class="margin-form">
|
||||
<input type="text" name="priority" value="{$currentTab->getFieldValue($currentObject, 'priority')|intval}" />
|
||||
<p>{l s='Cart rules are applied to the cart by priority. A cart rule with priority of "1" will be processed before a cart rule with a priority of "2".'}</p>
|
||||
</div>
|
||||
<label>{l s='Status'}</label>
|
||||
<div class="margin-form">
|
||||
|
||||
<input type="radio" name="active" id="active_on" value="1" {if $currentTab->getFieldValue($currentObject, 'active')|intval}checked="checked"{/if} />
|
||||
<label class="t" for="active_on"> <img src="../img/admin/enabled.gif" alt="{l s='Enabled'}" title="{l s='Enabled'}" style="cursor:pointer" /></label>
|
||||
|
||||
<input type="radio" name="active" id="active_off" value="0" {if !$currentTab->getFieldValue($currentObject, 'active')|intval}checked="checked"{/if} />
|
||||
<label class="t" for="active_off"> <img src="../img/admin/disabled.gif" alt="{l s='Disabled'}" title="{l s='Disabled'}" style="cursor:pointer" /></label>
|
||||
</div>
|
||||
</td>
|
||||
<td style="width:50%">
|
||||
<label>{l s='Description'}</label>
|
||||
<div class="margin-form">
|
||||
<textarea name="description" style="width:90%;height:200px">{$currentTab->getFieldValue($currentObject, 'description')}</textarea>
|
||||
<p>{l s='For you only, never displayed to the customer.'}</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -0,0 +1,61 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 8971 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<tr id="product_rule_{$product_rule_id}_tr">
|
||||
<td>
|
||||
<a href="javascript:removeProductRule({$product_rule_id});">
|
||||
<img src="../img/admin/disabled.gif" alt="{l s='Remove'}" title="{l s='Remove'}" />
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<input type="hidden" name="product_rule[]" value="{$product_rule_id}" />
|
||||
<input type="hidden" name="product_rule_{$product_rule_id}_type" value="{$product_rule_type}" />
|
||||
[{$product_rule_type}] {l s='The cart must contain at least'}
|
||||
</td>
|
||||
<td style="padding:5px">
|
||||
<input type="text" name="product_rule_{$product_rule_id}_quantity" value="{$product_rule_quantity|intval}" style="width:30px" />
|
||||
</td>
|
||||
<td>
|
||||
{l s='product(s) matching'}
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" id="product_rule_{$product_rule_id}_match" value="" disabled="disabled" />
|
||||
</td>
|
||||
<td>
|
||||
<a id="product_rule_{$product_rule_id}_choose_link" href="#product_rule_{$product_rule_id}_choose_content">
|
||||
<img src="../img/admin/choose.gif" alt="{l s='Choose'}" title="{l s='Choose'}" /> {l s='Choose'}
|
||||
</a>
|
||||
<div>
|
||||
<div id="product_rule_{$product_rule_id}_choose_content">
|
||||
{$product_rule_choose_content}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<script type="text/javascript">
|
||||
$('#product_rule_{$product_rule_id}_choose_content').parent().hide();
|
||||
$("#product_rule_{$product_rule_id}_choose_link").fancybox();
|
||||
</script>
|
||||
@@ -0,0 +1,57 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 8971 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<p><strong>{l s='Selected'}</strong></p>
|
||||
<select name="product_rule_select_{$product_rule_id}[]" class="product_rule_toselect" id="product_rule_select_{$product_rule_id}_2" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
|
||||
{foreach from=$product_rule_itemlist.selected item='item'}
|
||||
<option value="{$item.id|intval}"> {$item.name}</option>
|
||||
{/foreach}
|
||||
</select><br /><br />
|
||||
<a style="cursor:pointer;text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px" id="product_rule_select_{$product_rule_id}_remove">
|
||||
{l s='Remove'} >>
|
||||
</a>
|
||||
</td>
|
||||
<td style="padding-left:20px;">
|
||||
<p><strong>{l s='Unselected'}</strong></p>
|
||||
<select id="product_rule_select_{$product_rule_id}_1" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
|
||||
{foreach from=$product_rule_itemlist.unselected item='item'}
|
||||
<option value="{$item.id|intval}"> {$item.name}</option>
|
||||
{/foreach}
|
||||
</select><br /><br />
|
||||
<a style="cursor:pointer;text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px" id="product_rule_select_{$product_rule_id}_add">
|
||||
<< {l s='Add'}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
$('#product_rule_select_{$product_rule_id}_remove').click(function() { removeCartRuleOption(this); updateProductRuleShortDescription(this); });
|
||||
$('#product_rule_select_{$product_rule_id}_add').click(function() { addCartRuleOption(this); updateProductRuleShortDescription(this); });
|
||||
$(document).ready(function() { updateProductRuleShortDescription($('#product_rule_select_{$product_rule_id}_add')); });
|
||||
</script>
|
||||
@@ -0,0 +1,191 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 9596 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{extends file="helper/view/view.tpl"}
|
||||
|
||||
{block name="override_tpl"}
|
||||
|
||||
<div id="container-customer">
|
||||
<h2><img src="../img/admin/basket.png" /><span>{if $customer->id}{$customer->firstname} {$customer->lastname}{else}{l s='Guest'}{/if} - {l s='Cart #'}{$cart->id|string_format:"%06d"}</span><span style="color:#585A69;padding-left:10px;">{l s='from'} {$cart->date_upd}</span></h2>
|
||||
<div class="separation"></div>
|
||||
|
||||
<div class="info-customer-left">
|
||||
<h2><img src="../img/admin/vcard.png" />{l s='Customer information'}</h2>
|
||||
<span style="font-size: 14px;">
|
||||
{if $customer->id}
|
||||
<a href="{$link->getAdminLink('AdminCustomers')}&id_customer={$customer->id}&viewcustomer">{$customer->firstname} {$customer->lastname}</a></span>
|
||||
{l s='#'}{$customer->id}<br />
|
||||
<a style="text-decoration: underline; color:#268CCD;" href="mailto:{$customer->email}">{$customer->email}</a> <br /><br />
|
||||
{l s='Account registered:'} {dateFormat date=$customer->date_add}<br />
|
||||
{l s='Valid orders placed:'} <b>{$customer_stats.nb_orders}</b><br />
|
||||
{l s='Total paid since registration:'} <b>{displayWtPriceWithCurrency price=$customer_stats.total_orders currency=$currency}</b><br />
|
||||
{else}
|
||||
{l s='Guest not registered'}
|
||||
{/if}
|
||||
</span>
|
||||
</div>
|
||||
<div class="info-customer-right">
|
||||
<h2><img src="../img/admin/cart.gif" /> {l s='Order information'}</h2>
|
||||
<span>
|
||||
{if $order->id}
|
||||
<a href="{$link->getAdminLink('AdminOrders')}&id_order={$order->id}&vieworder"> {l s='Order #'}{$order->id|string_format:"%06d"}</a></span>
|
||||
<br /><br />
|
||||
{l s='Made on:'} {dateFormat date=$order->date_add}<br /><br /><br /><br />
|
||||
{else}
|
||||
{l s='No order created from this cart'}</span>
|
||||
<p><a class="button" href="{$link->getAdminLink('AdminOrders')}&id_cart={$cart->id}&addorder">{l s='Create an order with this cart'}</a></p>
|
||||
{/if}
|
||||
</div>
|
||||
<br style="clear:both;" />
|
||||
<div class="separation"></div>
|
||||
|
||||
|
||||
<h2><img src="../img/admin/cart.gif" alt="{l s='Products'}" />{l s='Cart summary'}</h2>
|
||||
<br/>
|
||||
<table style="width:100%;" cellspacing="0" cellpadding="0" class="table" id="orderProducts">
|
||||
<thead>
|
||||
<tr>
|
||||
<th height="39" align="center" style="width: 60px"> </th>
|
||||
<th>{l s='Product'}</th>
|
||||
<th style="width: 80px; text-align: center">{l s='UP'}</th>
|
||||
<th style="width: 20px; text-align: center">{l s='Qty'}</th>
|
||||
<th style="width: 30px; text-align: center">{l s='Stock'}</th>
|
||||
<th style="width: 90px; text-align: right; font-weight:bold;">{l s='Total'}</th>
|
||||
</tr>
|
||||
<tbody>
|
||||
{foreach from=$products item='product'}
|
||||
{if isset($customized_datas[$product.id_product][$product.id_product_attribute])}
|
||||
<tr>
|
||||
<td align="center">{$product.image}</td>
|
||||
<td><a href="{$link->getAdminLink('AdminProducts')}&id_product={$product.id_product}&updateproduct">
|
||||
<span class="productName">{$product.name}</span>{if isset($product.attributes)}<br />{$product.attributes}{/if}<br />
|
||||
{if $product.reference}$this->l('Ref:') {$product.reference}{/if}
|
||||
{if $product.reference && $product.supplier_reference} / {$product.supplier_reference}{/if}
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">{displayWtPriceWithCurrency price=$product.price_wt currency=$currency}</td>
|
||||
<td align="center" class="productQuantity">{$product.customization_quantity}</td>
|
||||
<td align="center" class="productQuantity">{$product.qty_in_stock}</td>
|
||||
<td align="right">{displayWtPriceWithCurrency price=$product.total_customization_wt currency=$currency}</td>
|
||||
</tr>
|
||||
{foreach from=$customized_datas[$product.id_product][$product.id_product_attribute] item='customization'}
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
{foreach from=$customization.datas key='type' item='datas'}
|
||||
{if $type == constant('Product::CUSTOMIZE_FILE')}
|
||||
<ul style="margin: 0; padding: 0; list-style-type: none;">
|
||||
{foreach from=$datas key='index' item='data'}
|
||||
<li style="display: inline; margin: 2px;">
|
||||
<a href="displayImage.php?img={$data.value}&name={$order->id}-file{$smarty.foreach.count.index}" target="_blank">
|
||||
<img src="{$pic_dir}{$data.value}_small" alt="" /></a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{elseif $type == constant('Product::CUSTOMIZE_TEXTFIELD')}
|
||||
<ul style="margin-bottom: 4px; padding: 0; list-style-type: none;">
|
||||
{foreach from=$datas key='index' item='data'}
|
||||
<li>{if $data.name}{$data.name}{else}{l s='Text #'}{$smarty.foreach.count.index}{/if}{l s=':'}<b>{$data.value}</b></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</td>
|
||||
<td align="center"></td>
|
||||
<td align="center" class="productQuantity">{$customization.quantity}</td>
|
||||
<td align="center" class="productQuantity"></td>
|
||||
<td align="center"></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
{if $product.cart_quantity > $product.customization_quantity}
|
||||
<tr>
|
||||
<td align="center">{$product.image}</td>
|
||||
<td>
|
||||
<a href="{$link->getAdminLink('AdminProducts')}&id_product={$product.id_product}&updateproduct">
|
||||
<span class="productName">{$product.name}</span>{if isset($product.attributes)}<br />{$product.attributes}{/if}<br />
|
||||
{if $product.reference}{l s='Ref:'} {$product.reference}{/if}
|
||||
{if $product.reference && $product.supplier_reference} / {$product.supplier_reference}{/if}
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">{displayWtPriceWithCurrency price=$product.product_price currency=$currency}</td>
|
||||
<td align="center" class="productQuantity">{math equation='x - y' x=$product.cart_quantity y=$product.customization_quantity}</td>
|
||||
<td align="center" class="productQuantity">{$product.qty_in_stock}</td>
|
||||
<td align="right">{displayWtPriceWithCurrency price=$product.product_total currency=$currency}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/foreach}
|
||||
<tr class="cart_total_product">
|
||||
<td colspan="5">{l s='Total products:'}</td>
|
||||
<td class="price bold right">{displayWtPriceWithCurrency price=$total_products currency=$currency}</td>
|
||||
</tr>
|
||||
|
||||
{if $total_discounts != 0}
|
||||
<tr class="cart_total_voucher">
|
||||
<td colspan="5">{l s='Total vouchers:'}</td>
|
||||
<td class="price-discount bold right">{displayWtPriceWithCurrency price=$total_discounts currency=$currency}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if $total_wrapping > 0}
|
||||
<tr class="cart_total_voucher">
|
||||
<td colspan="5">{l s='Total gift-wrapping:'}</td>
|
||||
<td class="price-discount bold right">{displayWtPriceWithCurrency price=$total_wrapping currency=$currency}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if $cart->getOrderTotal(true, Cart::ONLY_SHIPPING) > 0}
|
||||
<tr class="cart_total_delivery">
|
||||
<td colspan="5">{l s='Total shipping:'}</td>
|
||||
<td class="price bold right">{displayWtPriceWithCurrency price=$total_shipping currency=$currency}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr class="cart_total_price">
|
||||
<td colspan="5" class="bold">{l s='Total:'}</td>
|
||||
<td class="price bold right">{displayWtPriceWithCurrency price=$total_price currency=$currency}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{if $discounts}
|
||||
<table cellspacing="0" cellpadding="0" class="table" style="width:280px; margin:15px 0px 0px 420px;">
|
||||
<tr>
|
||||
<th><img src="../img/admin/coupon.gif" alt="{l s='Discounts'}" />{l s='Discount name'}</th>
|
||||
<th align="center" style="width: 100px">{l s='Value'}</th>
|
||||
</tr>
|
||||
{foreach from=$discounts item='discount'}
|
||||
<tr>
|
||||
<td><a href="{$link->getAdminLink('AdminDiscounts')}&id_discount={$discount.id_discount}&updatediscount">{$discount.name}</a></td>
|
||||
<td align="center">- {displayWtPriceWithCurrency price=$discount.value_real currency=$currency}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/if}
|
||||
<div style="float:left; margin-top:15px;">
|
||||
{l s='According to the group of this customer, prices are printed:'} <b>{if $order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC}{l s='tax excluded'}{else}{l s='tax included'}{/if}</b>
|
||||
</div>
|
||||
|
||||
<div class="clear" style="height:20px;"> </div>
|
||||
{/block}
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,37 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 8971 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{extends file="helper/form/form.tpl"}
|
||||
|
||||
{block name="end_field_block"}
|
||||
{if ($input.name == 'groupBox')}
|
||||
<p class="hint" style="display:block">
|
||||
<span>{$input.info_introduction}</span><br />
|
||||
<span>{$input.unidentified}</span><br />
|
||||
<span>{$input.guest}</span><br />
|
||||
<span>{$input.customer}</span><br />
|
||||
</p><br /><br /><br /><br />
|
||||
{/if}</div>
|
||||
{/block}
|
||||
@@ -0,0 +1,53 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{extends file="helper/list/list_header.tpl"}
|
||||
|
||||
{block name=leadin}
|
||||
<div class="cat_bar2">
|
||||
{if count($categories_tree) == 0}
|
||||
{if $category_root->id_category == 0}
|
||||
<img src="../img/admin/home.gif" alt="" /> {$category_root->name}
|
||||
{else}
|
||||
<img src="../img/admin/home.gif" alt="" /> {$categories_name}
|
||||
{/if}
|
||||
{else}
|
||||
{if $category_root->id_category == 0}
|
||||
<a href="{$currentIndex}&token={$token}"><img src="../img/admin/home.gif" alt="" /> {$category_root->name}</a> >
|
||||
{else}
|
||||
<a href="{$currentIndex}&id_category={$category_root->id_category}&token={$token}"><img src="../img/admin/home.gif" alt="" /> {$category_root->name}</a> >
|
||||
{/if}
|
||||
|
||||
{foreach $categories_tree key=key item=category}
|
||||
{if $key == 0}
|
||||
{$category.name}
|
||||
{else}
|
||||
<a href="{$currentIndex}&token={$token}&id_category={$category.id_category}&viewcategory">{$category.name}</a> >
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
{/block}
|
||||
@@ -0,0 +1,77 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{extends file="helper/form/form.tpl"}
|
||||
|
||||
{block name="script"}
|
||||
$(document).ready(function() {
|
||||
if (btn_submit.length > 0)
|
||||
{
|
||||
//get reference on save and stay link
|
||||
btn_save_and_preview = $('span[class~="process-icon-save-and-preview"]').parent();
|
||||
|
||||
//get reference on current save link label
|
||||
lbl_save = $('#desc-{$table}-save div');
|
||||
|
||||
//submit the form
|
||||
if (btn_save_and_preview)
|
||||
{
|
||||
btn_save_and_preview.click(function() {
|
||||
//add hidden input to emulate submit button click when posting the form -> field name posted
|
||||
btn_submit.before('<input type="hidden" name="'+btn_submit.attr("name")+'AndPreview" value="1" />');
|
||||
$('#{$table}_form').submit();
|
||||
});
|
||||
}
|
||||
}
|
||||
$('#active_on').bind('click', function(){
|
||||
toggleDraftWarning(true);
|
||||
});
|
||||
$('#active_off').bind('click', function(){
|
||||
toggleDraftWarning(false);
|
||||
});
|
||||
});
|
||||
{/block}
|
||||
|
||||
{block name="leadin"}
|
||||
<div class="warn draft" style="{if $active}display:none{/if}">
|
||||
<p>
|
||||
<span style="float: left">
|
||||
{l s='Your CMS page will be saved as a draft'}
|
||||
</span>
|
||||
<br class="clear" />
|
||||
</p>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block name="start_field_block"}
|
||||
<div class="margin-form">
|
||||
{if $input.type == 'select_category'}
|
||||
<select name="{$input.name}">
|
||||
{$input.options.html}
|
||||
</select>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{extends file="helper/form/form.tpl"}
|
||||
|
||||
{block name="start_field_block"}
|
||||
<div class="margin-form">
|
||||
{if $input.type == 'select_category'}
|
||||
<select name="id_parent">
|
||||
{$input.options.html}
|
||||
</select>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{if isset($cms_breadcrumb)}
|
||||
<div class="cat_bar">
|
||||
<span style="color: #3C8534;">{l s='Current category'} :</span> {$cms_breadcrumb}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{$content}
|
||||
@@ -0,0 +1,113 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 8971 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{extends file="helper/form/form.tpl"}
|
||||
|
||||
{block name="start_field_block"}
|
||||
<div class="margin-form">
|
||||
{if $input.type == 'address_layout'}
|
||||
<div style="float:left">
|
||||
<textarea id="ordered_fields" name="address_layout" style="width: 300px;height: 140px;">{$input.address_layout}</textarea>
|
||||
</div>
|
||||
<div style="float:left; margin-left:20px; width:340px;">
|
||||
{l s='Liable fields for the address information (click to have more details):'} {$input.display_valid_fields}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div style="margin:10px 0 10px 0;">
|
||||
<a id="useLastDefaultLayout" style="margin-left:5px;" href="javascript:void(0)" onClick="resetLayout('{$input.encoding_address_layout}', 'lastDefault');" class="button">
|
||||
{l s='Use the last registered layout'}</a>
|
||||
<a id="useDefaultLayoutSystem" style="margin-left:5px;" href="javascript:void(0)" onClick="resetLayout('{$input.encoding_default_layout}', 'defaultSystem');" class="button">
|
||||
{l s='Use a default layout'}</a>
|
||||
<a id="useCurrentLastModifiedLayout" style="margin-left:5px;" href="javascript:void(0)" onClick="resetLayout(lastLayoutModified, 'currentModified')" class="button">
|
||||
{l s='Use my current modified layout'}</a>
|
||||
<a id="eraseCurrentLayout" style="margin-left:5px;" href="javascript:void(0)" onClick="resetLayout('', 'erase');" class="button">
|
||||
{l s='Clean layout'}</a>
|
||||
<div style="margin-top:10px; padding-top:5px; height:10px;" id="explanationText"></div>
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block name=script}
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$('.availableFieldsList').css("display", "none");
|
||||
|
||||
$('.addPattern').click(function() {
|
||||
addFieldsToCursorPosition($(this).attr("id"))
|
||||
lastLayoutModified = $("#ordered_fields").val();
|
||||
});
|
||||
|
||||
$('#ordered_fields').keyup(function() {
|
||||
lastLayoutModified = $(this).val();
|
||||
});
|
||||
|
||||
$('#useLastDefaultLayout').mouseover(function() {
|
||||
switchExplanationText("{l s='Will display back your last registered layout'}");
|
||||
});
|
||||
|
||||
$('#useDefaultLayoutSystem').mouseover(function() {
|
||||
switchExplanationText("{l s='Will display a default layout for this country'}");
|
||||
});
|
||||
|
||||
$('#useCurrentLastModifiedLayout').mouseover(function() {
|
||||
switchExplanationText("{l s='Will display back you\'re current editing layout'}");
|
||||
});
|
||||
|
||||
$('#eraseCurrentLayout').mouseover(function() {
|
||||
switchExplanationText("{l s='Will delete the current layout'}");
|
||||
});
|
||||
|
||||
$('#need_zip_code_on, #need_zip_code_off').change(function() {
|
||||
disableZipFormat();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function switchExplanationText(text) {
|
||||
$("#explanationText").fadeOut("fast", function() {
|
||||
$(this).html(text);
|
||||
$(this).fadeIn("fast");
|
||||
});
|
||||
}
|
||||
|
||||
function addFieldsToCursorPosition(pattern) {
|
||||
$("#ordered_fields").replaceSelection(pattern + " ");
|
||||
}
|
||||
|
||||
function displayAvailableFields(containerName) {
|
||||
$(".availableFieldsList").each( function () {
|
||||
if ($(this).attr('id') != 'availableListFieldsFor_'+containerName)
|
||||
$(this).slideUp();
|
||||
});
|
||||
$("#availableListFieldsFor_" + containerName).slideToggle();
|
||||
}
|
||||
|
||||
function resetLayout(defaultLayout, type) {
|
||||
if (confirm("{l s='Are you sure to apply this selection ?'}"))
|
||||
$("#ordered_fields").val(unescape(defaultLayout.replace(/\+/g, " ")));
|
||||
}
|
||||
|
||||
{/block}
|
||||
@@ -0,0 +1,107 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 9432 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
</table>
|
||||
{if $bulk_actions}
|
||||
<p>
|
||||
{if $bulk_actions|count > 1}
|
||||
<select id="select_submitBulk" name="select_submitBulk">
|
||||
{foreach $bulk_actions as $key => $params}
|
||||
<option value="{$key}">{$params.text}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
<input type="submit" class="button" name="submitBulk" id="submitBulk" value="{l s='Apply'}" />
|
||||
{else}
|
||||
{foreach $bulk_actions as $key => $params}
|
||||
{if $key == 'affectzone'}
|
||||
<select id="zone_to_affect" name="zone_to_affect">
|
||||
{foreach $zones as $z}
|
||||
<option value="{$z['id_zone']}">{$z['name']}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
{/if}
|
||||
<input type="submit" class="button" name="submitBulk{$key}{$table}" value="{$params.text}" {if isset($params.confirm)}onclick="return confirm('{$params.confirm}');"{/if} />
|
||||
{/foreach}
|
||||
{/if}
|
||||
</p>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="hidden" name="token" value="{$token}" />
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
var confirmation = new Array();
|
||||
{foreach $bulk_actions as $key => $params}
|
||||
{if isset($params.confirm)}
|
||||
confirmation['{$key}{$table}'] = "{$params.confirm}";
|
||||
{/if}
|
||||
{/foreach}
|
||||
|
||||
$(document).ready(function(){
|
||||
{if $bulk_actions|count > 1}
|
||||
$('#submitBulk').click(function(){
|
||||
if (confirmation[$(this).val()])
|
||||
return confirm(confirmation[$(this).val()]);
|
||||
else
|
||||
return true;
|
||||
});
|
||||
$('#select_submitBulk').change(function(){
|
||||
if ($(this).val() == 'affectzone')
|
||||
loadZones();
|
||||
else if (loaded)
|
||||
$('#zone_to_affect').fadeOut('slow');
|
||||
});
|
||||
{/if}
|
||||
});
|
||||
var loaded = false;
|
||||
function loadZones()
|
||||
{
|
||||
if (!loaded)
|
||||
{
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: 'ajax.php',
|
||||
data: 'getZones=true&token={$token}',
|
||||
async : true,
|
||||
cache: false,
|
||||
dataType: 'json',
|
||||
success: function(data) {
|
||||
var html = $(data);
|
||||
html.hide();
|
||||
$('#select_submitBulk').after(html);
|
||||
html.fadeIn('slow');
|
||||
}
|
||||
});
|
||||
loaded = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#zone_to_affect').fadeIn('slow');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,102 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 9639 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{extends file="helper/list/list_header.tpl"}
|
||||
|
||||
{block name="override_header"}
|
||||
|
||||
<div id="CustomerThreadContacts">
|
||||
|
||||
{assign var=nb_categories value=count($categories)}
|
||||
|
||||
{foreach $categories as $key => $val}
|
||||
|
||||
{assign var=total_thread value=0}
|
||||
{assign var=id_customer_thread value=0}
|
||||
|
||||
{foreach $contacts as $tmp => $tmp2}
|
||||
{if $val.id_contact == $tmp2.id_contact}
|
||||
|
||||
{assign var=total_thread value=$tmp2.total}
|
||||
{assign var=id_customer_thread value=$tmp2.id_customer_thread}
|
||||
|
||||
{/if}
|
||||
{/foreach}
|
||||
|
||||
<div class="blocSAV">
|
||||
|
||||
<h3>{$val.name}</h3>
|
||||
|
||||
{if $nb_categories < 6}
|
||||
<p>{$val.description}</p>
|
||||
{/if}
|
||||
|
||||
{if $total_thread == 0}
|
||||
<span class="message-mail">{l s='No new message'}</span>
|
||||
{else}
|
||||
<a href="{$currentIndex}&token={$token}&id_customer_thread={$id_customer_thread}&viewcustomer_thread" class="button">
|
||||
{$total_thread}
|
||||
{if $total_thread > 1}{l s='new messages'}{else}{l s='new message'}{/if}
|
||||
</a>
|
||||
{/if}
|
||||
</div>
|
||||
{/foreach}
|
||||
|
||||
<div id="MeaningStatus" class="blocSAV">
|
||||
<h3> {l s='Meaning of status'}</h3>
|
||||
<ul>
|
||||
<li><img src="../img/admin/status_green.png" alt="{l s='Open'}">{l s='Open'}</li>
|
||||
<li><img src="../img/admin/status_red.png" alt="{l s='Closed'}">{l s='Closed'}</li>
|
||||
<li><img src="../img/admin/status_orange.png" alt="{l s='Pending 1'}">{l s='Pending 1'}</li>
|
||||
<li><img src="../img/admin/status_orange.png" alt="{l s='Pending 2'}">{l s='Pending 2'}</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="CustomerService">
|
||||
<table ccellspacing="0" cellpadding="0" class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">{l s='Customer service'} : {l s='Statistics'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{assign var=count value=0}
|
||||
{foreach $params as $key => $val}
|
||||
{assign var=count value=$count+1}
|
||||
<tr {if $count % 2 == 0}class="alt_row"{/if}>
|
||||
<td>{$key}</td>
|
||||
<td><span>{$val}</span></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<p class="clear"> </p>
|
||||
|
||||
{/block}
|
||||
@@ -0,0 +1,191 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 8897 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
|
||||
|
||||
{if !$email}
|
||||
|
||||
<fieldset style="margin-top:10px;{if !empty($message.id_employee)}background-color:#F0F8E6;border:1px solid #88D254{/if}">
|
||||
<legend {if !empty($message.id_employee)}style="background-color:#F0F8E6;color:#000;border:1px solid #88D254;"{/if}>
|
||||
{if !empty($message.employee_name)}
|
||||
<img src="../img/t/AdminCustomers.gif" alt="{$PS_SHOP_NAME}" />
|
||||
{$PS_SHOP_NAME} - {$message.employee_name}
|
||||
{else}
|
||||
<img src="../img/admin/tab-customers.gif" alt="{$PS_SHOP_NAME}" />
|
||||
{if !empty($message.id_customer)}
|
||||
<a href="index.php?tab=AdminCustomers&id_customer={$message.id_customer}&viewcustomer&token={getAdminToken tab='AdminCustomers'}" title="{l s='View customer'}">
|
||||
{$message.customer_name}
|
||||
</a>
|
||||
{else}
|
||||
{$message.email}
|
||||
{/if}
|
||||
{/if}
|
||||
</legend>
|
||||
|
||||
<div class="infoCustomer">
|
||||
{if !empty($message.id_customer) && empty($message.id_employee)}
|
||||
<dl>
|
||||
<dt>{l s='Customer ID:'} :</dd>
|
||||
<dd><a href="index.php?tab=AdminCustomers&id_customer={$message.id_customer}&viewcustomer&token={getAdminToken tab='AdminCustomers'}" title="{l s='View customer'}">
|
||||
{$message.id_customer} <img src="../img/admin/search.gif" alt="{l s='view'}" />
|
||||
</a>
|
||||
</dd>
|
||||
</dl>
|
||||
{/if}
|
||||
|
||||
<dl>
|
||||
<dt>{l s='Sent on:'} :</dt>
|
||||
<dd>{$message.date_add}</dd>
|
||||
|
||||
</dl>
|
||||
|
||||
{if empty($message.id_employee)}
|
||||
<dl>
|
||||
<dt>{l s='Browser:'} :</dt>
|
||||
<dd>{$message.user_agent}</dd>
|
||||
</dl>
|
||||
{/if}
|
||||
|
||||
{if !empty($message.file_name) && $file_name}
|
||||
<dl>
|
||||
<dt>{l s='File attachment'} :</dt>
|
||||
<dd><a href="index.php?tab=AdminCustomerThreads&id_customer_thread={$message.id_customer_thread}&viewcustomer_thread&token={getAdminToken tab='AdminCustomerThreads'}&filename={$message.file_name}"
|
||||
title="{l s='View file'}">
|
||||
<img src="../img/admin/search.gif" alt="{l s='view'}" />
|
||||
</a>
|
||||
</dd>
|
||||
</dl>
|
||||
{/if}
|
||||
|
||||
{if !empty($message.id_order) && empty($message.id_employee)}
|
||||
<dl>
|
||||
<dt>{l s='Order #'} :</dt>
|
||||
<dd><a href="index.php?tab=AdminOrders&id_order={$message.id_order}&vieworder&token={getAdminToken tab='AdminOrders'}" title="{l s='View order'}">
|
||||
{$message.id_order} <img src="../img/admin/search.gif" alt="{l s='view'}" />
|
||||
</a></dd>
|
||||
</dl>
|
||||
{/if}
|
||||
|
||||
{if !empty($message.id_product) && empty($message.id_employee)}
|
||||
<dl>
|
||||
<dt>{l s='Product #'} :</dt>
|
||||
<dd><a href="index.php?tab=AdminOrders&id_order={$id_order_product}&vieworder&token={getAdminToken tab='AdminOrders'}" title="{l s='View order'}">
|
||||
{$message.id_product} <img src="../img/admin/search.gif" alt="{l s='view'}" />
|
||||
</a></dd>
|
||||
</dl>
|
||||
{/if}
|
||||
|
||||
<form action="{$current}&token={$token}&id_customer_thread={$message.id_customer_thread}&viewcustomer_thread" method="post">
|
||||
<b>{l s='Subject:'}</b>
|
||||
<input type="hidden" name="id_customer_message" value="{$message.id_customer_message}" />
|
||||
<select name="id_contact" onchange="this.form.submit();">
|
||||
{foreach $contacts as $contact}
|
||||
<option value="{$contact.id_contact}" {if $contact.id_contact == $message.id_contact}selected="selected"{/if}>
|
||||
{$contact.name}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</form>
|
||||
|
||||
|
||||
{else}
|
||||
|
||||
<div class="infoEmployee">
|
||||
{if $id_employee}
|
||||
<a href="{$current}&token={getAdminToken tab='AdminCustomerThreads'}&id_customer_thread={$message.id_customer_thread}&viewcustomer_thread">'.
|
||||
{l s='View this thread'}
|
||||
</a><br />
|
||||
{/if}
|
||||
<b>{l s='Sent by:'}</b>
|
||||
|
||||
{if !empty($message.customer_name)}
|
||||
{$message.customer_name} ({$message.email})
|
||||
{else}
|
||||
{$message.email}
|
||||
{/if}
|
||||
|
||||
{if !empty($message.id_customer) && empty($message.id_employee)}
|
||||
<br /><b>{l s='Customer ID:'}</b> {$message.id_customer}<br />
|
||||
{/if}
|
||||
|
||||
{if !empty($message.id_order) && empty($message.id_employee)}
|
||||
<br /><b>{l s='Order #'}:</b> {$message.id_order}<br />
|
||||
{/if}
|
||||
|
||||
{if !empty($message.id_product) && empty($message.id_employee)}
|
||||
<br /><b>{l s='Product #'}:</b> {$message.id_product}<br />
|
||||
{/if}
|
||||
|
||||
<br /><b>{l s='Subject:'}</b> {$message.subject}
|
||||
|
||||
{/if}
|
||||
<dl>
|
||||
<dt>{l s='Thread ID:'} :</dt>
|
||||
<dd>{$message.id_customer_thread}</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>{l s='Message ID:'} :</dt>
|
||||
<dd>{$message.id_customer_message}</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>{l s='Message:'} :</dt>
|
||||
<dd>{$message.message}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
{if !$email}
|
||||
{if empty($message.id_employee)}
|
||||
<button class="button" style="font-size:12px;"
|
||||
onclick="$('#reply_to_{$message.id_customer_message}').show(500); $(this).hide();">
|
||||
<img src="../img/admin/contact.gif" alt=""/>{l s='Reply to this message'}
|
||||
</button>
|
||||
{/if}
|
||||
|
||||
<div id="reply_to_{$message.id_customer_message}" style="display: none; margin-top: 20px;"">
|
||||
<form action="{$current}&token={getAdminToken tab='AdminCustomerThreads'}&id_customer_thread={$message.id_customer_thread}&viewcustomer_thread" method="post" enctype="multipart/form-data">
|
||||
<p>{l s='Please type your reply below:'}</p>
|
||||
<textarea style="width: 450px; height: 175px;" name="reply_message">'.
|
||||
{$PS_CUSTOMER_SERVICE_SIGNATURE}
|
||||
</textarea>
|
||||
<div style="width: 450px; text-align: right; font-style: italic; font-size: 9px; margin-top: 2px;">
|
||||
{l s='Your reply will be sent to:'} {$message.email}
|
||||
</div>
|
||||
<div style="width: 450px; margin-top: 0px;">
|
||||
<input type="file" name="joinFile"/>
|
||||
<div>
|
||||
<div>
|
||||
<input type="submit" class="button" name="submitReply" value="{l s='Send my reply'}" style="margin-top:20px;" />
|
||||
<input type="hidden" name="id_customer_thread" value="{$message.id_customer_thread}" />
|
||||
<input type="hidden" name="msg_email" value="{$message.email}" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
|
||||
{/if}
|
||||
|
||||
</fieldset>
|
||||
@@ -0,0 +1,86 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{extends file="helper/options/options.tpl"}
|
||||
{block name="after"}
|
||||
{if $use_sync}
|
||||
<fieldset><legend>{l s='Sync'}</legend>
|
||||
<label>{l s='Run sync:'}</label>
|
||||
<div class="margin-form">
|
||||
<button class="button" id="run_sync" onclick="run_sync();">{l s='Run sync'}</button>
|
||||
<p>{l s='Click to synchronize mail automatically'}</p>
|
||||
<div id="ajax_loader"></div>
|
||||
<div class="error" style="display:none" id="ajax_error"></div>
|
||||
<div class="conf" style="display:none" id="ajax_conf"></div>
|
||||
</div>
|
||||
</fieldset><br/>
|
||||
<script type="text/javascript">
|
||||
var ajaxQueries = new Array();
|
||||
function run_sync()
|
||||
{
|
||||
$('#ajax_error').html('');
|
||||
$('#ajax_error').hide();
|
||||
$('#ajax_conf').html('');
|
||||
$('#ajax_conf').hide();
|
||||
for(i = 0; i < ajaxQueries.length; i++)
|
||||
ajaxQueries[i].abort();
|
||||
ajaxQueries = new Array();
|
||||
$('#ajax_loader').html('<img src="{$smarty.const._PS_ADMIN_IMG_}ajax-loader.gif">');
|
||||
ajaxQuery = $.ajax({
|
||||
type: "POST",
|
||||
url: "ajax.php",
|
||||
data: "syncImapMail=1",
|
||||
dataType : "json",
|
||||
success: function(jsonData) {
|
||||
jsonError = '';
|
||||
if (jsonData.hasError)
|
||||
{
|
||||
for (i=0;i < jsonData.errors.length;i++)
|
||||
jsonError = jsonError+'<li>'+jsonData.errors[i]+'</li>';
|
||||
$('#ajax_error').html('<ul>'+jsonError+'</ul>');
|
||||
$('#ajax_error').fadeIn();
|
||||
}
|
||||
else
|
||||
{
|
||||
jsonError = '<li>{l s='Sync success'}</li>';
|
||||
for (i=0;i < jsonData.errors.length;i++)
|
||||
jsonError = jsonError+'<li>'+jsonData.errors[i]+'</li>';
|
||||
$('#ajax_conf').html('<ul>'+jsonError+'</ul>');
|
||||
$('#ajax_conf').fadeIn();
|
||||
}
|
||||
|
||||
$('#ajax_loader').html('');
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown)
|
||||
{
|
||||
jAlert("TECHNICAL ERROR: unable to sync.\n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus);
|
||||
}
|
||||
});
|
||||
ajaxQueries.push(ajaxQuery);
|
||||
|
||||
};
|
||||
</script>
|
||||
{/if}
|
||||
{/block}
|
||||
@@ -0,0 +1,171 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 8897 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{extends file="helper/view/view.tpl"}
|
||||
|
||||
{block name="override_tpl"}
|
||||
<form action="{$current}&token={$token}&viewcustomer_thread&id_customer_thread={$id_customer_thread}" method="post" enctype="multipart/form-data">
|
||||
<fieldset>
|
||||
|
||||
<div id="ChangeStatus">
|
||||
<select onchange="quickSelect(this);">
|
||||
<option value="0">{l s='Change status of message:'}</option>
|
||||
{foreach $actions as $action}
|
||||
<option value="{$action.href}">> {$action.name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<img src="../img/admin/email_go.png" alt="" style="vertical-align: middle;" />
|
||||
{l s='Forward this discussion to an employee:'}
|
||||
<select name="id_employee_forward" style="vertical-align: middle;">
|
||||
<option value="-1">{l s='-- Choose --'}</option>
|
||||
{foreach $employees as $employee}
|
||||
<option value="{$employee.id_employee}"> {$employee.firstname|substr:0:1}. {$employee.lastname}</option>
|
||||
{/foreach}
|
||||
<option value="0">{l s='Someone else'}</option>
|
||||
</select>
|
||||
</p>
|
||||
|
||||
<div id="message_forward_email" style="display:none">
|
||||
<b>{l s='E-mail'}</b> <input type="text" name="email" />
|
||||
</div>
|
||||
|
||||
<div id="message_forward" style="display:none;margin-bottom:10px">
|
||||
<textarea name="message_forward" style="width:500px;height:80px;margin-top:15px;">{l s='You can add a comment here.'}</textarea><br />
|
||||
<input type="Submit" name="submitForward" class="button" value="{l s='Forward this discussion'}" style="margin-top: 10px;" />
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
</form>
|
||||
<div class="clear"> </div>
|
||||
|
||||
{if $thread->id_customer}
|
||||
|
||||
<div style="float:right;margin-left:20px;">
|
||||
{if $orders && count($orders)}
|
||||
{if $count_ok}
|
||||
<div>
|
||||
<h2>{l s='Orders'}</h2>
|
||||
<table cellspacing="0" cellpadding="0" class="table float">
|
||||
<tr>
|
||||
<th class="center">{l s='ID'}</th>
|
||||
<th class="center">{l s='Date'}</th>
|
||||
<th class="center">{l s='Products'}</th>
|
||||
<th class="center">{l s='Total paid'}</th>
|
||||
<th class="center">{l s='Payment'}</th>
|
||||
<th class="center">{l s='State'}</th>
|
||||
<th class="center">{l s='Actions'}</th>
|
||||
</tr>
|
||||
{assign var=irow value=0}
|
||||
{foreach $orders_ok as $order}
|
||||
<tr {if $irow++ % 2}class="alt_row"{/if} style="cursor: pointer"
|
||||
onclick="document.location='?tab=AdminOrders&id_order={$order.id_order}&vieworder&token={getAdminToken tab='AdminOrders'}">
|
||||
<td class="center">{$order.id_order}</td>
|
||||
<td>{$order.date_add}</td>
|
||||
<td align="right">{$order.nb_products}</td>
|
||||
<td align="right">{$order.total_paid_real}</td>
|
||||
<td>{$order.payment}</td>
|
||||
<td>{$order.order_state}</td>
|
||||
<td align="center">
|
||||
<a href="?tab=AdminOrders&id_order={$order.id_order}&vieworder&token={getAdminToken tab='AdminOrders'}">
|
||||
<img src="../img/admin/details.gif" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
<h3 style="color:green;font-weight:700;margin-top:10px">
|
||||
{l s='Validated Orders:'} {$count_ok} {l s='for'} {$total_ok}
|
||||
</h3>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
{if $products && count($products)}
|
||||
<div>
|
||||
<h2>{l s='Products'}</h2>
|
||||
<table cellspacing="0" cellpadding="0" class="table">
|
||||
<tr>
|
||||
<th class="center">{l s='Date'}</th>
|
||||
<th class="center">{l s='ID'}</th>
|
||||
<th class="center">{l s='Name'}</th>
|
||||
<th class="center">{l s='Quantity'}</th>
|
||||
<th class="center">{l s='Actions'}</th>
|
||||
</tr>
|
||||
{assign var=irow value=0}
|
||||
{foreach $products as $product}
|
||||
<tr {if $irow++ % 2}class="alt_row"{/if} style="cursor: pointer"
|
||||
onclick="document.location = '?tab=AdminOrders&id_order={$product.id_order}&vieworder&token={getAdminToken tab='AdminOrders'}'">
|
||||
<td>{$product.date_add}</td>
|
||||
<td>{$product.product_id}</td>
|
||||
<td>{$product.product_name}</td>
|
||||
<td align="right">{$product.product_quantity}</td>
|
||||
<td align="center">
|
||||
<a href="?tab=AdminOrders&id_order={$product.id_order}&vieworder&token={getAdminToken tab='AdminOrders'}">
|
||||
<img src="../img/admin/details.gif" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div style="margin-top:10px">
|
||||
{foreach $messages as $message}
|
||||
{$message}
|
||||
{/foreach}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$('select[name=id_employee_forward]').change(function(){
|
||||
if ($(this).val() >= 0)
|
||||
$('#message_forward').show(400);
|
||||
else
|
||||
$('#message_forward').hide(200);
|
||||
if ($(this).val() == 0)
|
||||
$('#message_forward_email').show(200);
|
||||
else
|
||||
$('#message_forward_email').hide(200);
|
||||
});
|
||||
$('teaxtrea[name=message_forward]').click(function(){
|
||||
if($(this).val() == '{l s='You can add a comment here.'}')
|
||||
{
|
||||
$(this).val('');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
{/block}
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 10891 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{extends file="helper/list/list_header.tpl"}
|
||||
|
||||
{block name=leadin}
|
||||
{if isset($delete_customer) && $delete_customer}
|
||||
<form action="{$REQUEST_URI}" method="post">
|
||||
<fieldset><legend>{l s='How do you want to delete your customer(s)?'}</legend>
|
||||
{l s='You have two ways to delete a customer, please choose what you want to do.'}
|
||||
<p>
|
||||
<input type="radio" name="deleteMode" value="real" id="deleteMode_real" />
|
||||
<label for="deleteMode_real" style="float:none">{l s='I want to delete my customer(s) for real, all data will be removed from the database. A customer with the same e-mail address will be able to register again.'}</label>
|
||||
</p>
|
||||
<p>
|
||||
<input type="radio" name="deleteMode" value="deleted" id="deleteMode_deleted" />
|
||||
<label for="deleteMode_deleted" style="float:none">{l s='I don\'t want my customer(s) to register again. The customer(s) will be removed from this list but all data will be kept in the database.'}</label>
|
||||
</p>
|
||||
{foreach $POST as $key => $value}
|
||||
{if is_array($value)}
|
||||
{foreach $value as $val}
|
||||
<input type="hidden" name="{$key}[]" value="{$val}" />
|
||||
{/foreach}
|
||||
{else}
|
||||
<input type="hidden" name="{$key}" value="{$value}" />
|
||||
{/if}
|
||||
{/foreach}
|
||||
<br /><input type="submit" class="button" value="{l s=' Delete '}" />
|
||||
</fieldset>
|
||||
</form>
|
||||
<div class="clear"> </div>
|
||||
{/if}
|
||||
{/block}
|
||||
@@ -0,0 +1,469 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 8971 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{extends file="helper/view/view.tpl"}
|
||||
|
||||
{block name="override_tpl"}
|
||||
<script type="text/javascript">
|
||||
function saveCustomerNote()
|
||||
{
|
||||
$('#note_feedback').html('<img src="../img/loader.gif" />').show();
|
||||
var noteContent = $('#noteContent').val();
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "ajax.php",
|
||||
data: "submitCustomerNote=1&id_customer={$customer->id}¬e="+noteContent,
|
||||
async : true,
|
||||
success: function(r) {
|
||||
$('#note_feedback').html('').hide();
|
||||
if (r == 'ok')
|
||||
{
|
||||
$('#note_feedback').html("<b style='color:green'>{l s='Your note has been saved'}</b>").fadeIn(400);
|
||||
$('#submitCustomerNote').attr('disabled', 'disabled');
|
||||
}
|
||||
else if (r == 'error:validation')
|
||||
$('#note_feedback').html("<b style='color:red'>({l s='Error: your note is not valid'}</b>").fadeIn(400);
|
||||
else if (r == 'error:update')
|
||||
$('#note_feedback').html("<b style='color:red'>{l s='Error: cannot save your note'}</b>").fadeIn(400);
|
||||
$('#note_feedback').fadeOut(3000);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<div id="container-customer">
|
||||
|
||||
<div class="info-customer-left">
|
||||
<div style="float: right">
|
||||
<a href="{$current}&addcustomer&id_customer={$customer->id}&token={$token}">
|
||||
<img src="../img/admin/edit.gif" />
|
||||
</a>
|
||||
</div>
|
||||
<span style="font-size: 14px;">
|
||||
{$customer->firstname} {$customer->lastname}
|
||||
</span>
|
||||
<img src="{$gender_image}" style="margin-bottom: 5px" /><br />
|
||||
<a href="mailto:{$customer->email}" style="text-decoration: underline; color:#268CCD;">{$customer->email}</a>
|
||||
<br /><br />
|
||||
{l s='ID:'} {$customer->id|string_format:"%06d"}<br />
|
||||
{l s='Registration date:'} {$registration_date}<br />
|
||||
{l s='Last visit:'} {if $customer_stats['last_visit']}{$last_visit}{else}{l s='never'}{/if}<br />
|
||||
{if $count_better_customers != '-'}{l s='Rank: #'} {$count_better_customers}<br />{/if}
|
||||
{if $shop_is_feature_active}{l s='Shop:'} {$name_shop}<br />{/if}
|
||||
</div>
|
||||
|
||||
<div class="info-customer-right">
|
||||
<div style="float: right">
|
||||
<a href="{$current}&addcustomer&id_customer={$customer->id}&token={$token}">
|
||||
<img src="../img/admin/edit.gif" />
|
||||
</a>
|
||||
</div>
|
||||
{l s='Newsletter:'} {if $customer->newsletter}<img src="../img/admin/enabled.gif" />{else}<img src="../img/admin/disabled.gif" />{/if}<br />
|
||||
{l s='Opt-in:'} {if $customer->optin}<img src="../img/admin/enabled.gif" />{else}<img src="../img/admin/disabled.gif" />{/if}<br />
|
||||
{l s='Age:'} {$customer_stats['age']} {if isset($customer->birthday['age'])}({$customer_birthday}){else}{l s='unknown'}{/if}<br /><br />
|
||||
{l s='Last update:'} {$last_update}<br />
|
||||
{l s='Status:'} {if $customer->active}<img src="../img/admin/enabled.gif" />{else}<img src="../img/admin/disabled.gif" />{/if}
|
||||
|
||||
{if $customer->isGuest()}
|
||||
<div>
|
||||
{l s='This customer is registered as'} <b>{l s='guest'}</b>
|
||||
{if !$customer_exists}
|
||||
<form method="POST" action="index.php?tab=AdminCustomers&id_customer={$customer->id}&token={getAdminToken tab='AdminCustomers'}">
|
||||
<input type="hidden" name="id_lang" value="{$id_lang}" />
|
||||
<p class="center"><input class="button" type="submit" name="submitGuestToCustomer" value="{l s='Transform to customer'}" /></p>
|
||||
{l s='This feature generates a random password and sends an e-mail to the customer'}
|
||||
</form>
|
||||
{else}
|
||||
</div><div><b style="color:red;">{l s='A registered customer account exists with the same email address'}</b>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="separation"></div>
|
||||
|
||||
<div>
|
||||
<h2>
|
||||
<img src="../img/admin/cms.gif" /> {l s='Add a private note'}
|
||||
</h2>
|
||||
<p>{l s='This note will be displayed to all the employees but not to the customer.'}</p>
|
||||
<form action="ajax.php" method="post" onsubmit="saveCustomerNote();return false;" id="customer_note">
|
||||
<textarea name="note" id="noteContent" style="width:600px;height:100px" onkeydown="$('#submitCustomerNote').removeAttr('disabled');">{$customer_note}</textarea><br />
|
||||
<input type="submit" id="submitCustomerNote" class="button" value="{l s=' Save '}" style="float:left;margin-top:5px" disabled="disabled" />
|
||||
<span id="note_feedback" style="position:relative; top:10px; left:10px;"></span>
|
||||
</form>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="separation"></div>
|
||||
|
||||
|
||||
<h2>{l s='Messages'} ({count($messages)})</h2>
|
||||
{if count($messages)}
|
||||
<table cellspacing="0" cellpadding="0" class="table" style="width:100%;">
|
||||
<tr>
|
||||
<th class="center">{l s='Status'}</th>
|
||||
<th class="center">{l s='Message'}</th>
|
||||
<th class="center">{l s='Sent on'}</th>
|
||||
</tr>
|
||||
{foreach $messages AS $message}
|
||||
<tr>
|
||||
<td>{$message['status']}</td>
|
||||
<td>
|
||||
<a href="index.php?tab=AdminCustomerThreads&id_customer_thread={$message.id_customer_thread}&viewcustomer_thread&token={getAdminToken tab='AdminCustomerThreads'}">
|
||||
{$message['message']}...
|
||||
</a>
|
||||
</td>
|
||||
<td>{$message['date_add']}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
<div class="clear"> </div>
|
||||
{else}
|
||||
{$customer->firstname} {$customer->lastname} {l s='has never contacted you'}
|
||||
{/if}
|
||||
|
||||
{* display hook specified to this page : AdminCustomers *}
|
||||
<div>{hook h="displayAdminCustomers" id_customer=$customer->id}</div>
|
||||
|
||||
<div class="clear"> </div>
|
||||
|
||||
<h2>{l s='Groups'} ({count($groups)})</h2>
|
||||
{if $groups AND count($groups)}
|
||||
<table cellspacing="0" cellpadding="0" class="table" style="width:100%;">
|
||||
<colgroup>
|
||||
<col width="10px"></col>
|
||||
<col width=""></col>
|
||||
<col width="70px"></col>
|
||||
</colgroup>
|
||||
<tr>
|
||||
<th height="39px" class="right">{l s='ID'}</th>
|
||||
<th class="center">{l s='Name'}</th>
|
||||
<th class="center">{l s='Actions'}</th>
|
||||
</tr>
|
||||
{foreach $groups AS $key => $group}
|
||||
<tr {if $key %2}class="alt_row"{/if} style="cursor: pointer" onclick="document.location = '?tab=AdminGroups&id_group={$group['id_group']}&viewgroup&token={getAdminToken tab='AdminGroups'}'">
|
||||
<td class="center">{$group['id_group']}</td>
|
||||
<td>{$group['name']}</td>
|
||||
<td align="center"><a href="?tab=AdminGroups&id_group={$group['id_group']}&viewgroup&token={getAdminToken tab='AdminGroups'}"><img src="../img/admin/details.gif" /></a></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/if}
|
||||
<div class="clear"> </div>
|
||||
|
||||
|
||||
<h2>{l s='Orders'} ({count($orders)})</h2>
|
||||
{if $orders AND count($orders)}
|
||||
{assign var=count_ok value=count($orders_ok)}
|
||||
{if $count_ok}
|
||||
<div>
|
||||
<h3 style="color:green;font-weight:700">
|
||||
{l s='Valid orders:'} {$count_ok} {l s='for'} {$total_ok}
|
||||
</h3>
|
||||
<table cellspacing="0" cellpadding="0" class="table" style="width:100%; text-align:left;">
|
||||
<colgroup>
|
||||
<col width="10px"></col>
|
||||
<col width="100px"></col>
|
||||
<col width="100px"></col>
|
||||
<col width=""></col>
|
||||
<col width="50px"></col>
|
||||
<col width="80px"></col>
|
||||
<col width="70px"></col>
|
||||
</colgroup>
|
||||
<tr>
|
||||
<th height="39px" class="center">{l s='ID'}</th>
|
||||
<th class="left">{l s='Date'}</th>
|
||||
<th class="left">{l s='Payment'}</th>
|
||||
<th class="left">{l s='State'}</th>
|
||||
<th class="left">{l s='Products'}</th>
|
||||
<th class="left">{l s='Total paid'}</th>
|
||||
<th class="center">{l s='Actions'}</th>
|
||||
</tr>
|
||||
{foreach $orders_ok AS $key => $order}
|
||||
<tr {if $key %2}class="alt_row"{/if} style="cursor: pointer" onclick="document.location = '?tab=AdminOrders&id_order={$order['id_order']}&vieworder&token={getAdminToken tab='AdminOrders'}'">
|
||||
<td class="center">{$order['id_order']}</td>
|
||||
<td>{$order['date_add']}</td>
|
||||
<td>{$order['payment']}</td>
|
||||
<td>{$order['order_state']}</td>
|
||||
<td align="right">{$order['nb_products']}</td>
|
||||
<td align="right">{$order['total_paid_real']}</td>
|
||||
<td align="center"><a href="?tab=AdminOrders&id_order={$order['id_order']}&vieworder&token={getAdminToken tab='AdminOrders'}"><img src="../img/admin/details.gif" /></a></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
{assign var=count_ko value=count($orders_ko)}
|
||||
{if $count_ko}
|
||||
<div>
|
||||
<h3 style="color:red;font-weight:normal;">{l s='Invalid orders:'} {$count_ko}</h3>
|
||||
<table cellspacing="0" cellpadding="0" class="table" style="width:100%;">
|
||||
<colgroup>
|
||||
<col width="10px"></col>
|
||||
<col width="100px"></col>
|
||||
<col width=""></col>
|
||||
<col width=""></col>
|
||||
<col width="100px"></col>
|
||||
<col width="100px"></col>
|
||||
<col width="52px"></col>
|
||||
</colgroup>
|
||||
<tr>
|
||||
<th height="39px" class="center">{l s='ID'}</th>
|
||||
<th class="center">{l s='Date'}</th>
|
||||
<th class="center">{l s='Payment'}</th>
|
||||
<th class="center">{l s='State'}</th>
|
||||
<th class="center">{l s='Products'}</th>
|
||||
<th class="center">{l s='Total paid'}</th>
|
||||
<th class="center">{l s='Actions'}</th>
|
||||
</tr>
|
||||
{foreach $orders_ko AS $key => $order}
|
||||
<tr {if $key %2}class="alt_row"{/if} style="cursor: pointer" onclick="document.location = '?tab=AdminOrders&id_order={$order['id_order']}&vieworder&token={getAdminToken tab='AdminOrders'}'">
|
||||
<td class="center">{$order['id_order']}</td>
|
||||
<td>{$order['date_add']}</td>
|
||||
<td>{$order['payment']}</td>
|
||||
<td>{$order['order_state']}</td>
|
||||
<td align="right">{$order['nb_products']}</td>
|
||||
<td align="right">{$order['total_paid_real']}</td>
|
||||
<td align="center"><a href="?tab=AdminOrders&id_order={$order['id_order']}&vieworder&token={getAdminToken tab='AdminOrders'}"><img src="../img/admin/details.gif" /></a></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
</div>
|
||||
<div class="clear"> </div>
|
||||
{/if}
|
||||
{else}
|
||||
{$customer->firstname} {$customer->lastname} {l s='has not placed any orders yet'}
|
||||
{/if}
|
||||
|
||||
{if $products AND count($products)}
|
||||
<div class="clear"> </div>
|
||||
<h2>{l s='Products'} ({count($products)})</h2>
|
||||
<table cellspacing="0" cellpadding="0" class="table" style="width:100%;">
|
||||
<colgroup>
|
||||
<col width="50px"></col>
|
||||
<col width=""></col>
|
||||
<col width="60px"></col>
|
||||
<col width="70px"></col>
|
||||
</colgroup>
|
||||
<tr>
|
||||
<th height="39px" class="center">{l s='Date'}</th>
|
||||
<th class="center">{l s='Name'}</th>
|
||||
<th class="center">{l s='Quantity'}</th>
|
||||
<th class="center">{l s='Actions'}</th>
|
||||
</tr>
|
||||
{foreach $products AS $key => $product}
|
||||
<tr {if $key %2}class="alt_row"{/if} style="cursor: pointer" onclick="document.location = '?tab=AdminOrders&id_order={$product['id_order']}&vieworder&token={getAdminToken tab='AdminOrders'}'">
|
||||
<td>{$product['date_add']}</td>
|
||||
<td>{$product['product_name']}</td>
|
||||
<td align="right">{$product['product_quantity']}</td>
|
||||
<td align="center"><a href="?tab=AdminOrders&id_order={$product['id_order']}&vieworder&token={getAdminToken tab='AdminOrders'}"><img src="../img/admin/details.gif" /></a></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/if}
|
||||
<div class="clear"> </div>
|
||||
|
||||
<h2>{l s='Addresses'} ({count($addresses)})</h2>
|
||||
{if count($addresses)}
|
||||
<table cellspacing="0" cellpadding="0" class="table" style="width:100%;">
|
||||
<colgroup>
|
||||
<col width="120px"></col>
|
||||
<col width="120px"></col>
|
||||
<col width=""></col>
|
||||
<col width="100px"></col>
|
||||
<col width="170px"></col>
|
||||
<col width="70px"></col>
|
||||
</colgroup>
|
||||
<tr>
|
||||
<th height="39px">{l s='Company'}</th>
|
||||
<th>{l s='Name'}</th>
|
||||
<th>{l s='Address'}</th>
|
||||
<th>{l s='Country'}</th>
|
||||
<th>{l s='Phone number(s)'}</th>
|
||||
<th>{l s='Actions'}</th>
|
||||
</tr>
|
||||
{foreach $addresses AS $key => $address}
|
||||
<tr {if $key %2}class="alt_row"{/if}>
|
||||
<td>{if $address['company']}{$address['company']}{else}--{/if}</td>
|
||||
<td>{$address['firstname']} {$address['lastname']}</td>
|
||||
<td>{$address['address1']} {if $address['address2']}{$address['address2']}{/if} {$address['postcode']} {$address['city']}</td>
|
||||
<td>{$address['country']}</td>
|
||||
<td class="right">
|
||||
{if $address['phone']}
|
||||
{$address['phone']}
|
||||
{if $address['phone_mobile']}<br />{$address['phone_mobile']}{/if}
|
||||
{else}
|
||||
{if $address['phone_mobile']}<br />{$address['phone_mobile']}{else}--{/if}
|
||||
{/if}
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="?tab=AdminAddresses&id_address={$address['id_address']}&addaddress&token={getAdminToken tab='AdminAddresses'}"><img src="../img/admin/edit.gif" /></a>
|
||||
<a href="?tab=AdminAddresses&id_address={$address['id_address']}&deleteaddress&token={getAdminToken tab='AdminAddresses'}"><img src="../img/admin/delete.gif" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{else}
|
||||
{$customer->firstname} {$customer->lastname} {l s='has not registered any addresses yet'}
|
||||
{/if}
|
||||
|
||||
<div class="clear"> </div>
|
||||
<h2>{l s='Vouchers'} ({count($discounts)})</h2>
|
||||
{if count($discounts)}
|
||||
<table cellspacing="0" cellpadding="0" class="table">
|
||||
<tr>
|
||||
<th>{l s='ID'}</th>
|
||||
<th>{l s='Code'}</th>
|
||||
<th>{l s='Name'}</th>
|
||||
<th>{l s='Status'}</th>
|
||||
<th>{l s='Actions'}</th>
|
||||
</tr>
|
||||
{foreach $discounts AS $key => $discount}
|
||||
<tr {if $key %2}class="alt_row"{/if}>
|
||||
<td align="center">{$discount['id_cart_rule']}</td>
|
||||
<td>{$discount['code']}</td>
|
||||
<td>{$discount['name']}</td>
|
||||
<td align="center"><img src="../img/admin/{if $discount['active']}enabled.gif{else}disabled.gif{/if}" alt="{l s='Status'}" title="{l s='Status'}" /></td>
|
||||
<td align="center">
|
||||
<a href="?tab=AdminCartRules&id_cart_rule={$discount['id_cart_rule']}&addcart_rule&token={getAdminToken tab='AdminCartRules'}"><img src="../img/admin/edit.gif" /></a>
|
||||
<a href="?tab=AdminCartRules&id_cart_rule={$discount['id_cart_rule']}&deletecart_rule&token={getAdminToken tab='AdminCartRules'}"><img src="../img/admin/delete.gif" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{else}
|
||||
{$customer->firstname} {$customer->lastname} {l s='has no discount vouchers'}.
|
||||
{/if}
|
||||
<div class="clear"> </div>
|
||||
|
||||
<div>
|
||||
<h2>{l s='Carts'} ({count($carts)})</h2>
|
||||
{if $carts AND count($carts)}
|
||||
<table cellspacing="0" cellpadding="0" class="table" style="width:100%">
|
||||
<colgroup>
|
||||
<col width="50px"></col>
|
||||
<col width="150px"></col>
|
||||
<col width=""></col>
|
||||
<col width="70px"></col>
|
||||
<col width="50px"></col>
|
||||
</colgroup>
|
||||
<tr>
|
||||
<th height="39px" class="center">{l s='ID'}</th>
|
||||
<th class="center">{l s='Date'}</th>
|
||||
<th class="center">{l s='Carrier'}</th>
|
||||
<th class="center">{l s='Total'}</th>
|
||||
<th class="center">{l s='Actions'}</th>
|
||||
</tr>
|
||||
{foreach $carts AS $key => $cart}
|
||||
<tr {if $key %2}class="alt_row"{/if} style="cursor: pointer" onclick="document.location = '?tab=AdminCarts&id_cart={$cart['id_cart']}&viewcart&token={getAdminToken tab='AdminCarts'}'">
|
||||
<td class="center">{$cart['id_cart']}</td>
|
||||
<td>{$cart['date_add']}</td>
|
||||
<td>{$cart['name']}</td>
|
||||
<td align="right">{$cart['total_price']}</td>
|
||||
<td align="center"><a href="index.php?tab=AdminCarts&id_cart={$cart['id_cart']}&viewcart&token={getAdminToken tab='AdminCarts'}"><img src="../img/admin/details.gif" /></a></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{else}
|
||||
{l s='No cart available'}.
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{if count($interested)}
|
||||
<div>
|
||||
<h2>{l s='Products'} ({count($interested)})</h2>
|
||||
<table cellspacing="0" cellpadding="0" class="table" style="width:100%;">
|
||||
<colgroup>
|
||||
<col width="10px"></col>
|
||||
<col width=""></col>
|
||||
<col width="50px"></col>
|
||||
</colgroup>
|
||||
{foreach $interested as $key => $p}
|
||||
<tr {if $key %2}class="alt_row"{/if} style="cursor: pointer" onclick="document.location = '{$p['url']}'">
|
||||
<td>{$p['id']}</td>
|
||||
<td>{$p['name']}</td>
|
||||
<td align="center"><a href="{$p['url']}"><img src="../img/admin/details.gif" /></a></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="clear"> </div>
|
||||
|
||||
{* Last connections *}
|
||||
{if count($connections)}
|
||||
<h2>{l s='Last connections'}</h2>
|
||||
<table cellspacing="0" cellpadding="0" class="table" style="width:100%;">
|
||||
<colgroup>
|
||||
<col width="150px"></col>
|
||||
<col width="100px"></col>
|
||||
<col width="100px"></col>
|
||||
<col width=""></col>
|
||||
<col width="150px"></col>
|
||||
</colgroup>
|
||||
<tr>
|
||||
<th height="39px;">{l s='Date'}</th>
|
||||
<th>{l s='Pages viewed'}</th>
|
||||
<th>{l s='Total time'}</th>
|
||||
<th>{l s='Origin'}</th>
|
||||
<th>{l s='IP Address'}</th>
|
||||
</tr>
|
||||
{foreach $connections as $connection}
|
||||
<tr>
|
||||
<td>{$connection['date_add']}</td>
|
||||
<td>{$connection['pages']}</td>
|
||||
<td>{$connection['time']}</td>
|
||||
<td>{$connection['http_referer']}</td>
|
||||
<td>{$connection['ipaddress']}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
<div class="clear"> </div>
|
||||
{/if}
|
||||
|
||||
{if count($referrers)}
|
||||
<h2>{l s='Referrers'}</h2>
|
||||
<table cellspacing="0" cellpadding="0" class="table">
|
||||
<tr>
|
||||
<th style="width: 200px">{l s='Date'}</th>
|
||||
<th style="width: 200px">{l s='Name'}</th>
|
||||
{if $shop_is_feature_active}<th style="width: 200px">{l s='Shop'}</th>{/if}
|
||||
</tr>
|
||||
{foreach $referrers as $referrer}
|
||||
<tr>
|
||||
<td>{$referrer['date_add']}</td>
|
||||
<td>{$referrer['name']}</td>
|
||||
{if $shop_is_feature_active}<td>{$referrer['shop_name']}</td>{/if}
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/if}
|
||||
{/block}
|
||||
</div>
|
||||
<div class="clear"> </div>
|
||||
@@ -0,0 +1,45 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 8971 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{extends file="helper/form/form.tpl"}
|
||||
|
||||
{block name="label"}
|
||||
{if $input.type == 'table'}
|
||||
<table cellspacing="0" cellpadding="0" class="table width2 clear">
|
||||
<tr>
|
||||
<th><input type="checkbox" onclick="checkDelBoxes(this.form, 'tablesBox[]', this.checked)" class="noborder" name="checkme"></th>
|
||||
<th>{l s='Table'}</th><th>{l s='Table Engine'}</th>
|
||||
</tr>
|
||||
{foreach $table_status AS $table}
|
||||
<tr class="{if $table@iteration is even}alt_row{/if}">
|
||||
<td class="noborder"><input type="checkbox" name="tablesBox[]" value="{$table['Name']}"/></td><td>{$table['Name']}</td><td>{$table['Engine']}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/if}
|
||||
{if isset($input.label)}
|
||||
<label>{$input.label} </label>
|
||||
{/if}
|
||||
{/block}
|
||||
@@ -0,0 +1,38 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<script type="text/javascript">
|
||||
var textMsg = "{l s='This is a test message, your server is now available to send email'}";
|
||||
var textSubject = "{l s='Test message - Prestashop'}";
|
||||
var textSendOk = "{l s='Mail is sent'}";
|
||||
var textSendError= "{l s='Error: please check your configuration'}";
|
||||
var errorMail = "{l s='This email address is wrong!'}";
|
||||
</script>
|
||||
<script type="text/javascript" src="../js/sendMailTest.js"></script>
|
||||
|
||||
{$content}
|
||||
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 8971 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{extends file="helper/form/form.tpl"}
|
||||
|
||||
{block name="start_field_block"}
|
||||
<div class="margin-form">
|
||||
{if $input.type == 'select_theme'}
|
||||
<select name="{$input.name}" id="{$input.name}" {if isset($input.multiple)}multiple="multiple" {/if}{if isset($input.onchange)}onchange="{$input.onchange}"{/if}>
|
||||
{foreach $input.options.query AS $option}
|
||||
<option value="{$option}"
|
||||
{if isset($input.multiple)}
|
||||
{foreach $fields_value[$input.name] as $field_value}
|
||||
{$field_value}
|
||||
{if $field_value == $option}selected="selected"{/if}
|
||||
{/foreach}
|
||||
{else}
|
||||
{if $fields_value[$input.name] == $option}selected="selected"{/if}
|
||||
{/if}
|
||||
>{$option|escape:'htmlall':'UTF-8'}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
{if isset($input.hint)}<span class="hint" name="help_box">{$input.hint}<span class="hint-pointer"> </span></span>{/if}
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block name=script}
|
||||
$(document).ready(function(){
|
||||
$('select[name=id_profile]').change(function(){
|
||||
ifSuperAdmin($(this));
|
||||
});
|
||||
|
||||
ifSuperAdmin($('select[name=id_profile]'));
|
||||
});
|
||||
|
||||
function ifSuperAdmin(el)
|
||||
{
|
||||
var val = $(el).val();
|
||||
if(val == {$smarty.const._PS_ADMIN_PROFILE_})
|
||||
{
|
||||
$('.assoShop input[type=checkbox]').attr('disabled', 'disabled');
|
||||
$('.assoShop input[type=checkbox]').attr('checked', 'checked');
|
||||
}
|
||||
else
|
||||
$('.assoShop input[type=checkbox]').attr('disabled', '');
|
||||
}
|
||||
{/block}
|
||||
@@ -0,0 +1,33 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 8971 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{extends file="helper/form/form.tpl"}
|
||||
|
||||
{block name="end_field_block"}
|
||||
</div>
|
||||
{if $input.name == 'id_feature'}
|
||||
{hook h="displayFeatureValueForm" id_feature_value=$feature_value->id}
|
||||
{/if}
|
||||
{/block}
|
||||
@@ -0,0 +1,85 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 9548 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{extends file="helper/options/options.tpl"}
|
||||
{block name="defaultOptions"}
|
||||
<form action="{$current}&token={$token}" method="post" enctype="multipart/form-data">
|
||||
<fieldset><legend><img src="../img/admin/htaccess.gif" alt="" />{l s='Htaccess file generation'}</legend>
|
||||
<p>
|
||||
<b>{l s='Warning:'}</b>
|
||||
{l s='this tool can ONLY be used if you are hosted by an Apache web server. Please ask your webhost.'}
|
||||
</p>
|
||||
<p>
|
||||
{l s='This tool will automatically generate a ".htaccess" file that will give you the ability to do URL rewriting and to catch 404 errors.'}
|
||||
</p>
|
||||
{if $checkConfiguration_ht}
|
||||
<div class="clear"> </div>
|
||||
<label for="imageCacheControl">{l s='Optimization'}</label>
|
||||
<div class="margin-form">
|
||||
<input type="checkbox" name="PS_HTACCESS_CACHE_CONTROL" id="PS_HTACCESS_CACHE_CONTROL" value="1" {if $ps_htaccess_cache_control}checked="checked"{/if} />
|
||||
<p>{l s='This will add directives to your .htaccess file which should improve caching and compression.'}</p>
|
||||
</div>
|
||||
<div class="clear"> </div>
|
||||
<label for="imageCacheControl">{l s='Friendly URL'}</label>
|
||||
<div class="margin-form">
|
||||
<input type="checkbox" name="PS_REWRITING_SETTINGS" id="PS_REWRITING_SETTINGS" value="1" {if $ps_rewriting_settings}checked="checked"{/if} />
|
||||
<p>{l s='Enable only if your server allows URL rewriting.'}</p>
|
||||
</div>
|
||||
<div class="clear"> </div>
|
||||
<label for="imageCacheControl">{l s='Disable apache multiviews'}</label>
|
||||
<div class="margin-form">
|
||||
<input type="checkbox" name="PS_HTACCESS_DISABLE_MULTIVIEWS" id="PS_HTACCESS_DISABLE_MULTIVIEWS" value="1" {if $ps_htaccess_disable_multiviews}checked="checked"{/if} />
|
||||
<p>{l s='Enable this option only if you have problems with some pages URL rewriting.'}</p>
|
||||
</div>
|
||||
<p class="clear" style="font-weight:bold;">{l s='Generate your ".htaccess" file by clicking on the following button:'}
|
||||
<input type="submit" value="{l s='Generate .htaccess file'}" name="submitHtaccess" class="button" /></p>
|
||||
<p>{l s='This will erase your'}<b> {l s='old'}</b> {l s='.htaccess file!'}</p>
|
||||
{else}
|
||||
|
||||
<p style="color:red; font-weight:bold;">{l s='Before being able to use this tool, you need to:'}</p>
|
||||
<p>{l s='- create a'} <b>{l s='.htaccess'}</b> {l s='blank file in directory'} <b>{$smarty.const.__PS_BASE_URI__}</b>
|
||||
<br />{l s='- give it write permissions (CHMOD 666 on Unix system)'}</p>
|
||||
{/if}
|
||||
</p></fieldset></form>
|
||||
|
||||
<br /><br />
|
||||
<form action="{$current}&token={$token}" method="post" enctype="multipart/form-data">
|
||||
<fieldset><legend><img src="../img/admin/binoculars.png" alt="" />{l s='Robots file generation'}</legend>
|
||||
<p><b>{l s='Warning:'} </b>{l s='Your file robots.txt MUST be in your website\'s root directory and nowhere else.'}</p>
|
||||
<p>{l s='eg: http://www.yoursite.com/robots.txt'}</p>
|
||||
<p>{l s='This tool will automatically generate a "robots.txt" file that you can configure to deny access to search engines for some pages.'}</p>
|
||||
{if $checkConfiguration_rb}
|
||||
|
||||
<p style="font-weight:bold;">{l s='Generate your "robots.txt" file by clicking on the following button:'}
|
||||
<input type="submit" value="{l s='Generate robots.txt file'}" name="submitRobots" class="button" /></p>
|
||||
<p>{l s='This will erase your'}<b> {l s='old'}</b> {l s='robots.txt file!'}</p>
|
||||
{else}
|
||||
<p style="color:red; font-weight:bold;">{l s='Before being able to use this tool, you need to:'}</p>
|
||||
<p>{l s='- create a'} <b>{l s='robots.txt'}</b> {l s='blank file in dir:'} <b>{$smarty.const.__PS_BASE_URI__}</b>
|
||||
<br />{l s='- give it write permissions (CHMOD 666 on Unix system)'}</p>
|
||||
{/if}
|
||||
</p></fieldset></form>
|
||||
<br />
|
||||
{/block}
|
||||
@@ -0,0 +1,61 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{extends file="helper/options/options.tpl"}
|
||||
{block name="start_field_block"}
|
||||
{if $field['type'] == 'checkbox_table'}
|
||||
<div class="margin-form" style="float: left; padding-left: 0; width: 317px; margin-top: 6px; height: 300px; overflow-y: auto;">
|
||||
<table class="table" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" name="checkAll" onclick="checkDelBoxes(this.form, 'countries[]', this.checked)" /></th>
|
||||
<th>{l s='Name'}</th>
|
||||
<tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $field['list'] as $country}
|
||||
<tr>
|
||||
<td><input type="checkbox" name="countries[]" value="{$country[$field['identifier']]}" {if in_array(strtoupper($country['iso_code']), $allowed_countries)}checked="checked"{/if} /></td>
|
||||
<td>{$country['name']|escape:'htmlall':'UTF-8'}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
{elseif $field['type'] == 'textarea_newlines'}
|
||||
<div class="margin-form">
|
||||
<textarea name={$key} cols="{$field['cols']}" rows="{$field['rows']}">{$field['value']|replace:';':"\n"|escape:'htmlall':'UTF-8'}</textarea>
|
||||
{else}
|
||||
<div class="margin-form">
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block name="end_field_block"}
|
||||
{if $field['type'] == 'checkbox_table'}
|
||||
<div class="clear"></div>
|
||||
<br />
|
||||
{/if}
|
||||
</div>
|
||||
{/block}
|
||||
@@ -0,0 +1,123 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 8971 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{extends file="helper/form/form.tpl"}
|
||||
|
||||
{block name=script}
|
||||
|
||||
function toggleShareOrders() {
|
||||
|
||||
var disabled_customer = ($('#share_customer_on').attr('checked')) ? false : true;
|
||||
var disabled_stock = ($('#share_stock_on').attr('checked')) ? false : true;
|
||||
|
||||
if (disabled_customer || disabled_stock)
|
||||
{
|
||||
$("input[name=share_order]").each(function(i) {
|
||||
$(this).attr('disabled', 'disabled');
|
||||
});
|
||||
|
||||
$('#share_order_off').attr('checked', true);
|
||||
}
|
||||
else
|
||||
{
|
||||
$('input[name=share_order]').attr('disabled', '');
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
toggleShareOrders();
|
||||
$('input[name=share_customer]').click(function()
|
||||
{
|
||||
toggleShareOrders();
|
||||
});
|
||||
$('input[name=share_stock]').click(function()
|
||||
{
|
||||
toggleShareOrders();
|
||||
});
|
||||
|
||||
$('#useImportData').click(function() {
|
||||
$('#importList').slideToggle('slow');
|
||||
});
|
||||
});
|
||||
|
||||
{/block}
|
||||
|
||||
{block name="label"}
|
||||
|
||||
{if $input.type == 'text' && $input.name == 'name'}
|
||||
<div class="hint" name="help_box" style="display:block;">{l s='You can\'t edit GroupShop when you have more than one Shop'}</div><br />
|
||||
{/if}
|
||||
|
||||
{if isset($input.label)}
|
||||
<label>{$input.label} </label>
|
||||
{/if}
|
||||
|
||||
{/block}
|
||||
|
||||
{block name="other_fieldsets"}
|
||||
{if isset($form_import)}
|
||||
<br /><br />
|
||||
<fieldset>
|
||||
{foreach $form_import as $key => $field}
|
||||
{if $key == 'legend'}
|
||||
<legend>
|
||||
{if isset($field.image)}<img src="{$field.image}" alt="{$field.title}" />{/if}
|
||||
{$field.title}
|
||||
</legend>
|
||||
{elseif $key == 'label'}
|
||||
<label>{$field}</label>
|
||||
{/if}
|
||||
<div class="clear"></div>
|
||||
{if $key == 'checkbox'}
|
||||
<div class="margin-form">
|
||||
<label><input type="{$field.type}" value="{$field.value}" name="{$field.name}" id="{$field.name}" {if $checked} checked="checked"{/if}/> {$field.label}</label>
|
||||
{elseif $key == 'select'}
|
||||
<select name="{$field.name}" id="{$field.name}">
|
||||
{foreach $field.options.query AS $key => $option}
|
||||
<option value="{$key}" {if $key == $defaultGroup}selected="selected"{/if}>
|
||||
{$option.name}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
{elseif $key == 'allcheckbox'}
|
||||
<div id="importList" {if !$checked}style="display:none"{/if}>
|
||||
<ul>
|
||||
{foreach $field.values as $key => $label}
|
||||
<li><label><input type="checkbox" name="importData[{$key}]" checked="checked" /> {$label}</label></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
{elseif $key == 'p'}
|
||||
<p>{$field}</p>
|
||||
</div>
|
||||
{elseif $key == 'submit'}
|
||||
<div class="margin-form">
|
||||
<input type="submit" value="{$field.title}" name="submitAdd{$table}" {if isset($field.class)}class="{$field.class}"{/if} />
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</fieldset>
|
||||
{/if}
|
||||
{/block}
|
||||
@@ -0,0 +1,275 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 8971 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{extends file="helper/form/form.tpl"}
|
||||
|
||||
{block name="label"}
|
||||
{if $input['type'] == 'modules'}
|
||||
<div style="{if !$form_id}display:none{/if}">
|
||||
<div class="separation"></div>
|
||||
<label>{l s='Modules restrictions: '}</label>
|
||||
</div>
|
||||
{elseif $input['type'] == 'group_discount_category'}
|
||||
<div style="{if !$form_id}display:none{/if}">
|
||||
<div class="separation"></div>
|
||||
<label>{$input.label} </label>
|
||||
</div>
|
||||
{else}
|
||||
<label>{$input.label} </label>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
|
||||
{block name="start_field_block"}
|
||||
{if $input['type'] == 'group_discount_category'}
|
||||
<div style="{if !$form_id}display:none{/if}">
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("#group_discount_category").fancybox({
|
||||
onStart: function () {
|
||||
$('#group_discount_category_fancybox').show();
|
||||
initFancyBox();
|
||||
},
|
||||
onClosed: function () {
|
||||
$('#group_discount_category_fancybox').hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function deleteCategoryReduction(id_category)
|
||||
{
|
||||
$('#group_discount_category_table tr#'+id_category).fadeOut('slow', function () {
|
||||
$(this).remove();
|
||||
});
|
||||
|
||||
}
|
||||
function toogleCheck(elt)
|
||||
{
|
||||
if ($(elt).hasClass('select_all'))
|
||||
{
|
||||
$(elt).addClass('unselect_all').removeClass('select_all');
|
||||
$('ul#sortable_module_'+$(elt).attr('id')).find('input[type="checkbox"]').removeAttr('checked');
|
||||
$(elt).html('{l s='Select all'}');
|
||||
}
|
||||
else
|
||||
{
|
||||
$(elt).addClass('select_all').removeClass('unselect_all');
|
||||
$('ul#sortable_module_'+$(elt).attr('id')).find('input[type="checkbox"]').attr('checked', 'checked');
|
||||
$(elt).html('{l s='Unselect all'}');
|
||||
}
|
||||
}
|
||||
|
||||
function unauthorizeChecked()
|
||||
{
|
||||
$('ul#sortable_module_unauthorize_list').find('input[type="checkbox"]:checked').each( function () {
|
||||
$('ul#sortable_module_authorize_list').prepend($(this).parent());
|
||||
$(this).removeAttr('checked');
|
||||
$(this).parent().children('input["type=hidden"]').attr('name', 'modulesBoxAuth[]');
|
||||
});
|
||||
}
|
||||
|
||||
function authorizeChecked()
|
||||
{
|
||||
$('ul#sortable_module_authorize_list').find('input[type="checkbox"]:checked').each( function () {
|
||||
$('ul#sortable_module_unauthorize_list').prepend($(this).parent());
|
||||
$(this).removeAttr('checked');
|
||||
$(this).parent().children('input["type=hidden"]').attr('name', 'modulesBoxUnauth[]');
|
||||
});
|
||||
}
|
||||
|
||||
function addCategoryReduction()
|
||||
{
|
||||
exist = false;
|
||||
$('.category_reduction').each( function () {
|
||||
if ($(this).attr('name') == 'category_reduction['+$('[name="id_category"]:checked').val()+']')
|
||||
{
|
||||
exist = true;
|
||||
jAlert('{l s='This category already exist for this group'}');
|
||||
return false;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
if (exist)
|
||||
return;
|
||||
$.ajax({
|
||||
type:"POST",
|
||||
url: "ajax-tab.php",
|
||||
async: true,
|
||||
dataType: "json",
|
||||
data : {
|
||||
ajax: "1",
|
||||
token: "{getAdminToken tab='AdminGroups'}",
|
||||
controller: "AdminGroups",
|
||||
action: "addCategoryReduction",
|
||||
category_reduction: $('#category_reduction_fancybox').val() ,
|
||||
id_category: $('[name="id_category"]:checked').val()
|
||||
},
|
||||
success : function(jsonData)
|
||||
{
|
||||
if (jsonData.hasError)
|
||||
{
|
||||
var errors = '';
|
||||
for(error in jsonData.errors)
|
||||
//IE6 bug fix
|
||||
if(error != 'indexOf')
|
||||
errors += jsonData.errors[error] + "\n";
|
||||
jAlert(errors);
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#group_discount_category_table').append('<tr class="alt_row" id="'+jsonData.id_category+'"><td>'+jsonData.catPath+'</td><td>{l s='Discount:'}'+jsonData.discount+'{l s='%'}</td><td><a href="#" onclick="deleteCategoryReduction('+jsonData.id_category+');"><img src="../img/admin/delete.gif"></a></td></tr>');
|
||||
|
||||
var input_hidden = document.createElement("input");
|
||||
input_hidden.setAttribute('type', 'hidden');
|
||||
input_hidden.setAttribute('value', jsonData.discount);
|
||||
input_hidden.setAttribute('name', 'category_reduction['+jsonData.id_category+']');
|
||||
input_hidden.setAttribute('class', 'category_reduction');
|
||||
|
||||
$('#group_discount_category_table tr#'+jsonData.id_category+' > td:last').append(input_hidden);
|
||||
$.fancybox.close();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function initFancyBox()
|
||||
{
|
||||
$('[name="id_category"]:checked').removeAttr('checked');
|
||||
collapseAllCategories();
|
||||
$('#category_reduction_fancybox').val('0.00');
|
||||
}
|
||||
</script>
|
||||
<div class="margin-form">
|
||||
<a class="button" href="#group_discount_category_fancybox" id="group_discount_category">{l s='Add a category discount'}</a>
|
||||
<table cellspacing="0" cellpadding="0" class="table" style="margin-top:10px" id="group_discount_category_table">
|
||||
{foreach $input['values'] key=key item=category }
|
||||
<tr class="alt_row" id="{$category.id_category}">
|
||||
<td>{$category.path}</td>
|
||||
<td>{l s='Discount:'} {$category.reduction}{l s='%'}</td>
|
||||
<td>
|
||||
<a href="#" onclick="deleteCategoryReduction({$category.id_category});"><img src="../img/admin/delete.gif"></a>
|
||||
<input type="hidden" class="category_reduction" name="category_reduction[{$category.id_category}]" value="{$category.reduction}">
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
|
||||
<div style="display:none" id="group_discount_category_fancybox">
|
||||
<fieldset style="text-align:left"><legend><img src="../img/admin/tab-groups.gif" />{l s='New group category discount'}</legend>
|
||||
<div class="hintGroup" style="font-size: 13px;">
|
||||
{l s='Beware the reduction applied to a category does not stack with the overall reduction but replaces it. The group is automatically added to the category.'}
|
||||
</div>
|
||||
{$categoryTreeView}
|
||||
<div class="warn">{l s='Only products that have this category as the default category will be affected'}</div>
|
||||
<div class="clear"> </div>
|
||||
<label>{l s='Discount (in %):'}</label>
|
||||
<input type="text" name="category_reduction_fancybox" id="category_reduction_fancybox" value="0.00" size="33">
|
||||
<div class="clear"> </div>
|
||||
<button onclick="addCategoryReduction();" class="button">{l s='add'}</button>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
{elseif $input['type'] == 'modules'}
|
||||
<div style="{if !$form_id}display:none{/if}">
|
||||
<div class="margin-form">
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$( "#sortable_module_authorize_list, #sortable_module_unauthorize_list" ).sortable({
|
||||
connectWith: ".connectedSortable",
|
||||
stop: function(event, ui)
|
||||
{
|
||||
console.log($(event.toElement).parent('ul').attr('id'));
|
||||
if ($(event.toElement).parent('ul').attr('id') == 'sortable_module_authorize_list')
|
||||
$(event.toElement).children('input["type=hidden"]').attr('name', 'modulesBoxAuth[]');
|
||||
else
|
||||
$(event.toElement).children('input["type=hidden"]').attr('name', 'modulesBoxUnauth[]');
|
||||
}
|
||||
}).disableSelection();
|
||||
});
|
||||
</script>
|
||||
<table cellspacing="0" cellpadding="0" class="table" style="width:600px">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="padding-left:10px;">
|
||||
{$input['label']['auth_modules']}
|
||||
</th>
|
||||
<th style="padding-left:10px;">
|
||||
{$input['label']['unauth_modules']}
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="width:300px">
|
||||
<ul id="sortable_module_authorize_list" class="connectedSortable" style="height:300px;overflow:auto">
|
||||
<li></li>
|
||||
{foreach $input['values']['auth_modules'] key=key item=module }
|
||||
<li class="module_list" id="module_{$module->id}">
|
||||
<input type="checkbox" style="margin-right:5px">
|
||||
<img src="../modules/{$module->name}/logo.gif">
|
||||
{$module->displayName}
|
||||
<input type="hidden" name="modulesBoxAuth[]" value="{$module->id}">
|
||||
</li>
|
||||
|
||||
{/foreach}
|
||||
</ul>
|
||||
</td>
|
||||
<td style="width:300px">
|
||||
<ul id="sortable_module_unauthorize_list" class="connectedSortable" style="height:300px;overflow:auto">
|
||||
<li></li>
|
||||
{foreach $input['values']['unauth_modules'] key=key item=module }
|
||||
<li class="module_list" id="module_{$module->id}">
|
||||
<input type="checkbox" style="margin-right:5px">
|
||||
<img src="../modules/{$module->name}/logo.gif">
|
||||
{$module->displayName}
|
||||
<input type="hidden" name="modulesBoxUnauth[]" value="{$module->id}">
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td style="text-align:center">
|
||||
<button style="width:100%;margin-top:5px" id="authorize_list" onclick="toogleCheck(this);return false;" class="button">{l s='Select all'}</button>
|
||||
<button style="width:100%;margin-top:5px;margin-bottom:5px" onclick="authorizeChecked();return false;" class="button">{l s='<< Unauthorize'}</button>
|
||||
</td>
|
||||
<td style="text-align:center">
|
||||
<button style="width:100%;margin-top:5px"id="unauthorize_list" onclick="toogleCheck(this);return false;" class="button">{l s='Select all'}</button>
|
||||
<button style="width:100%;margin-top:5px;margin-bottom:5px" onclick="unauthorizeChecked();return false;" class="button">{l s='<< Authorize'}</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
{else}
|
||||
<div class="margin-form">
|
||||
{/if}
|
||||
{/block}
|
||||
@@ -0,0 +1,64 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 9596 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{extends file="helper/view/view.tpl"}
|
||||
|
||||
{block name="override_tpl"}
|
||||
|
||||
<fieldset>
|
||||
<ul>
|
||||
<li><span style="font-weight: bold; font-size: 13px; color:#000;">{l s='Name:'}</span> {$group->name[$language->id]}</li>
|
||||
<li><span style="font-weight: bold; font-size: 13px; color:#000;">{l s='Discount:'}</span> {$group->reduction} {l s='%'}</li>
|
||||
<li><span style="font-weight: bold; font-size: 13px; color:#000;">{l s='Current category discount:'}</span>
|
||||
{if !$categorieReductions}
|
||||
{l s='None'}
|
||||
{else}
|
||||
<table cellspacing="0" cellpadding="0" class="table" style="margin-top:10px">
|
||||
{foreach $categorieReductions key=key item=category }
|
||||
<tr class="alt_row">
|
||||
<td>{$category.path}</td>
|
||||
<td>{l s='Discount:'} {$category.reduction}{l s='%'}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/if}
|
||||
</li>
|
||||
|
||||
<li><span style="font-weight: bold; font-size: 13px; color:#000;">{l s='Price display method:'}</span>
|
||||
{if $group->price_display_method}
|
||||
{l s='Tax excluded'}
|
||||
{else}
|
||||
{l s='Tax included'}
|
||||
{/if}
|
||||
</li>
|
||||
<li><span style="font-weight: bold; font-size: 13px; color:#000;">{l s='Show prices:'}</span> {if $group->show_prices}{l s='Yes'}{else}{l s='No'}{/if}
|
||||
</li>
|
||||
</ul>
|
||||
</fieldset>
|
||||
<h2>{l s='Customer members of this group'}</h2>
|
||||
{$customerList}
|
||||
|
||||
{/block}
|
||||
@@ -0,0 +1,197 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<div class="toolbarBox">
|
||||
<div class="pageTitle">
|
||||
<span><h3>{l s='Dashboard'}</h3></span>
|
||||
</div>
|
||||
</div>
|
||||
{if $upgrade}
|
||||
<div id="blockNewVersionCheck">
|
||||
{if $upgrade->need_upgrade}
|
||||
<div class="warning warn" style="margin-bottom:10px;"><h3>{l s ='New PrestaShop version available'} : <a style="text-decoration: underline;" href="{$upgrade->link}" target="_blank">{l s ='Download'} {$upgrade->version_name}</a> !</h3></div>
|
||||
{/if}
|
||||
</div>
|
||||
{else}
|
||||
<p>{l s ='Update notification unavailable'}</p>
|
||||
<p> </p>
|
||||
<p>{l s ='To receive PrestaShop update warnings, you need to activate '} <b>allow_url_fopen</b> [<a href="http://www.php.net/manual/{$isoUser}/ref.filesystem.php">{l s ='more info on php.net'}</a>]</p>
|
||||
<p>{l s ='If you don\'t know how to do that, please contact your host administrator !'}</p><br />
|
||||
{/if}
|
||||
{if $employee->bo_show_screencast}
|
||||
<div id="adminpresentation">
|
||||
<iframe src="{$protocol}://screencasts.prestashop.com/v1.5/screencast.php?iso_lang={$isoUser}" style="border:none;width:100%;height:384px;" scrolling="no"></iframe>
|
||||
<div id="footer_iframe_home">
|
||||
<!--<a href="#">{l s ='View more video tutorials'}</a>-->
|
||||
<input type="checkbox" id="screencast_dont_show_again">
|
||||
<label for="screencast_dont_show_again">{l s='don\'t show again'}</label>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#screencast_dont_show_again').click(function() {
|
||||
if ($(this).is(':checked'))
|
||||
{
|
||||
$.ajax({
|
||||
type : 'POST',
|
||||
data : {
|
||||
ajax : '1',
|
||||
controller : 'AdminHome',
|
||||
token : '{$token}',
|
||||
id_employee : '{$employee->id}',
|
||||
action : 'hideScreencast'
|
||||
},
|
||||
url: 'ajax-tab.php',
|
||||
dataType : 'json',
|
||||
success: function(data) {
|
||||
if (!data)
|
||||
jAlert("TECHNICAL ERROR - no return status found");
|
||||
else if (data.status != "ok")
|
||||
jAlert("TECHNICAL ERROR: "+data.msg);
|
||||
|
||||
$('#adminpresentation').slideUp('slow');
|
||||
|
||||
},
|
||||
error: function(data, textStatus, errorThrown)
|
||||
{
|
||||
jAlert("TECHNICAL ERROR: "+data);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div class="clear"></div>
|
||||
{/if}
|
||||
|
||||
<div id="homepage">
|
||||
<div id="column_left">
|
||||
<ul class="F_list clearfix">
|
||||
{foreach from=$quick_links key=k item=link}
|
||||
<li id="{$k}_block">
|
||||
<a href="{$link.href}">
|
||||
<h4>{$link.title}</h4>
|
||||
<p>{$link.description}</p>
|
||||
</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{$monthly_statistics}
|
||||
{$customers_service}
|
||||
{$stats_sales}
|
||||
{$last_orders}
|
||||
|
||||
|
||||
<div id="column_right">
|
||||
{$tips_optimization}
|
||||
<div id="partner_preactivation"><p class="center"><img src="../img/loader.gif" alt="" />{l s='Loading...'}</p></div>
|
||||
<div id="discover_prestashop"><p class="center"><img src="../img/loader.gif" alt="" />{l s='Loading...'}</p></div>
|
||||
</div>
|
||||
{hook h="displayBackOfficeHome"}
|
||||
</div>
|
||||
<div class="clear"> </div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
|
||||
if ({$refresh_check_version})
|
||||
{
|
||||
$('#blockNewVersionCheck').hide();
|
||||
$.ajax({
|
||||
type : 'POST',
|
||||
data : {
|
||||
ajax : '1',
|
||||
controller : 'AdminHome',
|
||||
token : '{$token}',
|
||||
id_employee : '{$employee->id}',
|
||||
action : 'refreshCheckVersion'
|
||||
},
|
||||
url: 'ajax-tab.php',
|
||||
dataType : 'json',
|
||||
success: function(data) {
|
||||
if (!data)
|
||||
jAlert("TECHNICAL ERROR - no return status found");
|
||||
else if (data.status != "ok")
|
||||
jAlert("TECHNICAL ERROR: "+data.msg);
|
||||
if(data.upgrade.need_upgrade)
|
||||
{
|
||||
$('#blockNewVersionCheck').children("a").attr('href',data.upgrade.link);
|
||||
$('#blockNewVersionCheck').children("a").html(data.upgrade.link+"pouet");
|
||||
$('#blockNewVersionCheck').fadeIn('slow');
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
error: function(data, textStatus, errorThrown)
|
||||
{
|
||||
jAlert("TECHNICAL ERROR: "+data);
|
||||
}
|
||||
});
|
||||
}
|
||||
$.ajax({
|
||||
url: "ajax-tab.php",
|
||||
type: "POST",
|
||||
data:{
|
||||
token: "{$token}",
|
||||
ajax: "1",
|
||||
controller : "AdminHome",
|
||||
action: "getAdminHomeElement"
|
||||
},
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
{if $employee->bo_show_screencast}
|
||||
if (json.screencast != 'NOK')
|
||||
$('#adminpresentation').fadeIn('slow');
|
||||
else
|
||||
$('#adminpresentation').fadeOut('slow');
|
||||
{/if}
|
||||
$('#partner_preactivation').fadeOut('slow', function() {
|
||||
if (json.partner_preactivation != 'NOK')
|
||||
$('#partner_preactivation').html(json.partner_preactivation);
|
||||
else
|
||||
$('#partner_preactivation').html('');
|
||||
$('#partner_preactivation').fadeIn('slow');
|
||||
});
|
||||
|
||||
$('#discover_prestashop').fadeOut('slow', function() {
|
||||
if (json.discover_prestashop != 'NOK')
|
||||
$('#discover_prestashop').html(json.discover_prestashop);
|
||||
else
|
||||
$('#discover_prestashop').html('');
|
||||
$('#discover_prestashop').fadeIn('slow');
|
||||
});
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown)
|
||||
{
|
||||
// don't show/hide screencast if it's deactivated
|
||||
{if $employee->bo_show_screencast}
|
||||
$('#adminpresentation').fadeOut('slow');
|
||||
{/if}
|
||||
$('#partner_preactivation').fadeOut('slow');
|
||||
$('#discover_prestashop').fadeOut('slow');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,86 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<div class="admin-box1">
|
||||
<h5>{l s='A good beginning...'}
|
||||
<span style="float:right">
|
||||
<a id="optimizationTipsFold" href="#">
|
||||
<img alt="v" src="../img/admin/{if $hide_tips}arrow-down.png{else}arrow-up.png{/if}" />
|
||||
</a>
|
||||
</span>
|
||||
</h5>
|
||||
<ul id="list-optimization-tips" class="admin-home-box-list" {if $hide_tips}style="display:none"{/if} >
|
||||
{foreach from=$opti_list item=i key=k}
|
||||
<li>
|
||||
<img src="../img/admin/{$i.image}" class="pico" />
|
||||
<a style="color:{$i.color}" href="{$i.href}">{$i.title}</a>
|
||||
</li>
|
||||
|
||||
{/foreach}
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
{if !$hide_tips}
|
||||
$("#optimizationTipsFold").click(function(e){
|
||||
e.preventDefault();
|
||||
$.ajax({
|
||||
url: "ajax-tab.php",
|
||||
type: "POST",
|
||||
data:{
|
||||
token: "{$token}",
|
||||
ajax: "1",
|
||||
controller : "AdminHome",
|
||||
action: "hideOptimizationTips"
|
||||
},
|
||||
dataType: "json",
|
||||
success: function(json){
|
||||
if(json.result == "ok")
|
||||
showSuccessMessage(json.msg);
|
||||
else
|
||||
showErrorMessage(json.msg);
|
||||
|
||||
} ,
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown)
|
||||
{
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
{/if}
|
||||
$("#optimizationTipsFold").click(function(e){
|
||||
e.preventDefault();
|
||||
$("#list-optimization-tips").toggle(function(){
|
||||
if($("#optimizationTipsFold").children("img").attr("src") == "../img/admin/arrow-up.png")
|
||||
$("#optimizationTipsFold").children("img").attr("src","../img/admin/arrow-down.png");
|
||||
else
|
||||
$("#optimizationTipsFold").children("img").attr("src","../img/admin/arrow-up.png");
|
||||
});
|
||||
})
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,104 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{$content}
|
||||
|
||||
{if isset($display_regenerate)}
|
||||
<h2 class="space">{l s='Regenerate thumbnails'}</h2>
|
||||
{l s='Regenerates thumbnails for all existing product images'}<br /><br />
|
||||
<div class="width4">
|
||||
<div class="warn">
|
||||
{l s='Please be patient, as this can take several minutes'}<br />
|
||||
{l s='Be careful! Manually generated thumbnails will be erased by automatically generated thumbnails.'}
|
||||
</div>
|
||||
</div>
|
||||
<form action="{$current}&token={$token}" method="post">
|
||||
<fieldset class="width4">
|
||||
<legend><img src="../img/admin/picture.gif" /> {l s='Regenerate thumbnails'}</legend><br />
|
||||
<label>{l s='Select image'}</label>
|
||||
<div class="margin-form">
|
||||
<select name="type" onchange="changeFormat(this)">
|
||||
<option value="all">{l s='All'}</option>
|
||||
{foreach $types AS $k => $type}
|
||||
<option value="{$k}">{$type}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
{foreach $types AS $k => $type}
|
||||
<label class="second-select format_{$k}" style="display:none;">{l s='Select format'}</label>
|
||||
<div class="second-select margin-form format_{$k}" style="display:none;">
|
||||
<select class="second-select format_{$k}" name="format_{$k}">
|
||||
<option value="all">{l s='All'}</option>';
|
||||
{foreach $formats[$k] AS $format}
|
||||
<option value="{$format['id_image_type']}">{$format['name']}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
{/foreach}
|
||||
<script>
|
||||
function changeFormat(elt)
|
||||
{ldelim}
|
||||
$('.second-select').hide();
|
||||
$('.format_' + $(elt).val()).show();
|
||||
{rdelim}
|
||||
</script>
|
||||
<label>{l s='Erase previous images'}</label>
|
||||
<div class="margin-form">
|
||||
<input name="erase" type="checkbox" value="1" checked="checked" />
|
||||
<p>{l s='Uncheck this checkbox only if your server timed out and you need to resume the regeneration.'}</p>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<center><input type="Submit" name="submitRegenerate{$table}" value="{l s='Regenerate thumbnails'}" class="button space" onclick="return confirm('{l s='Are you sure?'}');" /></center>
|
||||
</fieldset>
|
||||
</form>
|
||||
{/if}
|
||||
|
||||
{if isset($display_move)}
|
||||
<br /><h2 class="space">{l s='Move images'}</h2>
|
||||
{l s='A new storage system for product images is now used by PrestaShop. It offers better performance if your shop has a very large number of products.'}<br />
|
||||
<br />
|
||||
{if $safe_mode}
|
||||
<div class="warn">
|
||||
{l s='PrestaShop has detected that your server configuration is not compatible with the new storage system (directive "safe_mode" is activated). You should continue to use the actual system.'}
|
||||
</div>
|
||||
{else}
|
||||
<form action="{$current}&token={$token}" method="post">
|
||||
<fieldset class="width4">
|
||||
<legend><img src="../img/admin/picture.gif" /> {l s='Move images'}</legend><br />
|
||||
{l s='You can choose to keep your images stored in the previous system - nothing wrong with that.'}<br />
|
||||
{l s='You can also decide to move your images to the new storage system: in this case, click on the "Move images" button below. Please be patient, as this can take several minutes.'}
|
||||
<br /><br />
|
||||
<div class="hint clear" style="display: block;">
|
||||
{l s='After moving all of your product images, for best performance go to the '}
|
||||
<a style="text-decoration:underline" href="{$link_ppreferences}">{l s='product preferences tab'}</a>
|
||||
{l s=' and set "Use the legacy image filesystem" to NO.'}
|
||||
</div>
|
||||
<center><input type="Submit" name="submitMoveImages{$table}" value="{l s='Move images'}" class="button space" onclick="return confirm('{l s='Are you sure?'}');" /></center>
|
||||
</fieldset>
|
||||
</form>
|
||||
{/if}
|
||||
{/if}
|
||||
@@ -0,0 +1,288 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 8971 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{if $show_toolbar}
|
||||
<div class="toolbar-placeholder">
|
||||
<div class="toolbarBox{if $toolbar_fix} toolbarHead{/if}">
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn}
|
||||
<div class="pageTitle">
|
||||
<h3>
|
||||
<span id="current_obj" style="font-weight: normal;">{$title|default:' '}</span>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $module_confirmation}
|
||||
<div class="module_confirmation conf confirm"><img src="../img/admin/ok.gif" alt="" title="" style="margin-right:5px; float:left;" />
|
||||
{l s='The .CSV file has been imported into your shop.'}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function(){
|
||||
activeClueTip();
|
||||
$("a#upload_file_import_link").fancybox({
|
||||
'titleShow' : false,
|
||||
'transitionIn' : 'elastic',
|
||||
'transitionOut' : 'elastic',
|
||||
});
|
||||
});
|
||||
|
||||
function activeClueTip()
|
||||
{
|
||||
$('.info').cluetip({
|
||||
splitTitle: '|',
|
||||
showTitle: false
|
||||
});
|
||||
|
||||
$('#preview_import').submit(function() {
|
||||
if ($('#truncate').get(0).checked)
|
||||
{
|
||||
if (confirm('{l s='Are you sure you want to delete'}' + ' ' + $('#entity > option:selected').text().toLowerCase() + '{l s='?'}'))
|
||||
{
|
||||
this.submit();
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
{**
|
||||
* Upload fancybox
|
||||
*}
|
||||
<div style="display: none">
|
||||
<div id="upload_file_import" style="padding-left: 10px; background-color: #EBEDF4; border: 1px solid #CCCED7">
|
||||
<div class="clear"> </div>
|
||||
<form action="{$current}&token={$token}" method="POST" enctype="multipart/form-data">
|
||||
<label class="clear" style="width:160px; text-align: left;">{l s='Select your CSV file:'} </label>
|
||||
<div class="margin-form" style="padding-left:190px;">
|
||||
<input name="file" type="file" />
|
||||
<p class="preference_description">
|
||||
{l s='You can also upload your file via FTP in the following directory:'} {$path_import}.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="margin-form" style="padding-left:190px;">
|
||||
<input type="submit" name="submitFileUpload" value="{l s='Upload'}" class="button" />
|
||||
<p class="preference_description">
|
||||
{l s='Allowed files are only UTF-8 and iso-8859-1 encoded ones'}
|
||||
</p>
|
||||
</div>
|
||||
</form>
|
||||
<div class="clear"> </div>
|
||||
<div style="width:50%; margin: 0 auto;">
|
||||
{l s='Note that our samples our available, below.'}
|
||||
<div class="clear"> </div>
|
||||
<ul id="sample_files_import">
|
||||
<li><a href="../docs/csv_import/categories_import.csfav">{l s='Categories sample file'}</a></li>
|
||||
<li><a href="../docs/csv_import/products_import.csv">{l s='Products sample file'}</a></li>
|
||||
<li><a href="../docs/csv_import/combinations_import.csv">{l s='Combinations sample file'}</a></li>
|
||||
<li><a href="../docs/csv_import/customers_import.csv">{l s='Customers sample file'}</a></li>
|
||||
<li><a href="../docs/csv_import/addresses_import.csv">{l s='Addresses sample file'}</a></li>
|
||||
<li><a href="../docs/csv_import/manufacturers_import.csv">{l s='Manufacturers sample file'}</a></li>
|
||||
<li><a href="../docs/csv_import/suppliers_import.csv">{l s='Suppliers sample file'}</a></li>
|
||||
<li><a href="../docs/csv_import/supply_orders_import.csv">{l s='Supply Orders sample file'}</a></li>
|
||||
<li><a href="../docs/csv_import/supply_orders_details_import.csv">{l s='Supply Orders Details sample file'}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="clear"> </div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clear"> </div>
|
||||
|
||||
{**
|
||||
* Import fieldset
|
||||
*}
|
||||
<form id="preview_import"
|
||||
action="{$current}&token={$token}"
|
||||
method="post"
|
||||
style="display:inline"
|
||||
enctype="multipart/form-data"
|
||||
class="clear">
|
||||
|
||||
<fieldset style="float: left; margin: 0pt 20px 0pt 0pt; width: 70%;">
|
||||
<legend><img src="../img/admin/import.gif" />{l s='Import'}</legend>
|
||||
<label class="clear">{l s='What kind of Entity would you like to import ?'} </label>
|
||||
<div class="margin-form">
|
||||
<select name="entity" id="entity">
|
||||
{foreach $entities AS $entity => $i}
|
||||
<option value="{$i}"
|
||||
{if $entity == $i}selected="selected"{/if}>
|
||||
{$entity}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<label class="clear">{l s='Your CSV file'} ({count($files_to_import)} {if count($files_to_import) > 1} {l s='files'}{else}{l s='file'}{/if}{l s='):'}</label>
|
||||
<div class="margin-form">
|
||||
{if count($files_to_import)}
|
||||
<select name="csv">
|
||||
{foreach $files_to_import AS $filename}
|
||||
<option value="{$filename}">{$filename}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
{/if}
|
||||
|
||||
<a href="#upload_file_import" id="upload_file_import_link" class="button"><img src="../img/admin/add.gif" alt="Uplaod" title="Upload" />{l s='Upload'}</a>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<label class="clear">{l s='Language of the file:'}</label>
|
||||
<div class="margin-form">
|
||||
<select name="iso_lang">
|
||||
{foreach $languages AS $lang}
|
||||
<option value="{$lang.iso_code}" {if $lang.id_lang == $id_language} selected="selected"{/if}>{$lang.name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
{l s='The locale must be installed'}
|
||||
</div>
|
||||
<label for="convert" class="clear">{l s='iso-8859-1 encoded file?'} </label>
|
||||
<div class="margin-form">
|
||||
<input name="convert" id="convert" type="checkbox" style="margin-top: 6px;"/>
|
||||
</div>
|
||||
<label class="clear">{l s='Field separator:'} </label>
|
||||
<div class="margin-form">
|
||||
<input type="text" size="2" value=";" name="separator"/>
|
||||
{l s='e.g. '}"1<span class="bold" style="color: red">;</span>Ipod<span class="bold" style="color: red">;</span>129.90<span class="bold" style="color: red">;</span>5"
|
||||
</div>
|
||||
<label class="clear">{l s='Multiple value separator:'} </label>
|
||||
<div class="margin-form">
|
||||
<input type="text" size="2" value="," name="multiple_value_separator"/>
|
||||
{l s='e.g. '}"Ipod;red.jpg<span class="bold" style="color: red">,</span>blue.jpg<span class="bold" style="color: red">,</span>green.jpg;129.90"
|
||||
</div>
|
||||
<label for="truncate" class="clear">{l s='Delete all'} <span id="entitie">{l s='categories'}</span> {l s='before import ?'} </label>
|
||||
<div class="margin-form">
|
||||
<input name="truncate" id="truncate" type="checkbox"/>
|
||||
</div>
|
||||
<label for="match_ref" class="clear" style="display: none">{l s='Use product reference as key ?'}</label>
|
||||
<div class="margin-form">
|
||||
<input name="match_ref" id="match_ref" type="checkbox" style="margin-top: 6px; display:none"/>
|
||||
</div>
|
||||
<div class="space margin-form">
|
||||
<input type="submit" name="submitImportFile" value="{l s='Next step'}" class="button"/>
|
||||
</div>
|
||||
<div class="warn import_products_categories" style="margin-top: 20px;">
|
||||
<p>{l s='Note that the category import does not support categories of the same name.'}</p>
|
||||
<p>{l s='Note that you can have serveral products with the same reference.'}</p>
|
||||
</div>
|
||||
<div class="warn import_supply_orders_details" style="margin-top: 20px; display:none">
|
||||
<p>{l s='Importing Supply Order Details will first reset the products ordered, if any.'}</p>
|
||||
</div>
|
||||
{if !count($files_to_import)}
|
||||
<div class="warn" style="margin-top: 20px;">
|
||||
<p>{l s='There is no CSV file available, please upload one using the form above.'}</p>
|
||||
<ul>
|
||||
<li>{l s='You can read informations on CSV import at:'} <a href="http://www.prestashop.com/wiki/Troubleshooting_6/" target="_blank">http://www.prestashop.com/wiki/Troubleshooting_6/</a></li>
|
||||
<li>
|
||||
{l s='Read more about CSV format at: '} <a href="http://en.wikipedia.org/wiki/Comma-separated_values" target="_blank">http://en.wikipedia.org/wiki/Comma-separated_values</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{/if}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<fieldset style="display:block;">
|
||||
|
||||
<legend>
|
||||
<img src="../img/admin/import.gif" />{l s='Fields available'}
|
||||
</legend>
|
||||
|
||||
<div id="availableFields">
|
||||
{$available_fields}
|
||||
</div>
|
||||
|
||||
<div class="clear">
|
||||
<br /><br />{l s='* Required Fields'}
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
|
||||
<div class="clear"> </div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$("select#entity").change( function() {
|
||||
|
||||
if ($("#entity > option:selected").val() == 7 || $("#entity > option:selected").val() == 8)
|
||||
{
|
||||
$("label[for=truncate],#truncate").hide();
|
||||
}
|
||||
else
|
||||
$("label[for=truncate],#truncate").show();
|
||||
|
||||
|
||||
if ($("#entity > option:selected").val() == 8)
|
||||
{
|
||||
$(".import_supply_orders_details").show();
|
||||
$('input[name=multiple_value_separator]').val('|');
|
||||
}
|
||||
else
|
||||
{
|
||||
$(".import_supply_orders_details").hide();
|
||||
$('input[name=multiple_value_separator]').val(',');
|
||||
}
|
||||
|
||||
|
||||
if ($("#entity > option:selected").val() == 1)
|
||||
{
|
||||
$("label[for=match_ref],#match_ref").show();
|
||||
}
|
||||
else
|
||||
$("label[for=match_ref],#match_ref").hide();
|
||||
|
||||
if ($("#entity > option:selected").val() == 1 || $("#entity > option:selected").val() == 0)
|
||||
{
|
||||
$(".import_products_categories").show();
|
||||
}
|
||||
else
|
||||
$(".import_products_categories").hide();
|
||||
|
||||
$("#entitie").html($("#entity > option:selected").text().toLowerCase());
|
||||
$.getJSON("ajax.php", {
|
||||
getAvailableFields:1,
|
||||
entity: $("#entity").val()
|
||||
},
|
||||
function(j) {
|
||||
var fields = "";
|
||||
$("#availableFields").empty();
|
||||
for (var i = 0; i < j.length; i++)
|
||||
fields += j[i].field;
|
||||
$("#availableFields").html(fields);
|
||||
activeClueTip();
|
||||
}
|
||||
);
|
||||
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,140 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 8971 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{extends file="helper/view/view.tpl"}
|
||||
|
||||
{block name="override_tpl"}
|
||||
<script type="text/javascript">
|
||||
var errorEmpty = "{l s='Please enter a name to save.'}"
|
||||
</script>
|
||||
<div id="container-customer">
|
||||
<h2>{l s='View your data'}</h2>
|
||||
<div>
|
||||
<b>{l s='Save and load your matching configuration'} : </b><br><br>
|
||||
<input type="text" name="newImportMatchs" id="newImportMatchs">
|
||||
<a id="saveImportMatchs" class="button" href="#">{l s='Save'}</a><br><br>
|
||||
<div id="selectDivImportMatchs" {if !$import_matchs}style="display:none"{/if}>
|
||||
<select id="valueImportMatchs">
|
||||
{foreach $import_matchs as $match}
|
||||
<option id="{$match.id_import_match}" value="{$match.match}">{$match.name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
<a class="button" id="loadImportMatchs" href="#">{l s='Load'}</a>
|
||||
<a class="button" id="deleteImportMatchs" href="#">{l s='Delete'}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3>{l s='Please set the value type of each column'}</h3>
|
||||
|
||||
<div id="error_duplicate_type" class="warning warn" style="display:none;">
|
||||
<h3>{l s='Columns cannot have the same value type'}</h3>
|
||||
</div>
|
||||
|
||||
<div id="required_column" class="warning warn" style="display:none;">
|
||||
<h3>{l s='Column'} <span id="missing_column"> </span> {l s='must be set'}</h3>
|
||||
</div>
|
||||
|
||||
<form action="{$current}&token={$token}" method="post" id="import_form" name="import_form">
|
||||
{l s='Skip'} <input type="text" size="2" name="skip" value="0" /> {l s='lines'}
|
||||
<input type="hidden" name="csv" value="{$fields_value.csv}" />
|
||||
<input type="hidden" name="convert" value="{$fields_value.convert}" />
|
||||
<input type="hidden" name="entity" value="{$fields_value.entity}" />
|
||||
<input type="hidden" name="iso_lang" value="{$fields_value.iso_lang}" />
|
||||
{if $fields_value.truncate}
|
||||
<input type="hidden" name="truncate" value="1" />
|
||||
{/if}
|
||||
{if $fields_value.match_ref}
|
||||
<input type="hidden" name="match_ref" value="1" />
|
||||
{/if}
|
||||
<input type="hidden" name="separator" value="{$fields_value.separator}">
|
||||
<input type="hidden" name="multiple_value_separator" value="{$fields_value.multiple_value_separator}">
|
||||
<script type="text/javascript">
|
||||
var current = 0;
|
||||
|
||||
function showTable(nb)
|
||||
{
|
||||
getE('btn_left').disabled = null;
|
||||
getE('btn_right').disabled = null;
|
||||
if (nb <= 0)
|
||||
{
|
||||
nb = 0;
|
||||
getE('btn_left').disabled = 'true';
|
||||
}
|
||||
if (nb >= {$nb_table} - 1)
|
||||
{
|
||||
nb = {$nb_table} - 1;
|
||||
getE('btn_right').disabled = 'true';
|
||||
}
|
||||
toggle(getE('table'+current), false);
|
||||
current = nb;
|
||||
toggle(getE('table'+current), true);
|
||||
}
|
||||
|
||||
$(function() {
|
||||
var btn_save_import = $('span[class~="process-icon-save-import"]').parent();
|
||||
var btn_submit_import = $('#import');
|
||||
|
||||
if (btn_save_import.length > 0 && btn_submit_import.length > 0)
|
||||
{
|
||||
btn_submit_import.hide();
|
||||
btn_save_import.find('span').removeClass('process-icon-save-import');
|
||||
btn_save_import.find('span').addClass('process-icon-save');
|
||||
btn_save_import.click(function() {
|
||||
btn_submit_import.before('<input type="hidden" name="'+btn_submit_import.attr("name")+'" value="1" />');
|
||||
|
||||
$('#import_form').submit();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="3" align="center">
|
||||
<input name="import" type="submit" onclick="return (validateImportation(new Array({$res})));" id="import" value="{l s='Import CSV data'}" class="button" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" align="center">
|
||||
<input id="btn_left" value="{l s='<<'}" type="button" class="button" onclick="showTable(current - 1)" />
|
||||
</td>
|
||||
<td align="left">
|
||||
{section name=nb_i start=0 loop=$nb_table step=1}
|
||||
{assign var=i value=$smarty.section.nb_i.index}
|
||||
{$data.$i}
|
||||
{/section}
|
||||
</td>
|
||||
<td valign="top" align="center">
|
||||
<input id="btn_right" value="{l s='>>'}" type="button" class="button" onclick="showTable(current + 1)" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<script type="text/javascript">showTable(current);</script>
|
||||
</form>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 8897 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{extends file="helper/view/view.tpl"}
|
||||
|
||||
{block name="override_tpl"}
|
||||
|
||||
<fieldset>
|
||||
<legend><img src="../img/t/AdminInformation.gif" alt="" />{l s='Information'}</legend>
|
||||
<p>{l s='This information must be indicated when you report a bug on our bug tracker or if you report a problem on our forum.'}</p>
|
||||
</fieldset>
|
||||
<br />
|
||||
<fieldset>
|
||||
<legend><img src="../img/t/AdminInformation.gif" alt="" /> {l s='Information about your configuration'}</legend>
|
||||
<h3>{l s='Server information'}</h3>
|
||||
<p>
|
||||
<b>{l s='Prestashop Version'}:</b> {$version.ps}
|
||||
</p>
|
||||
|
||||
{if count($uname)}
|
||||
<p>
|
||||
<b>{l s='Server information'}:</b> {$uname}
|
||||
</p>
|
||||
{/if}
|
||||
|
||||
<p>
|
||||
<b>{l s='Server software Version'}:</b> {$version.server}
|
||||
</p>
|
||||
<p>
|
||||
<b>{l s='PHP Version'}:</b> {$version.php}
|
||||
</p>
|
||||
<p>
|
||||
<b>{l s='MySQL Version'}:</b> {$version.mysql}
|
||||
</p>
|
||||
{if $apache_instaweb}
|
||||
<p style="color:red;font-weight:700">{l s='PageSpeed module for Apache installed (mod_instaweb)'}</p>
|
||||
{/if}
|
||||
|
||||
<hr />
|
||||
<h3>{l s='Store information'}</h3>
|
||||
<p>
|
||||
<b>{l s='URL of your website'}:</b> {$shop.url}
|
||||
</p>
|
||||
<p>
|
||||
<b>{l s='Theme name used'}:</b> {$shop.theme}
|
||||
</p>
|
||||
<hr />
|
||||
<h3>{l s='Mail information'}</h3>
|
||||
<p>
|
||||
<b>{l s='Mail method'}:</b>
|
||||
|
||||
{if $mail}
|
||||
{l s='You use PHP mail() function.'}</p>
|
||||
{else}
|
||||
{l s='You use your own SMTP parameters'}</p>
|
||||
<p>
|
||||
<b>{l s='SMTP server'}:</b> {$smtp.server}
|
||||
</p>
|
||||
<p>
|
||||
<b>{l s='SMTP user'}:</b>
|
||||
{if $smtp.user neq ''}
|
||||
{l s='Defined'}
|
||||
{else}
|
||||
<span style="color:red;">{l s='Not defined'}</span>
|
||||
{/if}
|
||||
</p>
|
||||
<p>
|
||||
<b>{l s='SMTP password'}:</b>
|
||||
{if $smtp.password neq ''}
|
||||
{l s='Defined'}
|
||||
{else}
|
||||
<span style="color:red;">{l s='Not defined'}</span>
|
||||
{/if}
|
||||
</p>
|
||||
<p>
|
||||
<b>{l s='Encryption'}:</b> {$smtp.encryption}
|
||||
</p>
|
||||
<p>
|
||||
<b>{l s='Port'}:</b> {$smtp.port}
|
||||
</p>
|
||||
{/if}
|
||||
<hr />
|
||||
<h3>{l s='Your information'}</h3>
|
||||
<p>
|
||||
<b>{l s='Information from you'}:</b> {$user_agent}
|
||||
</p>
|
||||
</fieldset>
|
||||
<br />
|
||||
<fieldset id="checkConfiguration">
|
||||
<legend><img src="../img/t/AdminInformation.gif" alt="" /> {l s='Check your configuration'}</legend>
|
||||
<p>
|
||||
<b>{l s='Required parameters'}:</b>
|
||||
{if !$failRequired}
|
||||
<span style="color:green;font-weight:bold;">OK</span>
|
||||
</p>
|
||||
{else}
|
||||
<span style="color:red">{l s='Please consult the following error(s)'}</span>
|
||||
</p>
|
||||
<ul>
|
||||
{foreach from=$testsRequired item='value' key='key'}
|
||||
{if $value eq 'fail'}
|
||||
<li>{$testsErrors[$key]}</li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
|
||||
<p>
|
||||
<b>{l s='Optional parameters'}:</b>
|
||||
{if !$failOptional}
|
||||
<span style="color:green;font-weight:bold;">OK</span>
|
||||
</p>
|
||||
{else}
|
||||
<span style="color:red">{l s='Please consult the following error(s)'}</span>
|
||||
</p>
|
||||
<ul>
|
||||
{foreach from=$testsOptional item='value' key='key'}
|
||||
{if $value eq 'fail'}
|
||||
<li>{$testsErrors[$key]}</li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
|
||||
</fieldset>
|
||||
|
||||
{/block}
|
||||
@@ -0,0 +1,85 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 8971 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{extends file="helper/form/form.tpl"}
|
||||
|
||||
{block name=script}
|
||||
|
||||
$(document).ready(function() {
|
||||
var btn_save_date = $('span[class~="process-icon-save-date"]').parent();
|
||||
var btn_submit_date = $('#submitPrint');
|
||||
|
||||
if (btn_save_date.length > 0 && btn_submit_date.length > 0)
|
||||
{
|
||||
btn_submit_date.hide();
|
||||
btn_save_date.find('span').removeClass('process-icon-save-date');
|
||||
btn_save_date.find('span').addClass('process-icon-save-calendar');
|
||||
btn_save_date.click(function() {
|
||||
btn_submit_date.before('<input type="hidden" name="'+btn_submit_date.attr("name")+'" value="1" />');
|
||||
|
||||
$('#invoice_date_form').submit();
|
||||
});
|
||||
}
|
||||
|
||||
var btn_save_status = $('span[class~="process-icon-save-status"]').parent();
|
||||
var btn_submit_status = $('#submitPrint2');
|
||||
|
||||
if (btn_save_status.length > 0 && btn_submit_status.length > 0)
|
||||
{
|
||||
btn_submit_status.hide();
|
||||
btn_save_status.find('span').removeClass('process-icon-save-status');
|
||||
btn_save_status.find('span').addClass('process-icon-save');
|
||||
btn_save_status.click(function() {
|
||||
btn_submit_status.before('<input type="hidden" name="'+btn_submit_status.attr("name")+'" value="1" />');
|
||||
|
||||
$('#invoice_status_form').submit();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
{/block}
|
||||
|
||||
{block name="start_field_block"}
|
||||
<div class="margin-form">
|
||||
{if $input.type == 'checkboxStatuses'}
|
||||
{foreach $input.values.query as $value}
|
||||
{assign var=id_checkbox value=$input.name|cat:'_'|cat:intval($value[$input.values.id])}
|
||||
<input type="checkbox"
|
||||
name="{$input.name}[]"
|
||||
id="{$id_checkbox}"
|
||||
value="{$value[$input.values.id]|intval}"
|
||||
{if isset($fields_value[$id_checkbox]) && $fields_value[$id_checkbox]}checked="checked"{/if} />
|
||||
<label for="{$id_checkbox}"
|
||||
style="float:none;{if !(isset($statusStats[$value['id_order_state']]) && $statusStats[$value['id_order_state']])}font-weight:normal;{/if}padding:0;text-align:left;width:100%;color:#000">
|
||||
<img src="../img/admin/charged_{if $value['invoice']}ok{else}ko{/if}.gif" alt="" />
|
||||
{$value[$input.values.name]}
|
||||
({if isset($statusStats[$value['id_order_state']]) && $statusStats[$value['id_order_state']]}{$statusStats[$value['id_order_state']]}{else}0{/if})
|
||||
</label><br />
|
||||
{/foreach}
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block name="after"}<div style="clear:both"> </div>{/block}
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 8971 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{extends file="helper/form/form.tpl"}
|
||||
|
||||
{block name="start_field_block"}
|
||||
<div class="margin-form">
|
||||
{if $input.type == 'special'}
|
||||
<p id="{$input.name}"><img src="../img/admin/{$input.img}" alt="" /> {$input.text}</p>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block name=script}
|
||||
var langPackOk = "<img src=\"{$smarty.const._PS_IMG_}admin/information.png\" alt=\"\" /> {l s='A language pack is available for this ISO (name is'}";
|
||||
var langPackVersion = "{l s='The compatible Prestashop version for this language and your system is: '}";
|
||||
var langPackInfo = "{l s='After creating the language, you can import the content of the language pack, which you can download above under "Tools - Translations"'}";
|
||||
var noLangPack = "<img src=\"{$smarty.const._PS_IMG_}admin/information.png\" alt=\"\" /> {l s='No language pack available on prestashop.com for this ISO code'}";
|
||||
var download = "{l s='Download'}";
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#iso_code').keyup(function(e) {
|
||||
e.preventDefault();
|
||||
checkLangPack("{$token}");
|
||||
});
|
||||
});
|
||||
|
||||
{/block}
|
||||
|
||||
{block name="other_fieldsets"}
|
||||
|
||||
{if isset($fields['new'])}
|
||||
<br /><br />
|
||||
<fieldset style="width:572px;">
|
||||
{foreach $fields['new'] as $key => $field}
|
||||
{if $key == 'legend'}
|
||||
<legend>
|
||||
{if isset($field.image)}<img src="{$field.image}" alt="{$field.title}" />{/if}
|
||||
{$field.title}
|
||||
</legend>
|
||||
<p>{l s='This language is NOT complete and cannot be used in the Front or Back Office because some files are missing.'}</p>
|
||||
<br />
|
||||
{elseif $key == 'list_files'}
|
||||
{foreach $field as $list}
|
||||
<label>{$list.label}</label>
|
||||
<div class="margin-form" style="margin-top:4px;">
|
||||
{foreach $list.files as $key => $file}
|
||||
{if !file_exists($key)}
|
||||
<font color="red">
|
||||
{/if}
|
||||
{$key}
|
||||
{if !file_exists($key)}
|
||||
</font>
|
||||
{/if}
|
||||
<br />
|
||||
{/foreach}
|
||||
</div>
|
||||
<br style="clear:both;" />
|
||||
{/foreach}
|
||||
{/if}
|
||||
{/foreach}
|
||||
<br />
|
||||
<div class="small">{l s='Missing files are marked in red'}</div>
|
||||
</fieldset>
|
||||
{/if}
|
||||
|
||||
{/block}
|
||||
@@ -0,0 +1,104 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 8858 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<script type="text/javascript">
|
||||
var there_are = '{l s='There are'}';
|
||||
var there_is = '{l s='There is'}';
|
||||
var label_errors = '{l s='errors'}';
|
||||
var label_error = '{l s='error'}';
|
||||
</script>
|
||||
|
||||
<div id="container">
|
||||
<div id="error" style="{if !isset($errors)}display:none;{/if}">
|
||||
{if isset($errors)}
|
||||
<h3>{if $nbErrors > 1}{l s='There are'}{else}{l s='There is'}{/if} {$nbErrors}{if $nbErrors > 1} {l s='errors'}{else} {l s='error'}{/if}</h3>
|
||||
<ol style="margin: 0 0 0 20px;">
|
||||
{foreach from=$errors item="error"}
|
||||
<li>{$error}</li>
|
||||
{/foreach}
|
||||
</ol>
|
||||
{/if}
|
||||
</div>
|
||||
<br />
|
||||
{if isset($warningSslMessage)}
|
||||
<div class="warn">
|
||||
{$warningSslMessage}
|
||||
</div>
|
||||
{/if}
|
||||
<div id="login">
|
||||
{if !isset($wrong_folder_name)}
|
||||
<h1>{$shop_name}</h1>
|
||||
<form action="" method="post" id="login_form" onsubmit="doAjaxLogin();return false;">
|
||||
<label for="email">{l s='E-mail address:'}</label><br />
|
||||
<input type="text" id="email" name="email" class="input" value="{if isset($email)}{$email}{/if}" />
|
||||
<div style="margin: 1.8em 0 0 0;">
|
||||
<label for="passwd">{l s='Password:'}</label><br />
|
||||
<input id="passwd" type="password" name="passwd" class="input" value="{if isset($password)}{$password}{/if}"/>
|
||||
</div>
|
||||
<div>
|
||||
<div id="submit">
|
||||
<input type="submit" name="submitLogin" value="{l s='Log in'}" class="button" style="float:left"/>
|
||||
<span style="float:left;width:30px">
|
||||
<img id="ajax-loader" src="../img/loader.gif" style="float:left;margin:2px 0 0 5px;display:none">
|
||||
</span>
|
||||
</div>
|
||||
<div id="lost">
|
||||
<a href="#" onclick="displayForgotPassword();return false;">{l s='Lost password?'}</a>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
//TODO FOCUS ON EMAIL
|
||||
</script>
|
||||
</form>
|
||||
{else}
|
||||
<h1>{$shop_name}</h1>
|
||||
<div style="margin:30px;">
|
||||
<p><span>{l s='For security reasons, you cannot connect to the Back Office until after you have:'}<br /><br />
|
||||
<ul>
|
||||
<li>{l s='delete the /install folder'}</li>
|
||||
<li>{l s='delete the /install-new folder'}</li>
|
||||
<li>{l s='renamed the /admin folder (eg.) /admin'}{$randomNb}</li>
|
||||
</ul>
|
||||
<br />{l s='Please then access this page by the new url (eg.) http://www.domain.tld/admin'}{$randomNb}</span></p>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div id="forgot_password" style="display:none">
|
||||
<h1>{$shop_name}</h1>
|
||||
<form action="" method="post" onsubmit="doAjaxForgot();return false;">
|
||||
<div class="page-title center">{l s='Forgot your password?'}</div><br />
|
||||
<span style="font-weight: bold;">{l s='Please, enter your e-mail address the one you wrote during your registration in order to receive your access codes by e-mail'}</span><br />
|
||||
<input style="margin-top:20px" type="text" name="email_forgot" id="email_forgot" class="input" />
|
||||
<div id="submit">
|
||||
<input type="submit" name="Submit" value="{l s='Send'}" class="button" style="float:left" />
|
||||
<span style="float:left;width:30px">
|
||||
<img id="ajax-loader" src="../img/loader.gif" style="float:left;margin:2px 0 0 5px;display:none">
|
||||
</span>
|
||||
</div>
|
||||
<div id="lost"><a href="#" onclick="displayLogin();return false;">{l s='Back to login'}</a></div>
|
||||
</form>
|
||||
</div>
|
||||
<h2><a href="http://www.prestashop.com">© Copyright by PrestaShop. all rights reserved.</a></h2>
|
||||
</div>
|
||||
@@ -0,0 +1,42 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 9639 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{extends file="helper/list/list_header.tpl"}
|
||||
|
||||
{block name="override_header"}
|
||||
|
||||
<fieldset>
|
||||
<legend>{l s='Severity levels'}</legend>
|
||||
<p>{l s='Meaning of severity levels:'}</p>
|
||||
<ol style="margin-left: 30px; list-style-type: decimal;">
|
||||
<li style="color: green;">{l s='Informative only'}</li>
|
||||
<li style="color: orange;">{l s='Warning'}</li>
|
||||
<li style="color: orange;">{l s='Error'}</li>
|
||||
<li style="color: red;">{l s='Major issue (crash)'}</li>
|
||||
</ol>
|
||||
</fieldset><br />
|
||||
|
||||
{/block}
|
||||
@@ -0,0 +1,108 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 9646 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{extends file="helper/view/view.tpl"}
|
||||
|
||||
{block name="override_tpl"}
|
||||
|
||||
<h2>{$manufacturer->name}</h2>
|
||||
|
||||
<h3>{l s='Total addresses:'} {count($addresses)}</h3>
|
||||
<hr />
|
||||
|
||||
{if !count($addresses)}
|
||||
{l s='No address for this manufacturer'}
|
||||
{else}
|
||||
{foreach $addresses AS $addresse}
|
||||
<table border="0" cellpadding="0" cellspacing="0" class="table" style="width: 600px;">
|
||||
<tr>
|
||||
<th><strong>{$addresse.firstname} {$addresse.lastname}</strong></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="padding:5px; float:left; width:350px;">
|
||||
{$addresse.address1}<br />
|
||||
{if $addresse.address2}{$addresse.address2}<br />{/if}
|
||||
{$addresse.postcode} {$addresse.city}<br />
|
||||
{if $addresse.state}{$addresse.state}<br />{/if}
|
||||
<b>{$addresse.country}</b><br />
|
||||
</div>
|
||||
<div style="padding:5px; float:left;">
|
||||
{if $addresse.phone}{$addresse.phone}<br />{/if}
|
||||
{if $addresse.phone_mobile}{$addresse.phone_mobile}<br />{/if}
|
||||
</div>
|
||||
{if $addresse.other}<div style="padding:5px; clear:both;"><br /><i>{$addresse.other}</i></div>{/if}
|
||||
</td>
|
||||
</tr>
|
||||
</table><br />
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
<h3>{l s='Total products:'} {count($products)}</h3>
|
||||
{foreach $products AS $product}
|
||||
<hr />
|
||||
{if !$product->hasAttributes()}
|
||||
<div style="float:right;">
|
||||
<a href="?tab=AdminProducts&id_product={$product->id}&updateproduct&token={getAdminToken tab='AdminProducts'}" class="button">{l s='Edit'}</a>
|
||||
<a href="?tab=AdminProducts&id_product={$product->id}&deleteproduct&token={getAdminToken tab='AdminProducts'}" class="button" onclick="return confirm('{l s='Delete item #'}{$product->id} ?');">{l s='Delete'}</a>
|
||||
</div>
|
||||
<br/><br/>
|
||||
<table border="0" cellpadding="0" cellspacing="0" class="table" style="width:100%;">
|
||||
<tr>
|
||||
<th height="39">{$product->name}</th>
|
||||
{if !empty($product->reference)}<th width="150">{l s='Ref:'} {$product->reference}</th>{/if}
|
||||
{if !empty($product->ean13)}<th width="120">{l s='EAN13:'} {$product->ean13}</th>{/if}
|
||||
{if !empty($product->upc)}<th width="120">{l s='UPC:'} {$product->upc}</th>{/if}
|
||||
{if $stock_management}<th class="right" width="50">{l s='Qty:'} {$product->quantity}</th>{/if}
|
||||
</tr>
|
||||
</table>
|
||||
{else}
|
||||
<div style="float:right;">
|
||||
<a href="?tab=AdminProducts&id_product={$product->id}&updateproduct&token={getAdminToken tab='AdminProducts'}" class="button">{l s='Edit'}</a>
|
||||
<a href="?tab=AdminProducts&id_product={$product->id}&deleteproduct&token={getAdminToken tab='AdminProducts'}" class="button" onclick="return confirm('{l s='Delete item #'}{$product->id} ?');">{l s='Delete'}</a>
|
||||
</div>
|
||||
<h3><a href="?tab=AdminProducts&id_product={$product->id}&updateproduct&token={getAdminToken tab='AdminProducts'}">{$product->name}</a></h3>
|
||||
<table border="0" cellpadding="0" cellspacing="0" class="table" style="width:100%;">
|
||||
<tr>
|
||||
<th height="39">{l s='Attribute name'}</th>
|
||||
<th width="80">{l s='Reference'}</th>
|
||||
<th width="80">{l s='EAN13'}</th>
|
||||
<th width="80">{l s='UPC'}</th>
|
||||
{if $stock_management && $shopContext != Shop::CONTEXT_ALL}<th class="right" width="150">{l s='Available Quantity'}</th>{/if}
|
||||
</tr>
|
||||
{foreach $product->combinaison AS $id_product_attribute => $product_attribute}
|
||||
<tr {if $id_product_attribute %2}class="alt_row"{/if} >
|
||||
<td>{$product_attribute.attributes}</td>
|
||||
<td>{$product_attribute.reference}</td>
|
||||
<td>{$product_attribute.ean13}</td>
|
||||
<td>{$product_attribute.upc}</td>
|
||||
{if $stock_management && $shopContext != Shop::CONTEXT_ALL}<td class="right">{$product_attribute.quantity}</td>{/if}
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/block}
|
||||
@@ -0,0 +1,33 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 9771 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
|
||||
{if isset($module_content)}
|
||||
{$module_content}
|
||||
{else}
|
||||
{include file='controllers/modules/js.tpl'}
|
||||
{include file='controllers/modules/page.tpl'}
|
||||
{/if}
|
||||
@@ -0,0 +1,79 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 9771 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<!--start filter module-->
|
||||
<style>.ac_results { border:1px solid #C2C4D9; }</style>
|
||||
<div class="filter-module">
|
||||
<form id="filternameForm" method="post">
|
||||
<input type="text" value="" name="filtername" autocomplete="off" class="ac_input">
|
||||
<input type="submit" class="button" value="{l s='Search'}">
|
||||
</form>
|
||||
|
||||
<form method="post">
|
||||
|
||||
<div class="select-filter">
|
||||
<label class="search-filter">{l s='Sort by'}:</label>
|
||||
|
||||
<select name="module_type" id="module_type_filter">
|
||||
<option value="allModules" {if $showTypeModules eq 'allModules'}selected="selected"{/if}>{l s='All Modules'}</option>
|
||||
<option value="nativeModules" {if $showTypeModules eq 'nativeModules'}selected="selected"{/if}>{l s='Native Modules'}</option>
|
||||
<option value="partnerModules" {if $showTypeModules eq 'partnerModules'}selected="selected"{/if}>{l s='Partners Modules'}</option>
|
||||
<optgroup label="{l s='Authors'}">
|
||||
{foreach from=$list_modules_authors key=module_author item=status}
|
||||
<option value="authorModules[{$module_author}]" {if $status eq "selected"}selected{/if}>{$module_author|truncate:20:'...'}</option>
|
||||
{/foreach}
|
||||
</optgroup>
|
||||
<option value="otherModules" {if $showTypeModules eq 'otherModules'}selected="selected"{/if}>{l s='Others Modules'}</option>
|
||||
</select>
|
||||
|
||||
<select name="module_install" id="module_install_filter">
|
||||
<option value="installedUninstalled" {if $showInstalledModules eq 'installedUninstalled'}selected="selected"{/if}>{l s='Installed & Uninstalled'}</option>
|
||||
<option value="installed" {if $showInstalledModules eq 'installed'}selected="selected"{/if}>{l s='Installed Modules'}</option>
|
||||
<option value="uninstalled" {if $showInstalledModules eq 'uninstalled'}selected="selected"{/if}>{l s='Uninstalled Modules'}</option>
|
||||
</select>
|
||||
|
||||
<select name="module_status" id="module_status_filter">
|
||||
<option value="enabledDisabled" {if $showEnabledModules eq 'enabledDisabled'}selected="selected"{/if}>{l s='Enabled & Disabled'}</option>
|
||||
<option value="enabled" {if $showEnabledModules eq 'enabled'}selected="selected"{/if}>{l s='Enabled Modules'}</option>
|
||||
<option value="disabled" {if $showEnabledModules eq 'disabled'}selected="selected"{/if}>{l s='Disabled Modules'}</option>
|
||||
</select>
|
||||
|
||||
<select name="country_module_value" id="country_module_value_filter">
|
||||
<option value="0" >{l s='All countries'}</option>
|
||||
<option value="1" {if $showCountryModules eq 1}selected="selected"{/if}>{l s='Current country:'} {$nameCountryDefault}</option>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="button-filter">
|
||||
<input type="submit" value="{l s='Reset'}" name="resetFilterModules" class="button" />
|
||||
<input type="submit" value="{l s='Filter'}" name="filterModules" class="button" />
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<!--end filter module-->
|
||||
@@ -0,0 +1,87 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 9771 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<div class="toolbar-placeholder">
|
||||
<div class="toolbarBox toolbarHead">
|
||||
|
||||
<ul class="cc_button">
|
||||
<li>
|
||||
<a id="desc-module-new" class="toolbar_btn" href="#top_container" onclick="$('#module_install').slideToggle();" title="Add new">
|
||||
<span class="process-icon-new-module" ></span>
|
||||
<div>{l s='Add new module'}</div>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a id="desc-module-addon-new" class="toolbar_btn" href="{$addonsUrl}" title="Add new">
|
||||
<span class="process-icon-new-module-addon" ></span>
|
||||
<div>{l s='Add new via Addons'}</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="pageTitle">
|
||||
<h3><span id="current_obj" style="font-weight: normal;"><span class="breadcrumb item-0">Module</span> : <span class="breadcrumb item-1">{l s='List of modules'}</span></span></h3>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="module_install" style="width:500px;margin-top:5px;{if !isset($smarty.post.downloadflag)}display: none;{/if}">
|
||||
<fieldset>
|
||||
<legend><img src="../img/admin/add.gif" alt="{l s='Add a new module'}" class="middle" /> {l s='Add a new module'}</legend>
|
||||
<p>{'The module must be either a zip file or a tarball.'}</p>
|
||||
<div style="float:left;margin-right:50px">
|
||||
<form action="{$currentIndex}&token={$token}" method="post" enctype="multipart/form-data">
|
||||
<label style="width: 100px">{l s='Module file'}</label>
|
||||
<div class="margin-form" style="padding-left: 140px">
|
||||
<input type="file" name="file" />
|
||||
<p>{l s='Upload the module from your computer.'}</p>
|
||||
</div>
|
||||
<div class="margin-form" style="padding-left: 140px">
|
||||
<input type="submit" name="download" value="{l s='Upload this module'}" class="button" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</fieldset>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
{if !isset($logged_on_addons)}
|
||||
<!--start addons login-->
|
||||
<div class="filter-module" id="addons_login_div">
|
||||
<p>{l s='You have a PrestaShop Addons account ?'}</p>
|
||||
<form id="addons_login_form" method="post">
|
||||
<label>{l s='Login Addons'} :</label> <input type="text" value="" id="username_addons" autocomplete="off" class="ac_input">
|
||||
<label>{l s= 'Password Addons'} :</label> <input type="password" value="" id="password_addons" autocomplete="off" class="ac_input">
|
||||
<input type="submit" class="button" id="addons_login_button" value="{l s='Log in'}">
|
||||
<span id="addons_loading" style="color:red"></span>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<!--end addons login-->
|
||||
{/if}
|
||||
|
||||
@@ -0,0 +1,282 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 9771 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
|
||||
<link href="{$smarty.const._PS_CSS_DIR_}jquery.fancybox-1.3.4.css" rel="stylesheet" type="text/css" media="screen" />
|
||||
<script type="text/javascript">{$autocompleteList}</script>
|
||||
<script type="text/javascript" src="{$smarty.const._PS_JS_DIR_}jquery/plugins/autocomplete/jquery.autocomplete.js"></script>
|
||||
<script type="text/javascript" src="{$smarty.const._PS_JS_DIR_}jquery/plugins/fancybox/jquery.fancybox.js"></script>
|
||||
<script type="text/javascript">
|
||||
var token = '{$token}';
|
||||
var currentIndex = '{$currentIndex}';
|
||||
var dirNameCurrentIndex = '{$dirNameCurrentIndex}';
|
||||
var ajaxCurrentIndex = '{$ajaxCurrentIndex}';
|
||||
var by = '{l s='by'}';
|
||||
var errorLogin = '{l s='Could not login to Addons'}';
|
||||
{if isset($smarty.get.anchor)}var anchor = '{$smarty.get.anchor|htmlentities|replace:'(':''|replace:')':''|replace:'{':''|replace:'}':''}';{else}var anchor = '';{/if}
|
||||
|
||||
|
||||
|
||||
|
||||
{literal}
|
||||
|
||||
function getPrestaStore(){if(getE("prestastore").style.display!='block')return;$.post(dirNameCurrentIndex+"/ajax.php",{page:"prestastore"},function(a){getE("prestastore-content").innerHTML=a;})}
|
||||
function truncate_author(author){return ((author.length > 20) ? author.substring(0, 20)+"..." : author);}
|
||||
function modules_management(action)
|
||||
{
|
||||
var modules = document.getElementsByName('modules');
|
||||
var module_list = '';
|
||||
for (var i = 0; i < modules.length; i++)
|
||||
{
|
||||
if (modules[i].checked == true)
|
||||
{
|
||||
rel = modules[i].getAttribute('rel');
|
||||
if (rel != "false" && action == "uninstall")
|
||||
{
|
||||
if (!confirm(rel))
|
||||
return false;
|
||||
}
|
||||
module_list += '|'+modules[i].value;
|
||||
}
|
||||
}
|
||||
document.location.href=currentIndex+'&token='+token+'&'+action+'='+module_list.substring(1, module_list.length);
|
||||
}
|
||||
|
||||
|
||||
$('document').ready( function() {
|
||||
|
||||
|
||||
|
||||
// ScrollTo
|
||||
if (anchor != '')
|
||||
$.scrollTo('#'+anchor, 1200, {offset: -100});
|
||||
|
||||
|
||||
|
||||
// AutoComplete Search
|
||||
$('input[name="filtername"]').autocomplete(moduleList, {
|
||||
minChars: 0,
|
||||
width: 310,
|
||||
matchContains: true,
|
||||
highlightItem: true,
|
||||
formatItem: function(row, i, max, term) {
|
||||
var image = '../modules/'+row.name+'/logo.gif';
|
||||
if (row.image != '')
|
||||
image = row.image;
|
||||
return '<img src="'+image+'" style="float:left;margin:5px;width:16px;height:16px"><strong>'+row.displayName+'</strong>'+((row.author != '') ? ' ' + by + ' ' + truncate_author(row.author) : '') + '<br /><span style="font-size: 80%;">'+ row.desc +'</span><br/><div style="height:15px;padding-top:5px">'+ row.option +'</div>';
|
||||
},
|
||||
formatResult: function(row) {
|
||||
return row.displayName;
|
||||
}
|
||||
});
|
||||
$('input[name="filtername"]').result(function(event, data, formatted) {
|
||||
$('#filternameForm').submit();
|
||||
});
|
||||
|
||||
|
||||
|
||||
// Method to check / uncheck all modules checkbox
|
||||
$('#checkme').click(function()
|
||||
{
|
||||
if ($(this).attr("rel") == 'false')
|
||||
{
|
||||
$(this).attr("checked", "checked");
|
||||
$(this).attr("rel", "true");
|
||||
$("input[name=modules]").attr("checked", "checked");
|
||||
}
|
||||
else
|
||||
{
|
||||
$(this).attr("checked", "");
|
||||
$(this).attr("rel", "false");
|
||||
$("input[name=modules]").attr("checked", "");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
// Method to reload filter in ajax
|
||||
$('.categoryModuleFilterLink').click(function()
|
||||
{
|
||||
$('.categoryModuleFilterLink').css('background-color', 'white');
|
||||
$(this).css('background-color', '#EBEDF4');
|
||||
var ajaxReloadCurrentIndex = $(this).find('a').attr('href').replace('index.php', 'ajax-tab.php');
|
||||
try
|
||||
{
|
||||
resAjax = $.ajax({
|
||||
type:"POST",
|
||||
url : ajaxReloadCurrentIndex,
|
||||
async: true,
|
||||
data : {
|
||||
ajax : "1",
|
||||
token : token,
|
||||
controller : "AdminModules",
|
||||
action : "reloadModulesList",
|
||||
},
|
||||
beforeSend: function(xhr)
|
||||
{
|
||||
$('#moduleContainer').html('<img src="../img/loader.gif" border="0">');
|
||||
},
|
||||
success : function(data)
|
||||
{
|
||||
$('#moduleContainer').html(data);
|
||||
},
|
||||
error: function(res,textStatus,jqXHR)
|
||||
{
|
||||
//jAlert("TECHNICAL ERROR"+res);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch(e){}
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
|
||||
// Method to get modules_list.xml from prestashop.com and default_country_modules_list.xml from addons.prestashop.com
|
||||
try
|
||||
{
|
||||
resAjax = $.ajax({
|
||||
type:"POST",
|
||||
url : ajaxCurrentIndex,
|
||||
async: true,
|
||||
data : {
|
||||
ajaxMode : "1",
|
||||
ajax : "1",
|
||||
token : token,
|
||||
controller : "AdminModules",
|
||||
action : "refreshModuleList"
|
||||
},
|
||||
success : function(res,textStatus,jqXHR)
|
||||
{
|
||||
// res.status = cache or refresh
|
||||
},
|
||||
error: function(res,textStatus,jqXHR)
|
||||
{
|
||||
//jAlert("TECHNICAL ERROR"+res);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch(e) { }
|
||||
|
||||
|
||||
|
||||
// Method to log on PrestaShop Addons WebServices
|
||||
$('#addons_login_button').click(function()
|
||||
{
|
||||
var username_addons = $("#username_addons").val();
|
||||
var password_addons = $("#password_addons").val();
|
||||
try
|
||||
{
|
||||
resAjax = $.ajax({
|
||||
type:"POST",
|
||||
url : ajaxCurrentIndex,
|
||||
async: true,
|
||||
data : {
|
||||
ajax : "1",
|
||||
token : token,
|
||||
controller : "AdminModules",
|
||||
action : "logOnAddonsWebservices",
|
||||
username_addons : username_addons,
|
||||
password_addons : password_addons
|
||||
},
|
||||
beforeSend: function(xhr)
|
||||
{
|
||||
$('#addons_loading').html('<img src="../img/loader.gif" border="0">');
|
||||
},
|
||||
success : function(data)
|
||||
{
|
||||
// res.status = cache or refresh
|
||||
if (data == 'OK')
|
||||
{
|
||||
$('#addons_loading').html('');
|
||||
$('#addons_login_div').fadeOut();
|
||||
window.location.href = window.location.href;
|
||||
}
|
||||
else
|
||||
$('#addons_loading').html(errorLogin);
|
||||
},
|
||||
error: function(res,textStatus,jqXHR)
|
||||
{
|
||||
//jAlert("TECHNICAL ERROR"+res);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch(e){}
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
|
||||
// Method to set filter on modules
|
||||
function setFilter()
|
||||
{
|
||||
var module_type = $("#module_type_filter").val();
|
||||
var module_install = $("#module_install_filter").val();
|
||||
var module_status = $("#module_status_filter").val();
|
||||
var country_module_value = $("#country_module_value_filter").val();
|
||||
try
|
||||
{
|
||||
resAjax = $.ajax({
|
||||
type:"POST",
|
||||
url : ajaxCurrentIndex,
|
||||
async: true,
|
||||
data : {
|
||||
ajax : "1",
|
||||
token : token,
|
||||
controller : "AdminModules",
|
||||
action : "setFilter",
|
||||
module_type : module_type,
|
||||
module_install : module_install,
|
||||
module_status : module_status,
|
||||
country_module_value : country_module_value,
|
||||
filterModules : 'Filter'
|
||||
},
|
||||
success : function(data)
|
||||
{
|
||||
// res.status = cache or refresh
|
||||
if (data == 'OK')
|
||||
window.location.href = window.location.href;
|
||||
},
|
||||
error: function(res,textStatus,jqXHR)
|
||||
{
|
||||
//jAlert("TECHNICAL ERROR"+res);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch(e){}
|
||||
return false;
|
||||
}
|
||||
$('#module_type_filter').change(function() { setFilter(); });
|
||||
$('#module_install_filter').change(function() { setFilter(); });
|
||||
$('#module_status_filter').change(function() { setFilter(); });
|
||||
$('#country_module_value_filter').change(function() { setFilter(); });
|
||||
|
||||
|
||||
|
||||
});
|
||||
{/literal}
|
||||
</script>
|
||||
@@ -0,0 +1,85 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 9771 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<table cellspacing="0" cellpadding="0" style="width: 100%; margin-bottom:10px;" class="table" id="">
|
||||
<col width="20px">
|
||||
<col width="40px">
|
||||
<col>
|
||||
<col width="150px">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr class="nodrag nodrop">
|
||||
<th class="center">
|
||||
<input type="checkbox" rel="false" class="noborder" id="checkme"><br>
|
||||
</th>
|
||||
<th class="center"></th>
|
||||
<th>{l s='Module name'}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tbody>
|
||||
{foreach from=$modules item=module}
|
||||
<tr>
|
||||
<td><input type="checkbox" name="modules" value="{$module->name}" {if !isset($module->confirmUninstall) OR empty($module->confirmUninstall)}rel="false"{else}rel="{$module->confirmUninstall|addslashes}"{/if} class="noborder"></td>
|
||||
<td><img class="imgm" alt="" src="{if isset($module->image)}{$module->image}{else}../modules/{$module->name}/{$module->logo}{/if}"></td>
|
||||
<td>
|
||||
<div class="moduleDesc" id="anchor{$module->name|ucfirst}">
|
||||
<h3>{$module->displayName}{if isset($module->id) && $module->id gt 0}<span class="setup{if isset($module->active) && $module->active eq 0} off{/if}">{l s='Installed'}</span>{else}<span class="setup non-install">{l s='Not installed'}</span>{/if}</h3>
|
||||
<div class="metadata">
|
||||
{if isset($module->author) && !empty($module->author)}
|
||||
<dl class="">
|
||||
<dt>{l s='Developed by'} :</dt>
|
||||
<dd>{$module->author|truncate:20:'...'}</dd>|
|
||||
</dl>
|
||||
{/if}
|
||||
<dl class="">
|
||||
<dt>{l s='Version'} :</dt>
|
||||
<dd>{$module->version} {if isset($module->version_addons)}({l s='Update'} {$module->version_addons} {l s='available on PrestaShop Addons'}){/if}</dd>|
|
||||
</dl>
|
||||
<dl class="">
|
||||
<dt>{l s='Category'} :</dt>
|
||||
<dd>{$module->categoryName}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<p class="desc">{l s='Description'} : {$module->description}</p>
|
||||
{if isset($module->message)}<div class="conf">{$module->message}</div>{/if}
|
||||
<div class="row-actions-module">
|
||||
{if !isset($module->not_on_disk)}{$module->optionsHtml}{else} {/if}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td><a {if isset($module->id) && $module->id gt 0 && !empty($module->options.uninstall_onclick)}onclick="{$module->options.uninstall_onclick}"{/if} href="{if isset($module->id) && $module->id gt 0}{$module->options.uninstall_url}{else}{$module->options.install_url}{/if}" class="button installed"><span>{if isset($module->id) && $module->id gt 0}{l s='Uninstall'}{else}{l s='Install'}{/if}</span></a></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{if count($modules)}
|
||||
<div style="margin-top: 12px;">
|
||||
<input type="button" class="button big" value="{l s='Install the selection'}" onclick="modules_management('install')"/>
|
||||
<input type="button" class="button big" value="{l s='Uninstall the selection'}" onclick="modules_management('uninstall')" />
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 9771 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<div id="productBox">
|
||||
|
||||
{include file='controllers/modules/header.tpl'}
|
||||
{include file='controllers/modules/filters.tpl'}
|
||||
|
||||
<div id="container">
|
||||
<!--start sidebar module-->
|
||||
<div class="sidebar">
|
||||
<div class="categorieTitle">
|
||||
<h3>{l s='Categories'}</h3>
|
||||
<div class="subHeadline">{$nb_modules}</div>
|
||||
<ul class="categorieList">
|
||||
{foreach from=$list_modules_categories item=module_category key=module_category_key}
|
||||
<li {if isset($categoryFiltered[$module_category_key])}style="background-color:#EBEDF4"{/if} class="categoryModuleFilterLink">
|
||||
<div class="categorieWidth"><a href="{$currentIndex}&token={$token}&{if isset($categoryFiltered[$module_category_key])}un{/if}filterCategory={$module_category_key}"><span>{$module_category.name}</span></a></div>
|
||||
<div class="count">{$module_category.nb}</div>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="moduleContainer">
|
||||
{include file='controllers/modules/list.tpl'}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,113 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<div class="toolbarBox">
|
||||
{if $show_toolbar}
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn}
|
||||
<div class="pageTitle">
|
||||
<h3>{block name=pageTitle}
|
||||
<span id="current_obj" style="font-weight: normal;">{$title|default:' '}</span>
|
||||
{/block}</h3>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<form action="{$url_submit}" id={$table}_form method="post">
|
||||
{if $display_key}
|
||||
<input type="hidden" name="show_modules" value="{$display_key}" />
|
||||
{/if}
|
||||
<fieldset>
|
||||
<legend><img src="../img/t/AdminModulesPositions.gif" />{l s='Transplant a module'}</legend>
|
||||
<label>{l s='Module'} :</label>
|
||||
<div class="margin-form">
|
||||
<select name="id_module" {if $edit_graft} disabled="disabled"{/if}>
|
||||
{foreach $modules as $module}
|
||||
<option value="{$module->id}" {if $id_module == $module->id || (!$id_module && $show_modules == $module->id)}selected="selected"{/if}>{$module->displayName|stripslashes}</option>
|
||||
{/foreach}
|
||||
</select><sup> *</sup>
|
||||
</div>
|
||||
<label>{l s='Hook into'} :</label>
|
||||
<div class="margin-form">
|
||||
<select name="id_hook" {if $edit_graft} disabled="disabled"{/if}>
|
||||
{foreach $hooks as $hook}
|
||||
<option value="{$hook['id_hook']}" {if $id_hook == $hook['id_hook']} selected="selected"{/if}>{$hook['title']}</option>
|
||||
{/foreach}
|
||||
</select><sup> *</sup>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA
|
||||
function position_exception_add(shopID)
|
||||
{
|
||||
var listValue = $('#em_list_'+shopID).val();
|
||||
var inputValue = $('#em_text_'+shopID).val();
|
||||
var r = new RegExp('(^|,) *'+listValue+' *(,|$)');
|
||||
if (!r.test(inputValue))
|
||||
$('#em_text_'+shopID).val(inputValue + ((inputValue.trim()) ? ', ' : '') + listValue);
|
||||
}
|
||||
|
||||
function position_exception_remove(shopID)
|
||||
{
|
||||
var listValue = $('#em_list_'+shopID).val();
|
||||
var inputValue = $('#em_text_'+shopID).val();
|
||||
var r = new RegExp('(^|,) *'+listValue+' *(,|$)');
|
||||
if (r.test(inputValue))
|
||||
{
|
||||
var rep = '';
|
||||
if (new RegExp(', *'+listValue+' *,').test(inputValue))
|
||||
$('#em_text_'+shopID).val(inputValue.replace(r, ','));
|
||||
else if (new RegExp(listValue+' *,').test(inputValue))
|
||||
$('#em_text_'+shopID).val(inputValue.replace(r, ''));
|
||||
else
|
||||
$('#em_text_'+shopID).val(inputValue.replace(r, ''));
|
||||
}
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<label>{l s='Exceptions'} :</label>
|
||||
<div class="margin-form">
|
||||
{if !$except_diff}
|
||||
{$exception_list}
|
||||
{else}
|
||||
{foreach $exception_list_diff as $value}
|
||||
{$value}
|
||||
{/foreach}
|
||||
{/if}
|
||||
{l s='Please specify those files for which you do not want the module to be displayed'}.<br />
|
||||
{l s='Please type each filename separated by a comma'}.
|
||||
<br /><br />
|
||||
</div>
|
||||
|
||||
<div class="margin-form">
|
||||
{if $edit_graft}
|
||||
<input type="hidden" name="id_module" value="{$id_module}" />
|
||||
<input type="hidden" name="id_hook" value="{$id_hook}" />
|
||||
{/if}
|
||||
<input type="submit" value="{l s='Save'}" name="{if $edit_graft}submitEditGraft{else}submitAddToHook{/if}" id="{$table}_form_submit_btn" class="button" />
|
||||
</div>
|
||||
<div class="small"><sup>*</sup> {l s='Required field'}</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
@@ -0,0 +1,144 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<script type="text/javascript">
|
||||
var token = '{$token}';
|
||||
var come_from = 'AdminModulesPositions';
|
||||
</script>
|
||||
<script type="text/javascript" src="../js/admin-dnd.js"></script>
|
||||
|
||||
{if $show_toolbar}
|
||||
<div class="toolbar-placeholder">
|
||||
<div class="toolbarBox {if $toolbar_fix}toolbarHead{/if}">
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn}
|
||||
<div class="pageTitle">
|
||||
<h3>{block name=pageTitle}
|
||||
<span id="current_obj" style="font-weight: normal;">{$title|default:' '}</span>
|
||||
{/block}
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="filter-module">
|
||||
<form>
|
||||
{l s='Show'} :
|
||||
<select id="show_modules" onChange="autoUrl('show_modules', '{$url_show_modules}')">
|
||||
<option value="all">{l s='All modules'} </option>
|
||||
<option>---------------</option>
|
||||
|
||||
{foreach $modules as $module}
|
||||
<option value="{$module->id|intval}" {if $display_key == $module->id}selected="selected"{/if}>{$module->displayName}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
<br /><br />
|
||||
<input type="checkbox" id="hook_position" onclick="autoUrlNoList('hook_position', '{$url_show_invisible}')" {if $hook_position}checked="checked"{/if} />
|
||||
<label class="t" for="hook_position">{l s='Display non-positionable hook'}</label>
|
||||
</form>
|
||||
</div>
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
<div id="modulePosition">
|
||||
<div class="blocLiveEdit"><h2>{l s='Live edit'}</h2>
|
||||
{if $live_edit}
|
||||
<p>{l s='You have to select a shop to use live edit'}</p>
|
||||
{else}
|
||||
<p>{l s='By clicking here you will be redirected to the front office of your shop to move and delete modules directly.'}</p>
|
||||
<a href="{$url_live_edit}" target="_blank" class="button">{l s='Run LiveEdit'}</a>
|
||||
{/if}
|
||||
</div>
|
||||
<form method="post" action="{$url_submit}">
|
||||
<div id="unhook_button_position_top">
|
||||
<input class="button floatr" type="submit" name="unhookform" value="{l s='Unhook the selection'}"/></div>
|
||||
|
||||
{if !$can_move}
|
||||
<br /><div><b>{l s='If you want to order / move following data, please go in shop context (select a shop in shop list)'}</b></div>
|
||||
{/if}
|
||||
{foreach $hooks as $hook}
|
||||
<a name="{$hook['name']}"/>
|
||||
<table cellpadding="0" cellspacing="0" class="table widthfull space {if $hook['module_count'] >= 2} tableDnD{/if}" id="{$hook['id_hook']}">
|
||||
<colgroup>
|
||||
<col width="10"></col>
|
||||
<col width="30"></col>
|
||||
<col width="40"></col>
|
||||
<col width=""></col>
|
||||
<col width="50"></col>
|
||||
</colgroup>
|
||||
<tr class="nodrag nodrop"><th colspan="5"> {if $hook['module_count'] && $can_move}
|
||||
<input type="checkbox" id="Ghook{$hook['id_hook']}" style="margin-right: 2px;" onclick="hookCheckboxes({$hook['id_hook']}, 0, this)"/>
|
||||
{/if}{$hook['title']} - <span style="color: red">{$hook['module_count']}</span> {if $hook['module_count'] > 1}{l s='modules'}{else}{l s='module'}{/if}
|
||||
|
||||
{if !empty($hook['description'])}
|
||||
<span style="font-size:0.8em; font-weight: normal">[{$hook['description']}]</span>
|
||||
{/if}
|
||||
<span style="color:grey;">({l s='Technical name: '}{$hook['name']})</span></th></tr>
|
||||
{if $hook['module_count']}
|
||||
{foreach $hook['modules'] as $position => $module}
|
||||
{if isset($module['instance'])}
|
||||
<tr id="{$hook['id_hook']}_{$module['instance']->id}" {cycle values='class="alt_row",'} style="height: 42px;">
|
||||
<td align=center ><input type="checkbox" id="mod{$hook['id_hook']}_{$module['instance']->id}" class="hook{$hook['id_hook']}" onclick="hookCheckboxes({$hook['id_hook']}, 1, this)" name="unhooks[]" value="{$hook['id_hook']}_{$module['instance']->id}"/></td>
|
||||
{if !$display_key}
|
||||
<td align=center class="positions">{$module@iteration}</td>
|
||||
<td {if $can_move && $hook['module_count'] >= 2} align=center class="dragHandle"{/if} id="td_{$hook['id_hook']}_{$module['instance']->id}">
|
||||
{if $can_move}
|
||||
<a {if {$module@iteration} == 1} style="display: none;"{/if} href="{$current}&id_module={$module['instance']->id}&id_hook={$hook['id_hook']}&direction=0&token={$token}&changePosition#{$hook['name']}">
|
||||
<img src="../img/admin/up.gif" alt="{l s='Up'}" title="{l s='Up'}" />
|
||||
</a><br />
|
||||
<a {if {$module@iteration} == count($hook['modules'])} style="display: none;"{/if} href="{$current}&id_module={$module['instance']->id}&id_hook={$hook['id_hook']}&direction=1&token={$token}&changePosition#{$hook['name']}">
|
||||
<img src="../img/admin/down.gif" alt="{l s='Down'}" title="{l s='Down'}" />
|
||||
</a>
|
||||
{/if}
|
||||
</td>
|
||||
<td><div class="lab_modules_positions" for="mod{$hook['id_hook']}_{$module['instance']->id}">
|
||||
{else}
|
||||
<td colspan="3"><div class="lab_modules_positions" for="mod{$hook['id_hook']}_{$module['instance']->id}">
|
||||
{/if}
|
||||
<img src="../modules/{$module['instance']->name}/logo.png" alt="{$module['instance']->name|stripslashes}" /> <h3>{$module['instance']->displayName|stripslashes}</h3>
|
||||
<span>{if $module['instance']->version}v{if $module['instance']->version|intval == $module['instance']->version}{sprintf('%.1f', $module['instance']->version)}{else}{$module['instance']->version|floatval}{/if}{/if}</span><p>{$module['instance']->description}</p>
|
||||
</div></td>
|
||||
<td>
|
||||
<a href="{$current}&id_module={$module['instance']->id}&id_hook={$hook['id_hook']}&editGraft{if $display_key}&show_modules={$display_key}{/if}&token={$token}">
|
||||
<img src="../img/admin/edit.gif" border="0" alt="{l s='Edit'}" title="{l s='Edit'}" />
|
||||
</a>
|
||||
<a href="{$current}&id_module={$module['instance']->id}&id_hook={$hook['id_hook']}&deleteGraft{if $display_key}&show_modules={$display_key}{/if}&token={$token}">
|
||||
<img src="../img/admin/delete.gif" border="0" alt="{l s='Delete'}" title="{l s='Delete'}" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{else}
|
||||
<tr><td colspan="5">{l s='No module for this hook'}</td></tr>
|
||||
{/if}
|
||||
</table>
|
||||
{/foreach}
|
||||
<div id="unhook_button_position_bottom"><input class="button floatr" type="submit" name="unhookform" value="{l s='Unhook the selection'}"/></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -0,0 +1,30 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<h1>{l s='The controller'} {$controller} {l s='is missing or invalid. '}</h1>
|
||||
<ul>
|
||||
<li><a href="index.php">{l s='Go to Dashboard'}</a></li>
|
||||
<li><a href="#" onclick="window.history.back();">{l s='Back to previous page'}</a></li>
|
||||
</ul>
|
||||
@@ -0,0 +1,109 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{if ($product.customizedDatas)}
|
||||
<tr>
|
||||
<td align="center">{if ($product.image->id)}{$product.image_tag}{else}'--'{/if}</td>
|
||||
<td>
|
||||
<a href="index.php?controller=adminproducts&id_product={$product['product_id']}&updateproduct&token={getAdminToken tab='AdminProducts'}">
|
||||
<span class="productName">{$product['product_name']} - {l s='customized'}</span><br />
|
||||
{if ($product['product_reference'])}{l s='Ref:'} {$product['product_reference']}<br />{/if}
|
||||
{if ($product['product_supplier_reference'])}{l s='Ref Supplier:'} {$product['product_supplier_reference']}{/if}
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">{displayPrice price=$product['product_price_wt'] currency=$currency->id}</td>
|
||||
<td align="center" class="productQuantity">{$product['customizationQuantityTotal']}</td>
|
||||
{if ($order->hasBeenPaid())}<td align="center" class="productQuantity">{$product['customizationQuantityRefunded']}</td>{/if}
|
||||
{if ($order->hasBeenDelivered())}<td align="center" class="productQuantity">{$product['customizationQuantityReturned']}</td>{/if}
|
||||
<td align="center" class="productQuantity"> - </td>
|
||||
<td align="center">
|
||||
{if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)}
|
||||
{displayPrice price=Tools::ps_round($product['product_price'] * $product['customizationQuantityTotal'], 2) currency=$currency->id}
|
||||
{else}
|
||||
{displayPrice price=Tools::ps_round($product['product_price_wt'] * $product['customizationQuantityTotal'], 2) currency=$currency->id}
|
||||
{/if}
|
||||
</td>
|
||||
<td align="center" class="cancelCheck">--</td>
|
||||
<td align="center" class="cancelQuantity">--</td>
|
||||
</tr>
|
||||
{foreach from=$product.customizedDatas key=customizationId item=customization}
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
{foreach from=$customization.datas key=type item=datas}
|
||||
{if ($type == Product::CUSTOMIZE_FILE)}
|
||||
<ul style="margin: 4px 0px 4px 0px; padding: 0px; list-style-type: none;">
|
||||
{foreach from=$datas item=data}
|
||||
<li style="display: inline; margin: 2px;">
|
||||
<a href="displayImage.php?img={$data['value']}&name={$order->id}-file{$data@iteration}" target="_blank"><img src="'{$smarty.const._THEME_PROD_PIC_DIR_}{$data['value']}_small" alt="" /></a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{elseif ($type == Product::CUSTOMIZE_TEXTFIELD)}
|
||||
<ul style="margin: 0px 0px 4px 0px; padding: 0px 0px 0px 6px; list-style-type: none;">
|
||||
{foreach from=$datas item=data}
|
||||
<li>{if $data['name']}{$data['name']}{else}{l s='Text #'}{$data@iteration}{/if}{l s=':'} {$data['value']}</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</td>
|
||||
<td align="center">-</td>
|
||||
<td align="center" class="productQuantity">{$customization['quantity']}</td>
|
||||
{if ($order->hasBeenPaid())}<td align="center">{$customization['quantity_refunded']}</td>{/if}
|
||||
{if ($order->hasBeenDelivered())}<td align="center">{$customization['quantity_returned']}</td>{/if}
|
||||
<td align="center">-</td>
|
||||
<td align="center">
|
||||
{if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)}
|
||||
{displayPrice price=Tools::ps_round($product['product_price'] * $customization['quantity'], 2) currency=$currency->id}
|
||||
{else}
|
||||
{displayPrice price=Tools::ps_round($product['product_price_wt'] * $customization['quantity'], 2) currency=$currency->id}
|
||||
{/if}
|
||||
</td>
|
||||
<td align="center" class="cancelCheck">
|
||||
<input type="hidden" name="totalQtyReturn" id="totalQtyReturn" value="{$customization['quantity_returned']}" />
|
||||
<input type="hidden" name="totalQty" id="totalQty" value="{$customization['quantity']}" />
|
||||
<input type="hidden" name="productName" id="productName" value="{$product['product_name']}" />
|
||||
{if ((!$order->hasBeenDelivered() OR Configuration::get('PS_ORDER_RETURN')) && (int)(($customization['quantity_returned']) < (int)($customization['quantity'])))}
|
||||
<input type="checkbox" name="id_customization[{$customizationId}]" id="id_customization[{$customizationId}]" value="{$product['id_order_detail']}" onchange="setCancelQuantity(this, '{$customizationId}', '{$customization['quantity'] - $customization['quantity_refunded']}')" '.{if (($customization['quantity_returned'] + $customization['quantity_refunded']) >= $customization['quantity'])}disabled="disabled"{/if} />
|
||||
{else}
|
||||
--
|
||||
{/if}
|
||||
</td>
|
||||
<td class="cancelQuantity">
|
||||
{if (($customization['quantity_returned'] + $customization['quantity_refunded']) >= $customization['quantity'])}
|
||||
<input type="hidden" name="cancelCustomizationQuantity[{$customizationId}]" value="0" />
|
||||
{elseif (!$order->hasBeenDelivered() || Configuration::get('PS_ORDER_RETURN'))}
|
||||
<input type="text" id="cancelQuantity_{$customizationId}" name="cancelCustomizationQuantity[{$customizationId}]" size="2" onclick="selectCheckbox(this);" value="" />
|
||||
{/if}
|
||||
{if ($order->hasBeenDelivered())}
|
||||
{$customization['quantity_returned']}/{$customization['quantity']-$customization['quantity_refunded']}
|
||||
{elseif ($order->hasBeenPaid())}
|
||||
{$customization['quantity_returned']}/{$customization['quantity']}
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{/if}
|
||||
@@ -0,0 +1,77 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 9856 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<form method="POST" action="{$currentIndex}&viewOrder&id_order={$smarty.get.id_order|escape:'htmlall':'UTF-8'}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}">
|
||||
<label>{l s='Name'}</label>
|
||||
<div class="margin-form">
|
||||
<input type="text" name="discount_name" value="" />
|
||||
</div>
|
||||
|
||||
<label>{l s='Type'}</label>
|
||||
<div class="margin-form">
|
||||
<select name="discount_type" id="discount_type">
|
||||
<option value="1">{l s='Percent'}</option>
|
||||
<option value="2">{l s='Amount'}</option>
|
||||
<option value="3">{l s='Free shipping'}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div id="discount_value_field">
|
||||
<label>{l s='Value'}</label>
|
||||
<div class="margin-form">
|
||||
{if ($currency->format % 2)}
|
||||
<span id="discount_currency_sign" style="display: none;">{$currency->sign}</span>
|
||||
{/if}
|
||||
<input type="text" name="discount_value" size="3" />
|
||||
{if !($currency->format % 2)}
|
||||
<span id="discount_currency_sign" style="display: none;">{$currency->sign}</span>
|
||||
{/if}
|
||||
<span id="discount_percent_symbol">%</span>
|
||||
<p class="preference_description" id="discount_value_help" style="width: 95%;display: none;">
|
||||
{l s='This value must be taxes included.'}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if $order->hasInvoice()}
|
||||
<label>{l s='Invoice'}</label>
|
||||
<div class="margin-form">
|
||||
<select name="discount_invoice">
|
||||
{foreach from=$invoices_collection item=invoice}
|
||||
<option value="{$invoice->id}" selected="selected">{$invoice->getInvoiceNumberFormatted($current_id_lang)} - {displayPrice price=$invoice->total_paid_tax_incl currency=$order->id_currency}</option>
|
||||
{/foreach}
|
||||
</select><br />
|
||||
<input type="checkbox" name="discount_all_invoices" id="discount_all_invoices" value="1" /> <label class="t" for="discount_all_invoices">{l s='Apply on all invoices'}</label>
|
||||
<p class="preference_description" style="width: 95%">
|
||||
{l s='If you select to create this discount for all invoices, one discount will be created per order invoice.'}
|
||||
</p>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<p class="center">
|
||||
<input class="button" type="submit" name="submitNewVoucher" value="{l s='Add'}" />
|
||||
<a href="#" id="cancel_add_voucher">{l s='Cancel'}</a>
|
||||
</p>
|
||||
</form>
|
||||
@@ -0,0 +1,127 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 9856 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<table class="table" width="100%;" cellspacing="0" cellpadding="0" id="documents_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:10%">{l s='Date'}</th>
|
||||
<th style="">{l s='Document'}</th>
|
||||
<th style="width:20%">{l s='Number'}</th>
|
||||
<th style="width:10%">{l s='Amount'}</th>
|
||||
<th style="width:1%"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach from=$order->getDocuments() item=document}
|
||||
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
{if isset($document->is_delivery)}
|
||||
<tr class="invoice_line" id="delivery_{$document->id}">
|
||||
{else}
|
||||
<tr class="invoice_line" id="invoice_{$document->id}">
|
||||
{/if}
|
||||
{elseif get_class($document) eq 'OrderSlip'}
|
||||
<tr class="invoice_line" id="orderslip_{$document->id}">
|
||||
{/if}
|
||||
|
||||
<td class="document_date">{dateFormat date=$document->date_add}</td>
|
||||
<td class="document_type">
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
{if isset($document->is_delivery)}
|
||||
{l s='Delivery slip'}
|
||||
{else}
|
||||
{l s='Invoice'}
|
||||
{/if}
|
||||
{elseif get_class($document) eq 'OrderSlip'}
|
||||
{l s='Credit Slip'}
|
||||
{/if}</td>
|
||||
<td class="document_number">
|
||||
<a target="_blank" href="
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
pdf.php?{if isset($document->is_delivery)}delivery{else}pdf{/if}&id_order_invoice={$document->id}
|
||||
{elseif get_class($document) eq 'OrderSlip'}
|
||||
pdf.php?id_order_slip={$document->id}
|
||||
{/if}">
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
{if isset($document->is_delivery)}
|
||||
#{Configuration::get('PS_DELIVERY_PREFIX', $current_id_lang)}{'%06d'|sprintf:$document->delivery_number}
|
||||
{else}
|
||||
{$document->getInvoiceNumberFormatted($current_id_lang)}
|
||||
{/if}
|
||||
{elseif get_class($document) eq 'OrderSlip'}
|
||||
{l s='#'}{'%06d'|sprintf:$document->id}
|
||||
{/if} <img src="../img/admin/details.gif" alt="{l s='See the document'}" /></a></td>
|
||||
<td class="document_amount">
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
{if isset($document->is_delivery)}
|
||||
--
|
||||
{else}
|
||||
{displayPrice price=$document->total_paid_tax_incl currency=$currency->id}
|
||||
{if $document->getRestPaid()}
|
||||
<span style="color:red;font-weight:bold;">({displayPrice price=$document->getRestPaid() currency=$currency->id} {l s='not paid'})</span>
|
||||
{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
</td>
|
||||
<td class="right document_action">
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
{if !isset($document->is_delivery)}
|
||||
{if $document->getRestPaid()}
|
||||
<a href="#" class="js-set-payment" data-amount="{$document->getRestPaid()}" data-id-invoice="{$document->id}" title="{l s='Set payment form'}"><img src="../img/admin/money_add.png" alt="{l s='Set payment form'}" /></a>
|
||||
{/if}
|
||||
<a href="#" onclick="$('#invoiceNote{$document->id}').show(); return false;" title="{if $document->note eq ''}{l s='Add note'}{else}{l s='Edit note'}{/if}"><img src="../img/admin/note.png" alt="{if $document->note eq ''}{l s='Add note'}{else}{l s='Edit note'}{/if}"{if $document->note eq ''} class="js-disabled-action"{/if} /></a>
|
||||
{/if}
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
{if !isset($document->is_delivery)}
|
||||
<tr id="invoiceNote{$document->id}" style="display:none" class="current-edit">
|
||||
<td colspan="5">
|
||||
<form action="{$currentIndex}&viewOrder&id_order={$order->id}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}" method="post">
|
||||
<p>
|
||||
<label for="editNote{$document->id}" class="t">{l s='Note'}</label>
|
||||
<input type="hidden" name="id_order_invoice" value="{$document->id}" />
|
||||
<textarea name="note" rows="10" cols="10" id="editNote{$document->id}" class="edit-note">{$document->note|escape:'htmlall':'UTF-8'}</textarea>
|
||||
</p>
|
||||
<p class="right">
|
||||
<input type="submit" name="submitEditNote" value="{l s='Save'}" class="button" />
|
||||
<a href="#" id="cancelNote" onclick="$('#invoiceNote{$document->id}').hide();return false;">{l s='Cancel'}</a>
|
||||
</p>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/if}
|
||||
{foreachelse}
|
||||
<tr>
|
||||
<td colspan="5" class="center">
|
||||
<h3>{l s='No document is available'}</h3>
|
||||
<p><a class="button" href="{$currentIndex}&viewOrder&submitGenerateInvoice&id_order={$order->id}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}">{l s='Generate invoice'}</a></p>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -0,0 +1,78 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 9856 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<tr id="new_product" height="52" style="display:none;background-color:#e9f1f6">
|
||||
<td style="display:none;" colspan="2">
|
||||
<input type="hidden" id="add_product_product_id" name="add_product[product_id]" value="0" />
|
||||
{l s='Product:'} <input type="text" id="add_product_product_name" value="" size="42" />
|
||||
<div id="add_product_product_attribute_area" style="margin-top: 5px;display: none;">
|
||||
{l s='Combinations:'} <select name="add_product[product_attribute_id]" id="add_product_product_attribute_id"></select>
|
||||
</div>
|
||||
<div id="add_product_product_warehouse_area" style="margin-top: 5px; display: none;">
|
||||
{l s='Warehouse:'} <select id="add_product_warehouse" name="add_product_warehouse">
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
<td style="display:none;">
|
||||
{if $currency->sign % 2}{$currency->sign}{/if}<input type="text" name="add_product[product_price_tax_excl]" id="add_product_product_price_tax_excl" value="" size="4" disabled="disabled" /> {if !($currency->sign % 2)}{$currency->sign}{/if} {l s='tax excl.'}<br />
|
||||
{if $currency->sign % 2}{$currency->sign}{/if}<input type="text" name="add_product[product_price_tax_incl]" id="add_product_product_price_tax_incl" value="" size="4" disabled="disabled" /> {if !($currency->sign % 2)}{$currency->sign}{/if} {l s='tax incl.'}<br />
|
||||
</td>
|
||||
<td style="display:none;" align="center" class="productQuantity"><input type="text" name="add_product[product_quantity]" id="add_product_product_quantity" value="1" size="3" disabled="disabled" /></td>
|
||||
{if ($order->hasBeenPaid())}<td style="display:none;" align="center" class="productQuantity"> </td>{/if}
|
||||
{if ($order->hasBeenDelivered())}<td style="display:none;" align="center" class="productQuantity"> </td>{/if}
|
||||
<td style="display:none;" align="center" class="productQuantity" id="add_product_product_stock">0</td>
|
||||
<td style="display:none;" align="center" id="add_product_product_total">{displayPrice price=0 currency=$currency->id}</td>
|
||||
<td style="display:none;" align="center" colspan="2">
|
||||
{if sizeof($invoices_collection)}
|
||||
<select name="add_product[invoice]" id="add_product_product_invoice" disabled="disabled">
|
||||
<optgroup class="existing" label="{l s='Existing'}">
|
||||
{foreach from=$invoices_collection item=invoice}
|
||||
<option value="{$invoice->id}">{$invoice->getInvoiceNumberFormatted($current_id_lang)}</option>
|
||||
{/foreach}
|
||||
</optgroup>
|
||||
<optgroup label="{l s='New'}">
|
||||
<option value="0">{l s='Create a new invoice'}</option>
|
||||
</optgroup>
|
||||
</select>
|
||||
{/if}
|
||||
</td>
|
||||
<td style="display:none;">
|
||||
<input type="button" class="button" id="submitAddProduct" value="{l s='Add product'}" disabled="disabled" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="new_invoice" style="display:none;background-color:#e9f1f6;">
|
||||
<td colspan="10">
|
||||
<h3>{l s='New invoice informations'}</h3>
|
||||
<label>{l s='Carrier:'}</label>
|
||||
<div class="margin-form">
|
||||
{$carrier->name}
|
||||
</div>
|
||||
<div class="margin-form">
|
||||
<input type="checkbox" name="add_invoice[free_shipping]" value="1" />
|
||||
<label class="t">{l s='Free shipping'}</label>
|
||||
<p>{l s='If you don\'t select the "Free shipping", the normal shipping cost will be applied'}</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -0,0 +1,43 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 9589 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{* Generate HTML code for printing Invoice Icon with link *}
|
||||
<span style="width:20px; margin-right:5px;">
|
||||
{if (($order_state->invoice && $order->invoice_number) && $tr['product_number'])}
|
||||
<a target="_blank" href="pdf.php?id_order={$order->id}&pdf"><img src="../img/admin/tab-invoice.gif" alt="invoice" /></a>
|
||||
{else}
|
||||
-
|
||||
{/if}
|
||||
</span>
|
||||
|
||||
{* Generate HTML code for printing Delivery Icon with link *}
|
||||
<span style="width:20px;">
|
||||
{if ($order_state->delivery && $order->delivery_number)}
|
||||
<a target="_blank" href="pdf.php?id_order={$order->id}&delivery"><img src="../img/admin/delivery.gif" alt="delivery" /></a>
|
||||
{else}
|
||||
-
|
||||
{/if}
|
||||
</span>
|
||||
@@ -0,0 +1,122 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{* Assign product price *}
|
||||
{if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)}
|
||||
{assign var=product_price value=($product['unit_price_tax_excl'] + $product['ecotax'])}
|
||||
{else}
|
||||
{assign var=product_price value=$product['unit_price_tax_incl']}
|
||||
{/if}
|
||||
|
||||
{if ($product['product_quantity'] > $product['customizationQuantityTotal'])}
|
||||
<tr{if isset($product.image) && $product.image->id && isset($product.image_size)} height="{$product['image_size'][1] + 7}"{/if}>
|
||||
<td align="center">{if isset($product.image) && $product.image->id}{$product.image_tag}{/if}</td>
|
||||
<td><a href="index.php?controller=adminproducts&id_product={$product['product_id']}&updateproduct&token={getAdminToken tab='AdminProducts'}">
|
||||
<span class="productName">{$product['product_name']}</span><br />
|
||||
{if $product.product_reference}{l s='Ref:'} {$product.product_reference}<br />{/if}
|
||||
{if $product.product_supplier_reference}{l s='Ref Supplier:'} {$product.product_supplier_reference}{/if}
|
||||
</a></td>
|
||||
<td align="center">
|
||||
<span class="product_price_show">{displayPrice price=$product_price currency=$currency->id}</span>
|
||||
{if $can_edit}
|
||||
<span class="product_price_edit" style="display:none;">
|
||||
<input type="hidden" name="product_id_order_detail" class="edit_product_id_order_detail" value="{$product['id_order_detail']}" />
|
||||
{if $currency->sign % 2}{$currency->sign}{/if}<input type="text" name="product_price_tax_excl" class="edit_product_price_tax_excl edit_product_price" value="{Tools::ps_round($product['unit_price_tax_excl'], 2)}" size="5" /> {if !($currency->sign % 2)}{$currency->sign}{/if} {l s='tax excl.'}<br />
|
||||
{if $currency->sign % 2}{$currency->sign}{/if}<input type="text" name="product_price_tax_incl" class="edit_product_price_tax_incl edit_product_price" value="{Tools::ps_round($product['unit_price_tax_incl'], 2)}" size="5" /> {if !($currency->sign % 2)}{$currency->sign}{/if} {l s='tax incl.'}
|
||||
</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td align="center" class="productQuantity">
|
||||
<span class="product_quantity_show">{$product['product_quantity']}</span>
|
||||
{if $can_edit}
|
||||
<span class="product_quantity_edit" style="display:none;">
|
||||
<input type="text" name="product_quantity" class="edit_product_quantity" value="{$product['product_quantity']}" size="2" />
|
||||
</span>
|
||||
{/if}
|
||||
</td>
|
||||
{if ($order->hasBeenPaid())}<td align="center" class="productQuantity">{$product['product_quantity_refunded']}</td>{/if}
|
||||
{if ($order->hasBeenDelivered())}<td align="center" class="productQuantity">{$product['product_quantity_return']}</td>{/if}
|
||||
<td align="center" class="productQuantity product_stock">{$product['current_stock']}</td>
|
||||
<td align="center" class="total_product">
|
||||
{displayPrice price=(Tools::ps_round($product_price, 2) * ($product['product_quantity'] - $product['customizationQuantityTotal'])) currency=$currency->id}
|
||||
</td>
|
||||
<td colspan="2" style="display: none;" class="add_product_fields"> </th>
|
||||
<td align="center" class="cancelCheck standard_refund_fields current-edit" style="display:none">
|
||||
<input type="hidden" name="totalQtyReturn" id="totalQtyReturn" value="{$product['product_quantity_return']}" />
|
||||
<input type="hidden" name="totalQty" id="totalQty" value="{$product['product_quantity']}" />
|
||||
<input type="hidden" name="productName" id="productName" value="{$product['product_name']}" />
|
||||
{if ((!$order->hasBeenDelivered() OR Configuration::get('PS_ORDER_RETURN')) AND (int)($product['product_quantity_return']) < (int)($product['product_quantity']))}
|
||||
<input type="checkbox" name="id_order_detail[{$k}]" id="id_order_detail[{$k}]" value="{$product['id_order_detail']}" onchange="setCancelQuantity(this, {$product['id_order_detail']}, {$product['product_quantity_in_stock'] - $product['customizationQuantityTotal'] - $product['product_quantity_reinjected']})" {if ($product['product_quantity_return'] + $product['product_quantity_refunded'] >= $product['product_quantity'])}disabled="disabled" {/if}/>
|
||||
{else}
|
||||
--
|
||||
{/if}
|
||||
</td>
|
||||
<td class="cancelQuantity standard_refund_fields current-edit" style="display:none">
|
||||
{if ($product['product_quantity_return'] + $product['product_quantity_refunded'] >= $product['product_quantity'])}
|
||||
<input type="hidden" name="cancelQuantity[{$k}]" value="0" />
|
||||
{elseif (!$order->hasBeenDelivered() OR Configuration::get('PS_ORDER_RETURN'))}
|
||||
<input type="text" id="cancelQuantity_{$product['id_order_detail']}" name="cancelQuantity[{$k}]" size="2" onclick="selectCheckbox(this);" value="" />
|
||||
{/if}
|
||||
|
||||
{if $product['customizationQuantityTotal']}
|
||||
{assign var=productQuantity value=($product['product_quantity']-$product['customizationQuantityTotal'])}
|
||||
{else}
|
||||
{assign var=productQuantity value=$product['product_quantity']}
|
||||
{/if}
|
||||
|
||||
{if ($order->hasBeenDelivered())}
|
||||
{$product['product_quantity_refunded']}/{$productQuantity-$product['product_quantity_refunded']}
|
||||
{elseif ($order->hasBeenPaid())}
|
||||
{$product['product_quantity_return']}/{$productQuantity}
|
||||
{else}
|
||||
0/{$productQuantity}
|
||||
{/if}
|
||||
</td>
|
||||
<td class="partial_refund_fields current-edit" style="text-align:left;display:none">
|
||||
<div style="width:40%;margin-top:5px;float:left">{l s='Quantity:'}</div> <div style="width:60%;margin-top:2px;float:left"><input type="text" size="3" name="partialRefundProductQuantity[{$k}]" value="0" /> 0/{$productQuantity-$product['product_quantity_refunded']}</div>
|
||||
<div style="width:40%;margin-top:5px;float:left">{l s='Amount:'}</div> <div style="width:60%;margin-top:2px;float:left"><input type="text" size="3" name="partialRefundProduct[{$k}]" /> €</div>
|
||||
</td>
|
||||
{if ($can_edit && !$order->hasBeenDelivered())}
|
||||
<td class="product_invoice" colspan="2" style="display: none;text-align:center;">
|
||||
{if sizeof($invoices_collection)}
|
||||
<select name="product_invoice" class="edit_product_invoice">
|
||||
{foreach from=$invoices_collection item=invoice}
|
||||
<option value="{$invoice->id}" {if $invoice->id == $product['id_order_invoice']}selected="selected"{/if}>#{Configuration::get('PS_INVOICE_PREFIX', $current_id_lang)}{'%06d'|sprintf:$invoice->number}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
{else}
|
||||
|
||||
{/if}
|
||||
</td>
|
||||
<td class="product_action" style="text-align:right">
|
||||
<a href="#" class="edit_product_change_link"><img src="../img/admin/edit.gif" alt="{l s='Edit'}" /></a>
|
||||
<input type="submit" class="button" name="submitProductChange" value="{l s='Update'}" style="display: none;" />
|
||||
<a href="#" class="cancel_product_change_link" style="display: none;"><img src="../img/admin/disabled.gif" alt="{l s='Cancel'}" /></a>
|
||||
<a href="#" class="delete_product_line"><img src="../img/admin/delete.gif" alt="{l s='Delete'}" /></a>
|
||||
</td>
|
||||
{/if}
|
||||
</tr>
|
||||
{/if}
|
||||
@@ -0,0 +1,75 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 9856 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<table class="table" width="100%" cellspacing="0" cellpadding="0" id="shipping_table">
|
||||
<colgroup>
|
||||
<col width="15%"></col>
|
||||
<col width="15%"></col>
|
||||
<col width=""></col>
|
||||
<col width="10%"></col>
|
||||
<col width="20%"></col>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{l s='Date:'}</th>
|
||||
<th>{l s='Type'}</th>
|
||||
<th>{l s='Carrier'}</th>
|
||||
<th>{l s='Weight'}</th>
|
||||
<th>{l s='Shipping cost'}</th>
|
||||
<th>{l s='Tracking number'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach from=$order->getShipping() item=line}
|
||||
<tr>
|
||||
<td>{$line.date_add}</td>
|
||||
<td>{$line.type}</td>
|
||||
<td>{$line.state_name}</td>
|
||||
<td>{$line.weight|string_format:"%.3f"} {Configuration::get('PS_WEIGHT_UNIT')}</td>
|
||||
<td>
|
||||
{if $order->getTaxCalculationMethod() == $smarty.const.PS_TAX_INC}
|
||||
{displayPrice price=$line.shipping_cost_tax_incl currency=$currency->id}
|
||||
{else}
|
||||
{displayPrice price=$line.shipping_cost_tax_excl currency=$currency->id}
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
<span id="shipping_number_show">{if $line.url && $line.tracking_number}<a href="{$line.url|replace:'@':$line.tracking_number}">{$line.tracking_number}</a>{else}{$line.tracking_number}{/if}</span>
|
||||
{if $line.can_edit}
|
||||
<form style="display: inline;" method="POST" action="{$link->getAdminLink('AdminOrders')}&vieworder&id_order={$smarty.get.id_order|escape:'htmlall':'UTF-8'}">
|
||||
<span class="shipping_number_edit" style="display:none;">
|
||||
<input type="text" name="id_order_carrier" value="{$line.id_order_carrier}" />
|
||||
<input type="text" name="tracking_number" value="{$line.tracking_number}" />
|
||||
<input type="submit" class="button" name="submitShippingNumber" value="{l s='Update'}" />
|
||||
</span>
|
||||
<a href="#" class="edit_shipping_number_link"><img src="../img/admin/edit.gif" alt="{l s='Edit'}" /></a>
|
||||
<a href="#" class="cancel_shipping_number_link" style="display: none;"><img src="../img/admin/disabled.gif" alt="{l s='Cancel'}" /></a>
|
||||
</form>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
+1043
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,719 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{extends file="helper/view/view.tpl"}
|
||||
|
||||
{block name="override_tpl"}
|
||||
<script type="text/javascript">
|
||||
var admin_order_tab_link = "{$link->getAdminLink('AdminOrders')}";
|
||||
var id_order = {$order->id};
|
||||
var id_lang = {$current_id_lang};
|
||||
var id_currency = {$order->id_currency};
|
||||
{assign var=PS_TAX_ADDRESS_TYPE value=Configuration::get('PS_TAX_ADDRESS_TYPE')}
|
||||
var id_address = {$order->$PS_TAX_ADDRESS_TYPE};
|
||||
var currency_sign = "{$currency->sign}";
|
||||
var currency_format = "{$currency->format}";
|
||||
var currency_blank = "{$currency->blank}";
|
||||
var priceDisplayPrecision = 2;
|
||||
var use_taxes = {$order->getTaxCalculationMethod() == $smarty.const.PS_TAX_INC}
|
||||
var token = "{$smarty.get.token|escape:'htmlall':'UTF-8'}";
|
||||
|
||||
var txt_add_product_stock_issue = "{l s='You want to add more product than available in stock, are you sure you want to add this quantity?' js=1}";
|
||||
var txt_add_product_new_invoice = "{l s='Are you sure you want to create a new invoice?' js=1}";
|
||||
var txt_add_product_no_product = "{l s='Error: No product has been selected' js=1}";
|
||||
var txt_add_product_no_product_quantity = "{l s='Error: Quantity of product must be set' js=1}";
|
||||
var txt_add_product_no_product_price = "{l s='Error: Price of product must be set' js=1}";
|
||||
var txt_confirm = "{l s='Are you sure?' js=1}";
|
||||
|
||||
var statesShipped = new Array();
|
||||
{foreach from=$states item=state}
|
||||
{if (!$currentState->shipped && $state['shipped'])}
|
||||
statesShipped.push({$state['id_order_state']});
|
||||
{/if}
|
||||
{/foreach}
|
||||
</script>
|
||||
|
||||
{assign var="hook_invoice" value={hook h="displayInvoice" id_order=$order->id}}
|
||||
{if ($hook_invoice)}
|
||||
<div style="float: right; margin: -40px 40px 10px 0;">{$hook_invoice}</div><br class="clear" />';
|
||||
{/if}
|
||||
|
||||
<div class="bloc-command">
|
||||
<div class="button-command">
|
||||
{if (count($invoices_collection))}
|
||||
<a class="button" href="pdf.php?id_order={$order->id}&pdf" target="_blank"><img src="../img/admin/charged_ok.gif" alt="{l s='View invoice'}" /> {l s='View invoice'}</a>
|
||||
{else}
|
||||
<img src="../img/admin/charged_ko.gif" alt="{l s='No invoice'}" /> {l s='No invoice'}
|
||||
{/if}
|
||||
|
|
||||
{if ($currentState->delivery || $order->delivery_number)}
|
||||
<a class="button" href="pdf.php?id_order={$order->id}&delivery" target="_blank"><img src="../img/admin/delivery.gif" alt="{l s='View delivery slip'}" /> {l s='View delivery slip'}</a>
|
||||
{else}
|
||||
<img src="../img/admin/delivery_ko.gif" alt="{l s='No delivery slip'}" /> {l s='No delivery slip'}
|
||||
{/if}
|
||||
|
|
||||
<a class="button" href="javascript:window.print()"><img src="../img/admin/printer.gif" alt="{l s='Print order'}" title="{l s='Print order'}" /> {l s='Print order'}</a>
|
||||
</div>
|
||||
<div class="metadata-command">
|
||||
<dl>
|
||||
<dt>{l s='Date:'} </dt>
|
||||
<dd>{dateFormat date=$order->date_add full=true}</dd>
|
||||
|</dl>
|
||||
<dl>
|
||||
<dt>{l s='Message:'}</dt>
|
||||
<dd>{sizeof($messages)}</dd>
|
||||
|</dl>
|
||||
<dl>
|
||||
<dt>{l s='Product:'}</dt>
|
||||
<dd id="product_number">{sizeof($products)}</dd>
|
||||
|</dl>
|
||||
<dl>
|
||||
<dt>{l s='Total:'}</dt>
|
||||
<dd class="total_paid">{displayPrice price=$order->total_paid_tax_incl currency=$currency->id}</dd>
|
||||
</dl>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-command">
|
||||
<!-- Left column -->
|
||||
<div style="width: 49%; float:left;">
|
||||
<!-- Change status form -->
|
||||
<form action="{$currentIndex}&viewOrder&token={$smarty.get.token}" method="post">
|
||||
<select id="id_order_state" name="id_order_state">
|
||||
{foreach from=$states item=state}
|
||||
<option value="{$state['id_order_state']}" {if $state['id_order_state'] == $currentState->id}selected="selected"{/if}>{$state['name']|stripslashes}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
<input type="hidden" name="id_order" value="{$order->id}" />
|
||||
<input type="submit" name="submitState" value="{l s='Add'}" class="button" />
|
||||
</form>
|
||||
<br />
|
||||
|
||||
<!-- History of status -->
|
||||
<table cellspacing="0" cellpadding="0" class="table history-status" style="width: 100%;">
|
||||
<colgroup>
|
||||
<col width="1%"></col>
|
||||
<col width=""></col>
|
||||
<col width="20%"></col>
|
||||
<col width="20%"></col>
|
||||
</colgroup>
|
||||
{foreach from=$history item=row key=key}
|
||||
{if ($key == 0)}
|
||||
<tr>
|
||||
<th><img src="../img/os/{$row['id_order_state']}.gif" /></th>
|
||||
<th>{$row['ostate_name']|stripslashes}</th>
|
||||
<th>{if $row['employee_lastname']}{$row['employee_firstname']|stripslashes} {$row['employee_lastname']|stripslashes}{/if}</th>
|
||||
<th>{dateFormat date=$row['date_add'] full=true}</th>
|
||||
</tr>
|
||||
{else}
|
||||
<tr class="{if ($key % 2)}alt_row{/if}">
|
||||
<td><img src="../img/os/{$row['id_order_state']}.gif" /></td>
|
||||
<td>{$row['ostate_name']|stripslashes}</td>
|
||||
<td>{if $row['employee_lastname']}{$row['employee_firstname']|stripslashes} {$row['employee_lastname']|stripslashes}{else} {/if}</td>
|
||||
<td>{dateFormat date=$row['date_add'] full=true}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</table>
|
||||
|
||||
{if $customer->id}
|
||||
<!-- Customer informations -->
|
||||
<br />
|
||||
<fieldset>
|
||||
<legend><img src="../img/admin/tab-customers.gif" /> {l s='Customer information'}</legend>
|
||||
<span style="font-weight: bold; font-size: 14px;"><a href="?tab=AdminCustomers&id_customer={$customer->id}&viewcustomer&token={getAdminToken tab='AdminCustomers'}"> {$customer->firstname} {$customer->lastname}</a></span> ({l s='#'}{$customer->id})<br />
|
||||
(<a href="mailto:{$customer->email}">{$customer->email}</a>)<br /><br />
|
||||
{if ($customer->isGuest())}
|
||||
{l s='This order has been placed by a'} <b>{l s='guest'}</b>
|
||||
{if (!Customer::customerExists($customer->email))}
|
||||
<form method="POST" action="index.php?tab=AdminCustomers&id_customer={$customer->id}&token={getAdminToken tab='AdminCustomers'}">
|
||||
<input type="hidden" name="id_lang" value="{$order->id_lang}" />
|
||||
<p class="center"><input class="button" type="submit" name="submitGuestToCustomer" value="{l s='Transform to customer'}" /></p>
|
||||
{l s='This feature will generate a random password and send an e-mail to the customer'}
|
||||
</form>
|
||||
{else}
|
||||
<div><b style="color:red;">{l s='A registered customer account exists with the same email address'}</b></div>
|
||||
{/if}
|
||||
{else}
|
||||
{l s='Account registered:'} <b>{dateFormat date=$customer->date_add full=true}</b><br />
|
||||
{l s='Valid orders placed:'} <b>{$customerStats['nb_orders']}</b><br />
|
||||
{l s='Total paid since registration:'} <b>{displayPrice price=Tools::ps_round(Tools::convertPrice($customerStats['total_orders'], $currency), 2) currency=$currency->id}</b><br />
|
||||
</fieldset>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
<!-- Sources block -->
|
||||
{if (sizeof($sources))}
|
||||
<br />
|
||||
<fieldset>
|
||||
<legend><img src="../img/admin/tab-stats.gif" /> {l s='Sources'}</legend>
|
||||
<ul {if sizeof($sources) > 3}style="height: 200px; overflow-y: scroll;"{/if}>
|
||||
{foreach from=$sources item=source}
|
||||
<li>
|
||||
{dateFormat date=$source['date_add'] full=true}<br />
|
||||
<b>{l s='From:'}</b> <a href="{$source['http_referer']}">{parse_url($source['http_referer'], $smarty.const.PHP_URL_HOST)|regex_replace:'/^www./':''}</a><br />
|
||||
<b>{l s='To:'}</b> {$source['request_uri']}<br />
|
||||
{if $source['keywords']}<b>{l s='Keywords:'}</b> {$source['keywords']}<br />{/if}<br />
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</fieldset>
|
||||
{/if}
|
||||
|
||||
<!-- Admin order hook -->
|
||||
{hook h="displayAdminOrder" id_order=$order->id}
|
||||
</div>
|
||||
<!-- END Left column -->
|
||||
|
||||
<!-- Right column -->
|
||||
<div style="width: 49%; float:right;">
|
||||
<!-- Documents block -->
|
||||
<fieldset>
|
||||
<legend><img src="../img/admin/details.gif" /> {l s='Documents'}</legend>
|
||||
|
||||
{* Include document template *}
|
||||
{include file='controllers/orders/_documents.tpl'}
|
||||
</fieldset>
|
||||
<br />
|
||||
|
||||
<!-- Payments block -->
|
||||
<fieldset>
|
||||
<legend><img src="../img/admin/money.gif" /> {l s='Payment'}</legend>
|
||||
|
||||
{if (!$order->valid && sizeof($currencies) > 1)}
|
||||
<form method="post" action="{$currentIndex}&viewOrder&id_order={$smarty.get.id_order|escape:'htmlall':'UTF-8'}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}">
|
||||
<p class="warn">{l s='Don\'t forget to update your conversion rate before make this change.'}</p>
|
||||
<label>{l s='Change order\'s currency to:'}</label>
|
||||
<select name="new_currency">
|
||||
{foreach from=$currencies item=currency_change}
|
||||
{if $currency_change['id_currency'] != $order->id_currency}
|
||||
<option value="{$currency_change['id_currency']}">{$currency_change['name']} - {$currency_change['sign']}</option>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</select>
|
||||
<input type="submit" class="button" name="submitChangeCurrency" value="{l s='Change'}" />
|
||||
</form>
|
||||
<hr />
|
||||
{/if}
|
||||
|
||||
<p class="error" style="{if $orders_total_paid_tax_incl == $total_paid}display: none;{/if}">
|
||||
{l s='Warning:'} {displayPrice price=$total_paid currency=$currency->id}
|
||||
{l s='paid instead of'} <span class="total_paid">{displayPrice price=$order->total_paid_tax_incl currency=$currency->id}</span>
|
||||
</p>
|
||||
|
||||
<form id="formAddPayment" method="post" action="{$currentIndex}&viewOrder&id_order={$smarty.get.id_order|escape:'htmlall':'UTF-8'}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}">
|
||||
<table class="table" width="100%" cellspacing="0" cellpadding="0">
|
||||
<colgroup>
|
||||
<col width="15%"></col>
|
||||
<col width=""></col>
|
||||
<col width="20%"></col>
|
||||
<col width="10%"></col>
|
||||
<col width="10%"></col>
|
||||
<col width="1%"></col>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{l s='Date'}</th>
|
||||
<th>{l s='Payment method'}</th>
|
||||
<th>{l s='Transaction ID'}</th>
|
||||
<th>{l s='Amount'}</th>
|
||||
<th>{l s='Invoice'}</th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach from=$order->getOrderPaymentCollection() item=payment}
|
||||
<tr>
|
||||
<td>{dateFormat date=$payment->date_add full=true}</td>
|
||||
<td>{$payment->payment_method}</td>
|
||||
<td>{$payment->transaction_id}</td>
|
||||
<td>{displayPrice price=$payment->amount currency=$payment->id_currency}</td>
|
||||
<td>
|
||||
{if $payment->id_order_invoice}
|
||||
{OrderInvoice::retrieveOneById($payment->id_order_invoice)->getInvoiceNumberFormatted($current_id_lang)}
|
||||
{else}
|
||||
{l s='No invoice'}
|
||||
{/if}
|
||||
</td>
|
||||
<td class="right">
|
||||
<a href="#" class="open_payment_information"><img src="../img/admin/details.gif" title="{l s='See payment informations'}" alt="{l s='See payment informations'}" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="payment_information" style="display: none;">
|
||||
<td colspan="6">
|
||||
<p>
|
||||
<b>{l s='Card Number:'}</b>
|
||||
{if $payment->card_number}
|
||||
{$payment->card_number}
|
||||
{else}
|
||||
<i>{l s='Not defined'}</i>
|
||||
{/if}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>{l s='Card Brand:'}</b>
|
||||
{if $payment->card_brand}
|
||||
{$payment->card_brand}
|
||||
{else}
|
||||
<i>{l s='Not defined'}</i>
|
||||
{/if}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>{l s='Card Expiration:'}</b>
|
||||
{if $payment->card_expiration}
|
||||
{$payment->card_expiration}
|
||||
{else}
|
||||
<i>{l s='Not defined'}</i>
|
||||
{/if}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>{l s='Card Holder:'}</b>
|
||||
{if $payment->card_holder}
|
||||
{$payment->card_holder}
|
||||
{else}
|
||||
<i>{l s='Not defined'}</i>
|
||||
{/if}
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
{foreachelse}
|
||||
<tr>
|
||||
<td colspan="6" class="center">
|
||||
<h3>{l s='No payment available'}</h3>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{if count($not_paid_invoices_collection) > 0}
|
||||
<tr class="current-edit">
|
||||
<td><input type="text" name="payment_date" class="datepicker" size="17" value="{date('Y-m-d H:i:s')}" /></td>
|
||||
<td>
|
||||
<select name="payment_method">
|
||||
{foreach from=$payment_methods item=payment_method}
|
||||
<option value="{$payment_method}">{$payment_method}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="payment_transaction_id" value="" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="payment_amount" size="5" value="" />
|
||||
<select name="payment_currency">
|
||||
{foreach from=$currencies item=current_currency}
|
||||
<option value="{$current_currency['id_currency']}"{if $current_currency['id_currency'] == $currency->id} selected="selected"{/if}>{$current_currency['sign']}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<select name="payment_invoice" id="payment_invoice">
|
||||
{foreach from=$not_paid_invoices_collection item=invoice}
|
||||
<option value="{$invoice->id}" selected="selected">{$invoice->getInvoiceNumberFormatted($current_id_lang)}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
<td><input class="button" type="submit" name="submitAddPayment" value="Add" /></td>
|
||||
</tr>
|
||||
{/if}
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</fieldset>
|
||||
<br />
|
||||
|
||||
<!-- Shipping block -->
|
||||
<fieldset>
|
||||
<legend><img src="../img/admin/delivery.gif" /> {l s='Shipping'}</legend>
|
||||
|
||||
<div class="clear" style="float: left; margin-right: 10px;">
|
||||
<span>{l s='Recycled package:'}</span>
|
||||
{if $order->recyclable}
|
||||
<img src="../img/admin/enabled.gif" />
|
||||
{else}
|
||||
<img src="../img/admin/disabled.gif" />
|
||||
{/if}
|
||||
</div>
|
||||
<div style="float: left;">
|
||||
<span>{l s='Gift wrapping:'}</span>
|
||||
{if $order->gift}
|
||||
<img src="../img/admin/enabled.gif" />
|
||||
</div>
|
||||
<div style="clear: left; margin: 0px 42px 0px 42px; padding-top: 2px;">
|
||||
{if $order->gift_message}
|
||||
<div style="border: 1px dashed #999; padding: 5px; margin-top: 8px;"><b>{l s='Message:'}</b><br />{$order->gift_message|nl2br}</div>
|
||||
{/if}
|
||||
{else}
|
||||
<img src="../img/admin/disabled.gif" />
|
||||
{/if}
|
||||
</div>
|
||||
<div class="clear" style="margin-bottom: 10px;"></div>
|
||||
|
||||
{include file='controllers/orders/_shipping.tpl'}
|
||||
|
||||
{if $carrierModuleCall}
|
||||
{$carrierModuleCall}
|
||||
{/if}
|
||||
</fieldset>
|
||||
<br />
|
||||
|
||||
<!-- Return block -->
|
||||
<fieldset>
|
||||
<legend><img src="../img/admin/delivery.gif" /> {l s='Merchandise returns'}</legend>
|
||||
|
||||
{if $order->getReturn()|count > 0}
|
||||
<table class="table" width="100%" cellspacing="0" cellpadding="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:30%">Date</th>
|
||||
<th>Type</th>
|
||||
<th style="width:20%">Carrier</th>
|
||||
<th style="width:30%">Tracking number</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach from=$order->getReturn() item=line}
|
||||
<tr>
|
||||
<td>{$line.date_add}</td>
|
||||
<td>{$line.type}</td>
|
||||
<td>{$line.state_name}</td>
|
||||
<td>
|
||||
<span id="shipping_number_show">{if isset($line.url) && isset($line.tracking_number)}<a href="{$line.url|replace:'@':$line.tracking_number}">{$line.tracking_number}</a>{else if isset($line.tracking_number)}{$line.tracking_number}{/if}</span>
|
||||
{if $line.can_edit}
|
||||
<form style="display: inline;" method="POST" action="{$link->getAdminLink('AdminOrders')}&vieworder&id_order={$smarty.get.id_order|escape:'htmlall':'UTF-8'}&id_order_invoice={if $line.id_order_invoice}{$line.id_order_invoice|escape:'htmlall':'UTF-8'}{else}0{/if}&id_carrier={if $line.id_carrier}{$line.id_carrier|escape:'htmlall':'UTF-8'}{else}0{/if}">
|
||||
<span class="shipping_number_edit" style="display:none;">
|
||||
<input type="text" name="tracking_number" value="{$line.tracking_number}" />
|
||||
<input type="submit" class="button" name="submitShippingNumber" value="{l s='Update'}" />
|
||||
</span>
|
||||
<a href="#" class="edit_shipping_number_link"><img src="../img/admin/edit.gif" alt="{l s='Edit'}" /></a>
|
||||
<a href="#" class="cancel_shipping_number_link" style="display: none;"><img src="../img/admin/disabled.gif" alt="{l s='Cancel'}" /></a>
|
||||
</form>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
{else}
|
||||
{l s='No merchandise returns yet.'}
|
||||
{/if}
|
||||
|
||||
{if $carrierModuleCall}
|
||||
{$carrierModuleCall}
|
||||
{/if}
|
||||
</fieldset>
|
||||
</div>
|
||||
<!-- END Right column -->
|
||||
<div class="clear" style="margin-bottom: 10px;"></div>
|
||||
</div>
|
||||
|
||||
<div class="container-command">
|
||||
<!-- Addresses -->
|
||||
<div style="width: 49%; float:left;"></contact>
|
||||
<!-- Shipping address -->
|
||||
<fieldset>
|
||||
<legend><img src="../img/admin/delivery.gif" alt="{l s='Shipping address'}" />{l s='Shipping address'}</legend>
|
||||
|
||||
{if $can_edit}
|
||||
<form method="POST" action="{$link->getAdminLink('AdminOrders')}&vieworder&id_order={$smarty.get.id_order|escape:'htmlall':'UTF-8'}">
|
||||
<div style="margin-bottom:5px;">
|
||||
<p>
|
||||
<select name="id_address">
|
||||
{foreach from=$customer_addresses item=address}
|
||||
<option value="{$address['id_address']}"{if $address['id_address'] == $order->id_address_delivery} selected="selected"{/if}>{$address['alias']} - {$address['address1']} {$address['postcode']} {$address['city']}{if !empty($address['state'])} {$address['state']}{/if}, {$address['country']}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
<input class="button" type="submit" name="submitAddressShipping" value="{l s='Change'}" />
|
||||
</p>
|
||||
</div>
|
||||
</form>
|
||||
{/if}
|
||||
|
||||
<div style="float: right">
|
||||
<a href="?tab=AdminAddresses&id_address={$addresses.delivery->id}&addaddress&realedit=1&id_order={$order->id}{if ($addresses.delivery->id == $addresses.invoice->id)}&address_type=1{/if}&token={getAdminToken tab='AdminAddresses'}&back={$smarty.server.REQUEST_URI}"><img src="../img/admin/edit.gif" /></a>
|
||||
<a href="http://maps.google.com/maps?f=q&hl={$iso_code_lang}&geocode=&q={$addresses.delivery->address1} {$addresses.delivery->postcode} {$addresses.delivery->city} {if ($addresses.delivery->id_state)} {$addresses.deliveryState->name}{/if}" target="_blank"><img src="../img/admin/google.gif" alt="" class="middle" /></a>
|
||||
</div>
|
||||
|
||||
{displayAddressDetail address=$addresses.delivery newLine='<br />'}
|
||||
{if $addresses.delivery->other}<hr />{$addresses.delivery->other}<br />{/if}
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div style="width: 49%; float:right;"></contact>
|
||||
<!-- Invoice address -->
|
||||
<fieldset>
|
||||
<legend><img src="../img/admin/invoice.gif" alt="{l s='Invoice address'}" />{l s='Invoice address'}</legend>
|
||||
|
||||
{if $can_edit}
|
||||
<form method="POST" action="{$link->getAdminLink('AdminOrders')}&vieworder&id_order={$smarty.get.id_order|escape:'htmlall':'UTF-8'}">
|
||||
<div style="margin-bottom:5px;">
|
||||
<p>
|
||||
<select name="id_address">
|
||||
{foreach from=$customer_addresses item=address}
|
||||
<option value="{$address['id_address']}"{if $address['id_address'] == $order->id_address_invoice} selected="selected"{/if}>{$address['alias']} - {$address['address1']} {$address['postcode']} {$address['city']}{if !empty($address['state'])} {$address['state']}{/if}, {$address['country']}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
<input class="button" type="submit" name="submitAddressInvoice" value="{l s='Change'}" />
|
||||
</p>
|
||||
</div>
|
||||
</form>
|
||||
{/if}
|
||||
|
||||
<div style="float: right">
|
||||
<a href="?tab=AdminAddresses&id_address={$addresses.invoice->id}&addaddress&realedit=1&id_order={$order->id}{if ($addresses.delivery->id == $addresses.invoice->id)}&address_type=2{/if}&back={$smarty.server.REQUEST_URI}&token={getAdminToken tab='AdminAddresses'}"><img src="../img/admin/edit.gif" /></a>
|
||||
</div>
|
||||
|
||||
{displayAddressDetail address=$addresses.invoice newLine='<br />'}
|
||||
{if $addresses.invoice->other}<hr />{$addresses.invoice->other}<br />{/if}
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="clear" style="margin-bottom: 10px;"></div>
|
||||
</div>
|
||||
|
||||
<form style="width: 98%" action="{$currentIndex}&vieworder&token={$smarty.get.token}" method="post" onsubmit="return orderDeleteProduct('{l s='Cannot return this product'}', '{l s='Quantity to cancel is greater than quantity available'}');">
|
||||
<input type="hidden" name="id_order" value="{$order->id}" />
|
||||
<fieldset style="width: 100%; ">
|
||||
<div style="display: none">
|
||||
<input type="hidden" value="{$order->getWarehouseList()|implode}" id="warehouse_list" />
|
||||
</div>
|
||||
<legend><img src="../img/admin/cart.gif" alt="{l s='Products'}" />{l s='Products'}</legend>
|
||||
<div style="float:left;width: 100%;">
|
||||
{if $can_edit}
|
||||
{if !$order->hasBeenDelivered()}<div style="float: left;"><a href="#" class="add_product button"><img src="../img/admin/add.gif" alt="{l s='Add a product'}" /> {l s='Add a product'}</a></div>{/if}
|
||||
<div style="float: right; margin-right: 10px" id="refundForm">
|
||||
<!--
|
||||
<a href="#" class="standard_refund"><img src="../img/admin/add.gif" alt="{l s='Proceed a standard refund'}" /> {l s='Proceed a standard refund'}</a>
|
||||
<a href="#" class="partial_refund"><img src="../img/admin/add.gif" alt="{l s='Proceed a partial refund'}" /> {l s='Proceed a partial refund'}</a>
|
||||
-->
|
||||
</div>
|
||||
<br clear="left" /><br />
|
||||
{/if}
|
||||
<table style="width: 100%;" cellspacing="0" cellpadding="0" class="table" id="orderProducts">
|
||||
<tr>
|
||||
<th height="39" align="center" style="width: 7%"> </th>
|
||||
<th>{l s='Product'}</th>
|
||||
<th style="width: 15%; text-align: center">{l s='UP'} <sup>*</sup></th>
|
||||
<th style="width: 4%; text-align: center">{l s='Qty'}</th>
|
||||
{if ($order->hasBeenPaid())}<th style="width: 3%; text-align: center">{l s='Refunded'}</th>{/if}
|
||||
{if ($order->hasBeenDelivered())}<th style="width: 3%; text-align: center">{l s='Returned'}</th>{/if}
|
||||
<th style="width: 3%; text-align: center">{l s='Stock'}</th>
|
||||
<th style="width: 10%; text-align: center">{l s='Total'} <sup>*</sup></th>
|
||||
<th colspan="2" style="display: none;" class="add_product_fields"> </th>
|
||||
<th colspan="2" style="display: none;" class="edit_product_fields"> </th>
|
||||
<th colspan="2" style="display: none;" class="standard_refund_fields"><img src="../img/admin/delete.gif" alt="{l s='Products'}" />
|
||||
{if ($order->hasBeenDelivered())}
|
||||
{l s='Return'}
|
||||
{elseif ($order->hasBeenPaid())}
|
||||
{l s='Refund'}
|
||||
{else}
|
||||
{l s='Cancel'}
|
||||
{/if}
|
||||
</th>
|
||||
<th style="width: 12%;text-align:right;display:none" class="partial_refund_fields">
|
||||
{l s='Partial refund'}
|
||||
</th>
|
||||
{if !$order->hasBeenDelivered()}
|
||||
<th style="width: 8%;text-align:center;">
|
||||
{l s='Action'}
|
||||
</th>
|
||||
{/if}
|
||||
</tr>
|
||||
|
||||
{foreach from=$products item=product key=k}
|
||||
{* Include customized datas partial *}
|
||||
{include file='controllers/orders/_customized_data.tpl'}
|
||||
|
||||
{* Include product line partial *}
|
||||
{include file='controllers/orders/_product_line.tpl'}
|
||||
{/foreach}
|
||||
{if $can_edit}
|
||||
{include file='controllers/orders/_new_product.tpl'}
|
||||
{/if}
|
||||
</table>
|
||||
|
||||
<div style="float:left; width:280px; margin-top:15px;">
|
||||
<sup>*</sup> {l s='According to the group of this customer, prices are printed:'}
|
||||
{if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)}
|
||||
{l s='tax excluded.'}
|
||||
{else}
|
||||
{l s='tax included.'}
|
||||
{/if}
|
||||
|
||||
{if Configuration::get('PS_ORDER_RETURN')}
|
||||
<br /><br />{l s='Merchandise returns are disabled'}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div style="float:right;">
|
||||
<table class="table" width="450px;" cellspacing="0" cellpadding="0">
|
||||
<tr id="total_products">
|
||||
<td width="150px;"><b>{l s='Products'}</b></td>
|
||||
<td class="amount" align="right">{displayPrice price=$order->total_products_wt currency=$currency->id}</td>
|
||||
<td class="partial_refund_fields current-edit" style="display:none;"> </td>
|
||||
</tr>
|
||||
<tr id="total_discounts" {if $order->total_discounts_tax_incl == 0}style="display: none;"{/if}>
|
||||
<td><b>{l s='Discounts'}</b></td>
|
||||
<td class="amount" align="right">-{displayPrice price=$order->total_discounts_tax_incl currency=$currency->id}</td>
|
||||
<td class="partial_refund_fields current-edit" style="display:none;"> </td>
|
||||
</tr>
|
||||
<tr id="total_wrapping" {if $order->total_wrapping_tax_incl == 0}style="display: none;"{/if}>
|
||||
<td><b>{l s='Wrapping'}</b></td>
|
||||
<td class="amount" align="right">{displayPrice price=$order->total_wrapping_tax_incl currency=$currency->id}</td>
|
||||
<td class="partial_refund_fields current-edit" style="display:none;"> </td>
|
||||
</tr>
|
||||
<tr id="total_shipping">
|
||||
<td><b>{l s='Shipping'}</b></td>
|
||||
<td class="amount" align="right">{displayPrice price=$order->total_shipping_tax_incl currency=$currency->id}</td>
|
||||
<td class="partial_refund_fields current-edit" style="display:none;"><input type="text" size="3" name="partialRefundShippingCost" /> €</td>
|
||||
</tr>
|
||||
<tr style="font-size: 20px" id="total_order">
|
||||
<td style="font-size: 20px">{l s='Total'}</td>
|
||||
<td class="amount" style="font-size: 20px" align="right">
|
||||
{displayPrice price=$order->total_paid_tax_incl currency=$currency->id}
|
||||
</td>
|
||||
<td class="partial_refund_fields current-edit" style="display:none;"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
|
||||
{if (sizeof($discounts) || $can_edit)}
|
||||
<div style="float:right; width:450px; margin-top:15px;">
|
||||
<table cellspacing="0" cellpadding="0" class="table" style="width:100%;">
|
||||
<tr>
|
||||
<th><img src="../img/admin/coupon.gif" alt="{l s='Discounts'}" />{l s='Discount name'}</th>
|
||||
<th align="center" style="width: 100px">{l s='Value'}</th>
|
||||
{if $can_edit}<th align="center" style="width: 30px">{l s='Action'}</th>{/if}
|
||||
</tr>
|
||||
{foreach from=$discounts item=discount}
|
||||
<tr>
|
||||
<td>{$discount['name']}</td>
|
||||
<td align="center">
|
||||
{if $discount['value'] != 0.00}
|
||||
-
|
||||
{/if}
|
||||
{displayPrice price=$discount['value'] currency=$currency->id}
|
||||
</td>
|
||||
{if $can_edit}
|
||||
<td class="center">
|
||||
<a href="{$currentIndex}&submitDeleteVoucher&id_order_cart_rule={$discount['id_order_cart_rule']}&id_order={$smarty.get.id_order|escape:'htmlall':'UTF-8'}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}"><img src="../img/admin/delete.gif" alt="{l s='Delete voucher'}" /></a>
|
||||
</td>
|
||||
{/if}
|
||||
</tr>
|
||||
{/foreach}
|
||||
{if $can_edit}
|
||||
<tr>
|
||||
<td colspan="3" class="center">
|
||||
<a href="#" id="add_voucher"><img src="../img/admin/add.gif" alt="{l s='Add'}" /> {l s='Add a new discount'}</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="display: none" >
|
||||
<td colspan="3" class="current-edit" id="voucher_form">
|
||||
{include file='controllers/orders/_discount_form.tpl'}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div style="clear:both; height:15px;"> </div>
|
||||
<div style="float: right; width: 160px; display: none;" class="standard_refund_fields">
|
||||
{if ($order->hasBeenDelivered() && Configuration::get('PS_ORDER_RETURN'))}
|
||||
<input type="checkbox" id="reinjectQuantities" name="reinjectQuantities" class="button" /> <label for="reinjectQuantities" style="float:none; font-weight:normal;">{l s='Re-stock products'}</label><br />
|
||||
{/if}
|
||||
{if ((!$order->hasBeenDelivered() && $order->hasBeenPaid()) || ($order->hasBeenDelivered() && Configuration::get('PS_ORDER_RETURN')))}
|
||||
<input type="checkbox" id="generateCreditSlip" name="generateCreditSlip" class="button" onclick="toogleShippingCost(this)" /> <label for="generateCreditSlip" style="float:none; font-weight:normal;">{l s='Generate a credit slip'}</label><br />
|
||||
<input type="checkbox" id="generateDiscount" name="generateDiscount" class="button" onclick="toogleShippingCost(this)" /> <label for="generateDiscount" style="float:none; font-weight:normal;">{l s='Generate a voucher'}</label><br />
|
||||
<span id="spanShippingBack" style="display:none;"><input type="checkbox" id="shippingBack" name="shippingBack" class="button" /> <label for="shippingBack" style="float:none; font-weight:normal;">{l s='Repay shipping costs'}</label><br /></span>
|
||||
{/if}
|
||||
{if (!$order->hasBeenDelivered() || ($order->hasBeenDelivered() && Configuration::get('PS_ORDER_RETURN')))}
|
||||
<div style="text-align:center; margin-top:5px;">
|
||||
<input type="submit" name="cancelProduct" value="{if $order->hasBeenDelivered()}{l s='Return products'}{elseif $order->hasBeenPaid()}{l s='Refund products'}{else}{l s='Cancel products'}{/if}" class="button" style="margin-top:8px;" />
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div style="float: right; width: 160px; display: none;" class="partial_refund_fields">
|
||||
<div style="text-align:center; margin-top:5px;">
|
||||
<input type="submit" name="partialRefund" value="{l s='Partial refund'}" class="button" style="margin-top:8px;" />
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
<div class="clear" style="height:20px;"> </div>
|
||||
|
||||
<div style="float: left">
|
||||
<form action="{$smarty.server.REQUEST_URI}&token={$smarty.get.token}" method="post" onsubmit="if (getE('visibility').checked == true) return confirm('{l s='Do you want to send this message to the customer?'}');">
|
||||
<fieldset style="width: 400px;">
|
||||
<legend style="cursor: pointer;" onclick="$('#message').slideToggle();$('#message_m').slideToggle();return false"><img src="../img/admin/email_edit.gif" /> {l s='New message'}</legend>
|
||||
<div id="message_m" style="display: {if Tools::getValue('message')}none{else}block{/if}; overflow: auto; width: 400px;">
|
||||
<a href="#" onclick="$('#message').slideToggle();$('#message_m').slideToggle();return false"><b>{l s='Click here'}</b> {l s='to add a comment or send a message to the customer'}</a>
|
||||
</div>
|
||||
<div id="message" style="display: {if Tools::getValue('message')}block{else}none{/if}">
|
||||
<select name="order_message" id="order_message" onchange="orderOverwriteMessage(this, '{l s='Do you want to overwrite your existing message?'}')">
|
||||
<option value="0" selected="selected">-- {l s='Choose a standard message'} --</option>
|
||||
{foreach from=$orderMessages item=orderMessage}
|
||||
<option value="{$orderMessage['message']|escape:'htmlall':'UTF-8'}">{$orderMessage['name']}</option>
|
||||
{/foreach}
|
||||
</select><br /><br />
|
||||
<b>{l s='Display to consumer?'}</b>
|
||||
<input type="radio" name="visibility" id="visibility" value="0" /> {l s='Yes'}
|
||||
<input type="radio" name="visibility" value="1" checked="checked" /> {l s='No'}
|
||||
<p id="nbchars" style="display:inline;font-size:10px;color:#666;"></p><br /><br />
|
||||
<textarea id="txt_msg" name="message" cols="50" rows="8" onKeyUp="var length = document.getElementById('txt_msg').value.length; if (length > 600) length = '600+'; document.getElementById('nbchars').innerHTML = '{l s='600 chars max'} (' + length + ')';">{Tools::getValue('message')|escape:'htmlall':'UTF-8'}</textarea><br /><br />
|
||||
<input type="hidden" name="id_order" value="{$order->id}" />
|
||||
<input type="hidden" name="id_customer" value="{$order->id_customer}" />
|
||||
<input type="submit" class="button" name="submitMessage" value="{l s='Send'}" />
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
{if (sizeof($messages))}
|
||||
<br />
|
||||
<fieldset style="width: 400px;">
|
||||
<legend><img src="../img/admin/email.gif" /> {l s='Messages'}</legend>
|
||||
{foreach from=$messages item=message}
|
||||
<div style="overflow:auto; width:400px;" {if $message['is_new_for_me']}class="new_message"{/if}>
|
||||
{if ($message['is_new_for_me'])}
|
||||
<a class="new_message" title="{l s='Mark this message as \'viewed\''}" href="{$smarty.server.REQUEST_URI}&token={$smarty.get.token}&messageReaded={$message['id_message']}"><img src="../img/admin/enabled.gif" alt="" /></a>
|
||||
{/if}
|
||||
{l s='At'} <i>{dateFormat date=$message['date_add']}
|
||||
</i> {l s='from'} <b>{if ($message['elastname'])}{$message['efirstname']} {$message['elastname']}{else}{$message['cfirstname']} {$message['clastname']}{/if}</b>
|
||||
{if ($message['private'] == 1)}<span style="color:red; font-weight:bold;">{l s='Private:'}</span>{/if}
|
||||
<p>{$message['message']|nl2br}</p>
|
||||
</div>
|
||||
<br />
|
||||
{/foreach}
|
||||
<p class="info">{l s='When you read a message, please click on the green check.'}</p>
|
||||
</fieldset>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
|
||||
<div class="clear"> </div>
|
||||
<br /><br /><a href="{$currentIndex}&token={$smarty.get.token}"><img src="../img/admin/arrow2.gif" /> {l s='Back to list'}</a><br />
|
||||
{/block}
|
||||
@@ -0,0 +1,30 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 9589 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{* Generate HTML code for printing Invoice Icon with link *}
|
||||
<span style="width:20px; margin-right:5px;">
|
||||
<a href="pdf.php?id_order_invoice={$id_invoice}&pdf"><img src="../img/admin/tab-invoice.gif" alt="invoice" /></a>
|
||||
</span>
|
||||
@@ -0,0 +1,99 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<form action="{$url_submit}" method="post" id="form_{$list['name_id']}">
|
||||
<fieldset>
|
||||
<legend><img src="../img/admin/{$list['icon']}.gif" />{$list['title']}</legend>
|
||||
<p>{$list['desc']}<p>
|
||||
<table cellpadding="0" cellspacing="0" class="table">
|
||||
<tr>
|
||||
<th style="width: 200px">{$list['title']}</th>
|
||||
{foreach $payment_modules as $module}
|
||||
{if $module->active}
|
||||
<th>
|
||||
{if $list['name_id'] != 'currency' || $module->currencies_mode == 'checkbox'}
|
||||
<input type="hidden" id="checkedBox_{$list['name_id']}_{$module->name}" value="checked">
|
||||
<a href="javascript:checkPaymentBoxes('{$list['name_id']}', '{$module->name}')" style="text-decoration:none;">
|
||||
{/if}
|
||||
<img src="{$ps_base_uri}modules/{$module->name}/logo.gif" alt="{$module->name}" title="{$module->displayName}" />
|
||||
{if $list['name_id'] != 'currency' || $module->currencies_mode == 'checkbox'}
|
||||
</a>
|
||||
{/if}
|
||||
</th>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</tr>
|
||||
{foreach $list['items'] as $item}
|
||||
<tr class="{cycle values=",alt_row"}">
|
||||
<td>{$item['name']}</td>
|
||||
{foreach $payment_modules as $key_module => $module}
|
||||
{if $module->active}
|
||||
<td style="text-align: center">
|
||||
{if !$item['check_list'][$key_module]}
|
||||
--
|
||||
{elseif $list['name_id'] === 'currency'}
|
||||
{if $module->currencies && $module->currencies_mode == 'checkbox'}
|
||||
{$type = 'checkbox'}
|
||||
{elseif $module->currencies && $module->currencies_mode == 'radio'}
|
||||
{$type = 'radio'}
|
||||
{/if}
|
||||
{else}
|
||||
{$type = 'checkbox'}
|
||||
{/if}
|
||||
{if isset($type)}
|
||||
<input type="checkbox" name="{$module->name}_{$list['name_id']}[]" value="{$item[$list['identifier']]}"
|
||||
{if $item['check_list'][$key_module] == 'checked'}checked="checked"{/if}
|
||||
/>
|
||||
{else}
|
||||
--
|
||||
{/if}
|
||||
</td>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</tr>
|
||||
{/foreach}
|
||||
{if $list['name_id'] === 'currency'}
|
||||
<tr class="{cycle values=",alt_row"}">
|
||||
<td>{l s='Customer currency'}</td>
|
||||
{foreach $payment_modules as $module}
|
||||
{if $module->active}
|
||||
<td style="text-align: center">{if $module->currencies && $module->currencies_mode == 'radio'}<input type="radio" name="{$module->name}_{$list['name_id']}[]" value="-1"{if in_array(-1, $module->$list['name_id'])} checked="checked"{/if} />{else}--{/if}</td>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</tr>
|
||||
<tr class="{cycle values=",alt_row"}">
|
||||
<td>{l s='Shop default currency'}</td>
|
||||
{foreach $payment_modules as $module}
|
||||
{if $module->active}
|
||||
<td style="text-align: center">{if $module->currencies && $module->currencies_mode == 'radio'}<input type="radio" name="{$module->name}_{$list['name_id']}[]" value="-2"{if in_array(-2, $module->$list['name_id'])} checked="checked"{/if} />{else}--{/if}</td>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</tr>
|
||||
{/if}
|
||||
</table>
|
||||
<div><input type="submit" class="button space" name="submitModule{$list['name_id']}" value="{l s='Save restrictions'}" /></div>
|
||||
</fieldset>
|
||||
</form>
|
||||
@@ -0,0 +1,50 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 9635 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{extends file="helper/view/view.tpl"}
|
||||
{block name="override_tpl"}
|
||||
{if !$shop_context}
|
||||
<div class="warn">{l s='You have more than one shop. You need to select one to configure payment.'}</div>
|
||||
{else}
|
||||
<h2 class="space">{l s='Payment modules list'}</h2>
|
||||
{if isset($url_modules)}
|
||||
<input type="button" class="button" onclick="document.location='{$url_modules}'" value="{l s='Click to see the list of payment modules.'}" /><br>
|
||||
{/if}
|
||||
|
||||
<br />
|
||||
|
||||
{if $display_restrictions}
|
||||
<br /><h2 class="space">{l s='Payment module restrictions'}</h2>
|
||||
{foreach $lists as $list}
|
||||
{include file='controllers/payment/restrictions.tpl'}
|
||||
<br />
|
||||
{/foreach}
|
||||
{else}
|
||||
<br />
|
||||
<div class='warn'>{l s='No payment module installed'}</div>
|
||||
{/if}
|
||||
{/if}
|
||||
{/block}
|
||||
@@ -0,0 +1,179 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 9795 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{extends file="helper/form/form.tpl"}
|
||||
|
||||
{block name="label"}
|
||||
|
||||
{if $input.type == 'text' && $input.name == 'ps_cache_fs_directory_depth'}
|
||||
<div id="directory_depth">
|
||||
<div class="warn">{l s='The system CacheFS should be used only when the infrastructure contain only one front-end server. Ask your hosting company if you don\'t know.'}</div>
|
||||
{/if}
|
||||
|
||||
{if isset($input.label)}
|
||||
<label>{$input.label} </label>
|
||||
{/if}
|
||||
|
||||
{/block}
|
||||
|
||||
{block name="start_field_block"}
|
||||
<div class="margin-form">
|
||||
{if $input.type == 'radio' && $input.name == 'combination' && $input.disabled}
|
||||
<div class="warn">
|
||||
{l s='This feature can\'t be disabled because this is currently in use.'}
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block name="end_field_block"}
|
||||
{if $input.type == 'radio' && $input.name == 'combination'}
|
||||
<ul style="list-style-type:disc;margin:0 0 0 30px;">
|
||||
<li>{l s='Combinations tab on product page'}</li>
|
||||
<li>{l s='Attribute'}</li>
|
||||
<li>{l s='Group of attribute'}</li>
|
||||
</ul>
|
||||
{elseif $input.type == 'radio' && $input.name == 'feature'}
|
||||
<ul style="list-style-type:disc;margin:0 0 0 30px;">
|
||||
<li>{l s='Features tab on product page'}</li>
|
||||
<li>{l s='Feature'}</li>
|
||||
<li>{l s='Feature value'}</li>
|
||||
</ul>
|
||||
{elseif $input.type == 'text' && $input.name == 'ps_cache_fs_directory_depth'}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block name="other_input"}
|
||||
{if $key == 'memcachedServers'}
|
||||
<div id="memcachedServers">
|
||||
<div class="margin-form">
|
||||
<a id="addMemcachedServer" class="button" href="#" ><img src="../img/admin/add.gif" />{l s='Add server'}</a>
|
||||
</div>
|
||||
<div id="formMemcachedServer" style="margin-top: 10px; display:none;">
|
||||
<form action="{$current}&token={$token}" method="post">
|
||||
<label>{l s='IP Address:'} </label>
|
||||
<div class="margin-form">
|
||||
<input type="text" name="memcachedIp" />
|
||||
</div>
|
||||
<label>{l s='Port:'} </label>
|
||||
<div class="margin-form">
|
||||
<input type="text" name="memcachedPort" value="11211" />
|
||||
</div>
|
||||
<label>{l s='Weight:'} </label>
|
||||
<div class="margin-form">
|
||||
<input type="text" name="memcachedWeight" value="1" />
|
||||
</div>
|
||||
<div class="margin-form">
|
||||
<input type="submit" value="{l s=' Add Server '}" name="submitAddServer" class="button" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{if $servers}
|
||||
<div class="margin-form">
|
||||
<table style="width: 320px;" cellspacing="0" cellpadding="0" class="table">
|
||||
<tr>
|
||||
<th style="width: 20px; text-align: center">{l s='Id'}</th>
|
||||
<th style="width: 200px; text-align: center">{l s='Ip'}</th>
|
||||
<th style="width: 50px; text-align: center">{l s='Port'}</th>
|
||||
<th style="width: 30px; text-align: right; font-weight: bold;">{l s='Weight'}</th>
|
||||
<th style="width: 20px; text-align: right;"> </th>
|
||||
</tr>
|
||||
{foreach $servers AS $server}
|
||||
<tr>
|
||||
<td>{$server.id_memcached_server}</td>
|
||||
<td>{$server.ip}</td>
|
||||
<td>{$server.port}</td>
|
||||
<td>{$server.weight}</td>
|
||||
<td>
|
||||
<a href="{$current}&token={$token}&deleteMemcachedServer={$server.id_memcached_server}" >
|
||||
<img src="../img/admin/delete.gif" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block name="script"}
|
||||
|
||||
function showMemcached()
|
||||
{
|
||||
if ($('#caching_system option:selected').val() == 'CacheMemcache')
|
||||
{
|
||||
$('#memcachedServers').show();
|
||||
$('#directory_depth').hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#memcachedServers').hide();
|
||||
$('#directory_depth').show();
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
showMemcached();
|
||||
|
||||
$('#caching_system').change(function() {
|
||||
showMemcached();
|
||||
});
|
||||
|
||||
$('#addMemcachedServer').click(function() {
|
||||
$('#formMemcachedServer').show();
|
||||
return false;
|
||||
});
|
||||
|
||||
$('input[name="smarty_force_compile"], input[name="smarty_cache"], input[name="smarty_console"]').change(function(){
|
||||
$('#smarty_up').val(1);
|
||||
});
|
||||
|
||||
$('input[name="combination"], input[name="feature"]').change(function(){
|
||||
$('#features_detachables_up').val('true');
|
||||
});
|
||||
|
||||
$('input[name="PS_CSS_THEME_CACHE"], input[name="PS_JS_THEME_CACHE"], input[name="PS_HTML_THEME_COMPRESSION"], input[name="PS_JS_HTML_THEME_COMPRESSION"], input[name="PS_HIGH_HTML_THEME_COMPRESSION"]').change(function(){
|
||||
$('#ccc_up').val(1);
|
||||
});
|
||||
|
||||
$('input[name="_MEDIA_SERVER_1_"], input[name="_MEDIA_SERVER_2_"], input[name="_MEDIA_SERVER_3_"]').change(function(){
|
||||
$('#media_server_up').val(1);
|
||||
});
|
||||
|
||||
$('input[name="PS_CIPHER_ALGORITHM"]').change(function(){
|
||||
$('#ciphering_up').val(1);
|
||||
});
|
||||
|
||||
$('input[name="active"], select[name="caching_system"]').change(function(){
|
||||
$('#cache_up').val(1);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
{/block}
|
||||
@@ -0,0 +1,47 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 9540 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{extends file="helper/options/options.tpl"}
|
||||
{block name="start_field_block"}
|
||||
{if $field['type'] == 'disabled'}
|
||||
<div class="margin-form">
|
||||
{$field['disabled']}
|
||||
{elseif $field['type'] == 'maintenance_ip'}
|
||||
<div class="margin-form">
|
||||
{$field['script_ip']}
|
||||
<input type="text"{if isset($field['id'])} id="{$field['id']}"{/if} size="{if isset($field['size'])}{$field['size']|intval}{else} 5{/if}" name="{$key}" value="{$field['value']|escape:'htmlall':'UTF-8'}" />
|
||||
{$field['link_remove_ip']}
|
||||
{else}
|
||||
<div class="margin-form">
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block name="end_field_block"}
|
||||
{if $field['type'] == 'checkbox_table'}
|
||||
<div class="clear"></div>
|
||||
<br />
|
||||
{/if}
|
||||
{/block}
|
||||
@@ -0,0 +1,64 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 9856 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function() {
|
||||
$('input').keypress(function(e) {
|
||||
var code = null;
|
||||
code = (e.keyCode ? e.keyCode : e.which);
|
||||
return (code == 13) ? false : true;
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
{if isset($product->id)}
|
||||
|
||||
<h4>{l s='Accounting'}</h4>
|
||||
<div class="separation"></div>
|
||||
{if !empty($error)}
|
||||
<div class="hint" style="display:block">{$error}</div>
|
||||
{else}
|
||||
<div class="hint" style="display:block">
|
||||
{l s='Configure the account number of the product for each zone, if a field is empty, it will use the default one of the shop set in the Accounting Management tab'}
|
||||
</div>
|
||||
<h3>{l s='Account number'}</h3>
|
||||
<br />
|
||||
{foreach from=$productAccountNumberList['zones'] key=id_zone item=currentZone}
|
||||
<label>{$currentZone['name']}</label>
|
||||
<div class="margin-form">
|
||||
<input type="text" name="zone_{$id_zone}" value="{$currentZone['account_number']}" />
|
||||
</div>
|
||||
{/foreach}
|
||||
</form>
|
||||
<div style="text-align:left; font-size:11px;">
|
||||
<i>{l s='These fields are used for the accounting export'}</i>
|
||||
</div>
|
||||
<div class="separation"></div>
|
||||
{/if}
|
||||
|
||||
{/if}
|
||||
@@ -0,0 +1,163 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('input').keypress(function(e) {
|
||||
var code = null;
|
||||
code = (e.keyCode ? e.keyCode : e.which);
|
||||
return (code == 13) ? false : true;
|
||||
});
|
||||
|
||||
searchCategory();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<div class="Associations">
|
||||
<h4>{l s='Associations'}</h4>
|
||||
<div class="separation"></div>
|
||||
<div id="no_default_category" class="hint">
|
||||
{l s='Please check a category in order to select the default category.'}
|
||||
</div>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="col-left">
|
||||
<label for="category_block">{l s='Associated categories:'}</label>
|
||||
</td>
|
||||
<td class="col-right">
|
||||
<div id="category_block">{$category_tree}</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-left">
|
||||
<label for="id_category_default">{l s='Default category:'}</label>
|
||||
</td>
|
||||
<td class="col-right">
|
||||
<select id="id_category_default" name="id_category_default">
|
||||
{foreach from=$selected_cat item=cat}
|
||||
<option value="{$cat.id_category}" {if $product->id_category_default == $cat.id_category}selected="selected"{/if} >{$cat.name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
<div class="hint" style="display:block;">{l s='The default category is the category who is displayed by default.'}</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{if $feature_shop_active}
|
||||
<div class="separation"></div>
|
||||
{* @todo use asso_shop from Helper *}
|
||||
<label>{l s='Shop association:'}</label>
|
||||
{$displayAssoShop}
|
||||
{/if}
|
||||
|
||||
<div class="separation"></div>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='Accessories:'}</label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<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|htmlentitiesUTF8}¤{/foreach}" />
|
||||
|
||||
<div id="ajax_choose_product">
|
||||
<p style="clear:both;margin-top:0;">
|
||||
<input type="text" value="" id="product_autocomplete_input" />
|
||||
{l s='Begin typing the first letters of the product name, then select the product from the drop-down list'}
|
||||
</p>
|
||||
<p class="preference_description">{l s='(Do not forget to Save the product afterward)'}</p>
|
||||
<!--<img onclick="$(this).prev().search();" style="cursor: pointer;" src="../img/admin/add.gif" alt="{l s='Add an accessory'}" title="{l s='Add an accessory'}" />-->
|
||||
</div>
|
||||
<div id="divAccessories">
|
||||
{* @todo : donot use 3 foreach, but assign var *}
|
||||
{foreach from=$accessories item=accessory}
|
||||
{$accessory.name|htmlentitiesUTF8}{if !empty($accessory.reference)}{$accessory.reference}{/if}
|
||||
<span onclick="delAccessory({$accessory.id_product});" style="cursor: pointer;">
|
||||
<img src="../img/admin/delete.gif" class="middle" alt="" />
|
||||
</span><br />
|
||||
{/foreach}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<br />
|
||||
<td class="col-left"><label>{l s='Manufacturer:'}</label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<select name="id_manufacturer" id="id_manufacturer">
|
||||
<option value="0">-- {l s='Choose (optional)'} --</option>
|
||||
{if $product->id_manufacturer}
|
||||
<option value="{$product->id_manufacturer}" selected="selected">{$product->manufacturer_name}</option>
|
||||
{/if}
|
||||
<option disabled="disabled">----------</option>
|
||||
</select>
|
||||
<a href="{$link->getAdminLink('AdminManufacturers')}&addmanufacturer" class="confirm_leave">
|
||||
<img src="../img/admin/add.gif" alt="{l s='Create'}" title="{l s='Create'}" /> <b>{l s='Create'}</b>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var formProduct;
|
||||
var accessories = new Array();
|
||||
urlToCall = null;
|
||||
/* function autocomplete */
|
||||
$(document).ready(function() {
|
||||
$('#product_autocomplete_input')
|
||||
.autocomplete('ajax_products_list.php', {
|
||||
minChars: 1,
|
||||
autoFill: true,
|
||||
max:20,
|
||||
matchContains: true,
|
||||
mustMatch:true,
|
||||
scroll:false,
|
||||
cacheLength:0,
|
||||
formatItem: function(item) {
|
||||
return item[1]+' - '+item[0];
|
||||
}
|
||||
}).result(addAccessory);
|
||||
|
||||
$('#product_autocomplete_input').setOptions({
|
||||
extraParams: {
|
||||
excludeIds : getAccessorieIds()
|
||||
}
|
||||
});
|
||||
|
||||
getManufacturers();
|
||||
});
|
||||
|
||||
function getAccessorieIds()
|
||||
{
|
||||
var ids = {$product->id}+',';
|
||||
ids += $('#inputAccessories').val().replace(/\\-/g,',').replace(/\\,$/,'');
|
||||
ids = ids.replace(/\,$/,'');
|
||||
|
||||
return ids;
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,145 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 8971 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function() {
|
||||
$('input').keypress(function(e) {
|
||||
var code = null;
|
||||
code = (e.keyCode ? e.keyCode : e.which);
|
||||
return (code == 13) ? false : true;
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
{if isset($obj->id)}
|
||||
|
||||
<h4>{l s='Attachment'}</h4>
|
||||
<div class="separation"></div>
|
||||
<fieldset style="border:none;">
|
||||
<label>{l s='Filename:'} </label>
|
||||
<div class="margin-form translatable">
|
||||
{foreach $languages as $language}
|
||||
<div class="lang_{$language.id_lang}" style="{if $language.id_lang != $default_form_language}display:none;{/if}float: left;">
|
||||
<input type="text" name="attachment_name_{$language.id_lang}" value="{$attachment_name[$language.id_lang]}" />
|
||||
</div>
|
||||
{/foreach}
|
||||
<sup> *</sup>
|
||||
<p class="preference_description">{l s='Maximum 32 characters.'}</p>
|
||||
</div>
|
||||
<div class="clear"> </div>
|
||||
<label>{l s='Description:'} </label>
|
||||
<div class="margin-form translatable">
|
||||
{foreach $languages as $language}
|
||||
<div id="attachment_description_{$language.id_lang}" style="display: {if $language.id_lang == $default_form_language}block{else}none{/if}; float: left;">
|
||||
<textarea name="attachment_description_{$language.id_lang}">{$attachment_description[$language.id_lang]}</textarea>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
<div class="clear"> </div>
|
||||
<label>{l s='File'}</label>
|
||||
<div class="margin-form">
|
||||
<p><input type="file" name="attachment_file" /></p>
|
||||
<p class="preference_description">{l s='Upload file from your computer'} ({$PS_ATTACHMENT_MAXIMUM_SIZE} {l s='Mo maximum'})</p>
|
||||
</div>
|
||||
<div class="clear"> </div>
|
||||
<div class="margin-form">
|
||||
<input type="submit" value="{l s='Download a attachment file'}" name="submitAddAttachments" class="button" />
|
||||
</div>
|
||||
<div class="small"><sup>*</sup> {l s='Required field'}</div>
|
||||
</fieldset>
|
||||
<div class="separation"></div>
|
||||
<div class="clear"> </div>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<p>{l s='Available attachments:'}</p>
|
||||
<select multiple id="selectAttachment2" style="width:300px;height:160px;">
|
||||
{foreach $attach2 as $attach}
|
||||
<option value="{$attach.id_attachment}">{$attach.name}</option>
|
||||
{/foreach}
|
||||
</select><br /><br />
|
||||
<a href="#" id="addAttachment" style="text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px">
|
||||
{l s='Add'} >>
|
||||
</a>
|
||||
</td>
|
||||
<td style="padding-left:20px;">
|
||||
<p>{l s='Attachments for this product:'}</p>
|
||||
<select multiple id="selectAttachment1" name="attachments[]" style="width:300px;height:160px;">
|
||||
{foreach $attach1 as $attach}
|
||||
<option value="{$attach.id_attachment}">{$attach.name}</option>
|
||||
{/foreach}
|
||||
</select><br /><br />
|
||||
<a href="#" id="removeAttachment" style="text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px">
|
||||
<< {l s='Remove'}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="clear"> </div>
|
||||
<input type="hidden" name="arrayAttachments" id="arrayAttachments" value="{foreach $attach1 as $attach}{$attach.id_attachment},{/foreach}" />
|
||||
<input type="submit" name="submitAttachments" id="submitAttachments" value="{l s='Update attachments'}" class="button" />
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
//displayFlags(languages, id_language, allowEmployeeFormLang);
|
||||
$(document).ready(function() {
|
||||
|
||||
$("#addAttachment").live('click', function() {
|
||||
$("#selectAttachment2 option:selected").each(function(){
|
||||
var val = $('#arrayAttachments').val();
|
||||
var tab = val.split(',');
|
||||
for (var i=0; i < tab.length; i++)
|
||||
if (tab[i] == $(this).val())
|
||||
return false;
|
||||
$('#arrayAttachments').val(val+$(this).val()+',');
|
||||
});
|
||||
return !$("#selectAttachment2 option:selected").remove().appendTo("#selectAttachment1");
|
||||
});
|
||||
$("#removeAttachment").live('click', function() {
|
||||
$("#selectAttachment1 option:selected").each(function(){
|
||||
var val = $('#arrayAttachments').val();
|
||||
var tab = val.split(',');
|
||||
var tabs = '';
|
||||
for (var i=0; i < tab.length; i++)
|
||||
if (tab[i] != $(this).val())
|
||||
{
|
||||
tabs = tabs+','+tab[i];
|
||||
$('#arrayAttachments').val(tabs);
|
||||
}
|
||||
});
|
||||
return !$("#selectAttachment1 option:selected").remove().appendTo("#selectAttachment2");
|
||||
});
|
||||
$("#product").submit(function() {
|
||||
$("#selectAttachment1 option").each(function(i) {
|
||||
$(this).attr("selected", "selected");
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
{/if}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 9197 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<a class="pointer default" onclick="javascript:defaultProductAttribute('{$id}', '{getAdminToken tab='AdminProducts'}', $(this).parent('td').parent('tr'));" title="{$action}" >
|
||||
<img src="../img/admin/asterisk.gif" alt="{$action}" />
|
||||
</a>
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 9197 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<a class="pointer delete" onclick="javascript:deleteProductAttribute('{$id}', '{getAdminToken tab='AdminProducts'}', $(this).parent('td').parent('tr'));" title="{$action}" >
|
||||
<img src="../img/admin/delete.gif" alt="{$action}" />
|
||||
</a>
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 9197 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<a class="pointer edit" onclick="javascript:editProductAttribute('{$id}', '{getAdminToken tab='AdminProducts'}');" title="{l s='Modify this combination'}" ids="{$id}" token="{getAdminToken tab='AdminProducts'}">
|
||||
<img src="../img/admin/edit.gif" alt="{l s='Modify this combination'}" />
|
||||
</a>
|
||||
@@ -0,0 +1,50 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 10634 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{extends file="helper/list/list_footer.tpl"}
|
||||
|
||||
{block name="after"}
|
||||
|
||||
<div class="hint" style="display:block">
|
||||
<ul>
|
||||
<li>{l s='The row in blue is the default combination.'}</li>
|
||||
<li>{l s='A default combination must be designated for each product.'}</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var impact = getE('attribute_price_impact');
|
||||
var impact2 = getE('attribute_weight_impact');
|
||||
|
||||
var s_attr_group = $('#span_new_group');
|
||||
var s_attr_name = $('#span_new_attr');
|
||||
var s_impact = $('#span_impact');
|
||||
var s_impact2 = $('#span_weight_impact');
|
||||
|
||||
init_elems();
|
||||
</script>
|
||||
|
||||
{/block}
|
||||
@@ -0,0 +1,338 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function() {
|
||||
$('input').keypress(function(e) {
|
||||
var code = null;
|
||||
code = (e.keyCode ? e.keyCode : e.which);
|
||||
return (code == 13) ? false : true;
|
||||
});
|
||||
});
|
||||
|
||||
{if $product->is_virtual}
|
||||
$('#virtual_good_attributes').show();
|
||||
{else}
|
||||
$('#virtual_good_attributes').hide();
|
||||
{/if}
|
||||
|
||||
var msg_combination_1 = '{l s='Please choose a group'}';
|
||||
var msg_combination_2 = '{l s='Please choose an attribute'}';
|
||||
var msg_combination_3 = '{l s='You can only add one combination per type of group'}';
|
||||
|
||||
</script>
|
||||
|
||||
{if isset($product->id)}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$('#id_mvt_reason').change(function(){
|
||||
updateMvtStatus($(this).val());
|
||||
});
|
||||
updateMvtStatus($(this).val());
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
var attrs = new Array();
|
||||
var modifyattributegroup = "{l s='Modify this attribute combination' js=1}";
|
||||
attrs[0] = new Array(0, "---");
|
||||
{foreach from=$attributeJs key=idgrp item=group}
|
||||
attrs[{$idgrp}] = new Array(0
|
||||
, '---'
|
||||
{foreach from=$group key=idattr item=attrname}
|
||||
, "{$idattr}", "{$attrname|addslashes}"
|
||||
{/foreach}
|
||||
);
|
||||
{/foreach}
|
||||
</script>
|
||||
<h4>{l s='Add or modify combinations for this product'}</h4>
|
||||
<div class="separation"></div> {l s='or go to'}
|
||||
<a class="button bt-icon confirm_leave" href="index.php?tab=AdminAttributeGenerator&id_product={$product->id}&attributegenerator&token={$token_generator}"><img src="../img/admin/appearance.gif" alt="combinations_generator" class="middle" title="{l s='Product combinations generator'}" /><span>{l s='Product combinations generator'}</span></a>
|
||||
<div class="separation"></div>
|
||||
|
||||
<div id="add_new_combination" style="display: none;">
|
||||
<table cellpadding="5" style="width:100%">
|
||||
<tr>
|
||||
<td style="width:150px;vertical-align:top;text-align:right;padding-right:10px;font-weight:bold;" valign="top">
|
||||
{l s='Group:'}
|
||||
</td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<select name="attribute_group" id="attribute_group" style="width: 200px;" onchange="populate_attrs();">
|
||||
{if isset($attributes_groups)}
|
||||
{foreach from=$attributes_groups key=k item=attribute_group}
|
||||
<option value="{$attribute_group.id_attribute_group}">{$attribute_group.name|htmlentitiesUTF8} </option>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:150px;vertical-align:top;text-align:right;padding-right:10px;font-weight:bold;" valign="top">
|
||||
{l s='Attribute:'}
|
||||
</td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<select name="attribute" id="attribute" style="width: 200px;">
|
||||
<option value="0">---</option>
|
||||
</select>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
populate_attrs();
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:150px;vertical-align:top;text-align:right;padding-right:10px;font-weight:bold;" valign="top">
|
||||
<input style="width: 140px; margin-bottom: 10px;" type="button" value="{l s='Add'}" class="button" onclick="add_attr();"/><br />
|
||||
<input style="width: 140px;" type="button" value="{l s='Delete'}" class="button" onclick="del_attr()"/></td>
|
||||
<td align="left">
|
||||
<select id="product_att_list" name="attribute_combinaison_list[]" multiple="multiple" size="4" style="width: 320px;"></select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div class="separation"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:150px;vertical-align:top;text-align:right;padding-right:10px;font-weight:bold;">{l s='Reference:'}</td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<input size="55" type="text" id="attribute_reference" name="attribute_reference" value="" style="width: 130px; margin-right: 44px;" />
|
||||
{l s='EAN13:'}<input size="55" maxlength="13" type="text" id="attribute_ean13" name="attribute_ean13" value="" style="width: 110px; margin-left: 10px; margin-right: 44px;" />
|
||||
{l s='UPC:'}<input size="55" maxlength="12" type="text" id="attribute_upc" name="attribute_upc" value="" style="width: 110px; margin-left: 10px; margin-right: 44px;" />
|
||||
<span class="hint" name="help_box">{l s='Special characters allowed:'} .-_#<span class="hint-pointer"> </span></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div class="separation"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellpadding="5" id="virtual_good_attributes" style="width:100%;display:none;">
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div style="padding:5px;width:50%;float:left;margin-right:20px;border-right:1px solid #E0D0B1">
|
||||
<h3>{l s='Virtual product'}</h3>
|
||||
<p>{l s='Your server\'s maximum upload file size is'}: {$upload_max_filesize}</p>
|
||||
<label id="virtual_product_file_attribute_label" for="virtual_product_file_attribute" class="t">{l s='Upload a file'}</label>
|
||||
<p><input id="virtual_product_file_attribute" name="virtual_product_file_attribute" onchange="uploadFile2();" maxlength="'.$this->maxFileSize.'" type="file"></p>
|
||||
<div id="upload-confirmation2">
|
||||
|
||||
<p id="gethtmlink" style="display: none;">{l s='This is the link'} : {$product->productDownload->getHtmlLink(false, true)}
|
||||
<a id="make_downloadable_product_attribute" onclick="return confirm('{l s='Delete this file' js=1}')" href="index.php?tab=AdminProducts&id_product={$product->productDownload->id_product}&id_category={$id_category}&token={$token}&deleteVirtualProductAttribute=true" class="red">{l s='Delete this file'}</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<a id="delete_downloadable_product_attribute" style="display:none;" onclick="return confirm('{l s='Delete this file' js=1}')" href="index.php?tab=AdminProducts&id_product={$product->id}&id_category={$id_category}&token={$token}&deleteVirtualProductAttribute=true" class="red">{l s='Delete this file'}</a>
|
||||
{if $up_filename}
|
||||
<input type="hidden" id="virtual_product_filename_attribute" name="virtual_product_filename_attribute" value="{$up_filename}" />
|
||||
{/if}
|
||||
|
||||
<p class="block">
|
||||
<label for="virtual_product_name_attribute" class="t">{l s='Filename'}</label>
|
||||
<input id="virtual_product_name_attribute" name="virtual_product_name_attribute" style="width:200px" value="" type="text">
|
||||
<span class="hint" name="help_box" style="display:none;">{l s='The full filename with its extension (e.g., Book.pdf)'}</span>
|
||||
</p>
|
||||
</div>
|
||||
<div id="virtual_good_more_attribute" style="padding:5px;width:40%;float:left;margin-left:10px">
|
||||
<p class="block">
|
||||
<label for="virtual_product_nb_downloable" class="t">{l s='Number of downloads'}</label>
|
||||
<input type="text" id="virtual_product_nb_downloable_attribute" name="virtual_product_nb_downloable_attribute" value="" class="" size="6" />
|
||||
<span class="hint" name="help_box" style="display:none">{l s='Number of authorized downloads per customer'}</span>
|
||||
</p>
|
||||
<p class="block">
|
||||
<label for="virtual_product_expiration_date_attribute" class="t">{l s='Expiration date'}</label>
|
||||
<input class="datepicker" type="text" id="virtual_product_expiration_date_attribute" name="virtual_product_expiration_date_attribute" value="" size="11" maxlength="10" autocomplete="off" /> {l s='Format: YYYY-MM-DD'}
|
||||
<span class="hint" name="help_box" style="display:none">{l s='No expiration date if you leave this blank'}</span>
|
||||
</p>
|
||||
<p class="block">
|
||||
<label for="virtual_product_nb_days" class="t">{l s='Number of days'}</label>
|
||||
<input type="text" id="virtual_product_nb_days_attribute" name="virtual_product_nb_days_attribute" value="" class="" size="4" /><sup> *</sup>
|
||||
<span class="hint" name="help_box" style="display:none">{l s='How many days this file can be accessed by customers'} - <em>({l s='set to zero for unlimited access'} ) </em></span>
|
||||
</p>
|
||||
<p class="block">
|
||||
<label for="virtual_product_is_shareable_attribute" class="t">{l s='is shareable'}</label>
|
||||
<input type="checkbox" id="virtual_product_is_shareable_attribute" name="virtual_product_is_shareable" value="1" />
|
||||
<span class="hint" name="help_box" style="display:none">{l s='Specify if the file can be shared'}</span>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div class="separation"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td style="width:150px;vertical-align:top;text-align:right;padding-right:10px;font-weight:bold;">
|
||||
{l s='Wholesale price:'}
|
||||
</td>
|
||||
<td style="padding-bottom:5px;">
|
||||
{if $currency->format % 2 != 0}{$currency->sign}{/if}
|
||||
<input type="text" size="6" name="attribute_wholesale_price" id="attribute_wholesale_price" value="" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" />
|
||||
{if $currency->format % 2 == 0} {$currency->sign} {/if}<span id="attribute_wholesale_price_blank">({l s='leave blank if the price does not change'})</span>
|
||||
<span style="display:none" id="attribute_wholesale_price_full">({l s='overrides Wholesale price on Information tab'})</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:150px;vertical-align:top;text-align:right;padding-right:10px;font-weight:bold;">{l s='Impact on price:'}</td>
|
||||
<td colspan="2" style="padding-bottom:5px;">
|
||||
<select name="attribute_price_impact" id="attribute_price_impact" style="width: 140px;" onchange="check_impact(); calcImpactPriceTI();">
|
||||
<option value="0">{l s='None'}</option>
|
||||
<option value="1">{l s='Increase'}</option>
|
||||
<option value="-1">{l s='Reduction'}</option>
|
||||
</select>
|
||||
<span id="span_impact"> {l s='of'} {if $currency->format % 2 != 0}{$currency->sign} {/if}
|
||||
<input type="text" size="6" name="attribute_price" id="attribute_price" value="0.00" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.'); calcImpactPriceTI();"/>{if $currency->format % 2 == 0} {$currency->sign}{/if}
|
||||
{if $country_display_tax_label}
|
||||
{l s='(tax excl.)'}
|
||||
<span {if $tax_exclude_option}style="display:none"{/if}> {l s='or'}
|
||||
{if $currency->format % 2 != 0}{$currency->sign} {/if}
|
||||
<input type="text" size="6" name="attribute_priceTI" id="attribute_priceTI" value="0.00" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.'); calcImpactPriceTE();"/>
|
||||
{if $currency->format % 2 == 0} {$currency->sign}{/if} {l s='(tax incl.)'}
|
||||
</span> {l s='final product price will be set to'}
|
||||
{if $currency->format % 2 != 0}{$currency->sign} {/if}
|
||||
<span id="attribute_new_total_price">0.00</span>
|
||||
{if $currency->format % 2 == 0}{$currency->sign} {/if}
|
||||
{/if}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:150px;vertical-align:top;text-align:right;padding-right:10px;font-weight:bold;">{l s='Impact on weight:'}</td>
|
||||
<td colspan="2" style="padding-bottom:5px;">
|
||||
<select name="attribute_weight_impact" id="attribute_weight_impact" style="width: 140px;" onchange="check_weight_impact();">
|
||||
<option value="0">{l s='None'}</option>
|
||||
<option value="1">{l s='Increase'}</option>
|
||||
<option value="-1">{l s='Reduction'}</option>
|
||||
</select>
|
||||
<span id="span_weight_impact"> {l s='of'}
|
||||
<input type="text" size="6" name="attribute_weight" id="attribute_weight" value="0.00" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" />
|
||||
{$ps_weight_unit}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tr_unit_impact">
|
||||
<td style="width:150px;vertical-align:top;text-align:right;padding-right:10px;font-weight:bold;">{l s='Impact on unit price :'}</td>
|
||||
<td colspan="2" style="padding-bottom:5px;">
|
||||
<select name="attribute_unit_impact" id="attribute_unit_impact" style="width: 140px;" onchange="check_unit_impact();">
|
||||
<option value="0">{l s='None'}</option>
|
||||
<option value="1">{l s='Increase'}</option>
|
||||
<option value="-1">{l s='Reduction'}</option>
|
||||
</select>
|
||||
<span id="span_weight_impact"> {l s='of'}
|
||||
{if $currency->format % 2 != 0} {$currency->sign} {/if}
|
||||
<input type="text" size="6" name="attribute_unity" id="attribute_unity" value="0.00" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" />{if $currency->format % 2 == 0} {$currency->sign}{/if} / <span id="unity_third">{$field_value_unity}</span>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
{if $ps_use_ecotax}
|
||||
<tr>
|
||||
<td style="width:150px;vertical-align:top;text-align:right;padding-right:10px;font-weight:bold;">
|
||||
{l s='Eco-tax:'}
|
||||
</td>
|
||||
<td style="padding-bottom:5px;">{if $currency->format % 2 != 0}{$currency->sign}{/if}
|
||||
<input type="text" size="3" name="attribute_ecotax" id="attribute_ecotax" value="0.00" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" />
|
||||
{if $currency->format % 2 == 0} {$currency->sign}{/if}
|
||||
({l s='overrides Eco-tax on Information tab'})
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr>
|
||||
<td style="width:150px;vertical-align:top;text-align:right;padding-right:10px;font-weight:bold;" class="col-left">
|
||||
<label>{l s='Minimum quantity:'}</label>
|
||||
</td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<input size="3" maxlength="6" name="minimal_quantity" id="minimal_quantity" type="text" value="{$minimal_quantity}" />
|
||||
<p>{l s='The minimum quantity to buy this product (set to 1 to disable this feature)'}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:150px;vertical-align:top;text-align:right;padding-right:10px;font-weight:bold;" class="col-left" style="width:150px">
|
||||
<label>{l s='Available date:'}</label>
|
||||
</td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<input class="datepicker" id="available_date_attribute" name="available_date_attribute" value="{$available_date}" style="text-align: center;" type="text" />
|
||||
<p>{l s='The available date when this product is out of stock'}</p>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$(".datepicker").datepicker({
|
||||
prevText: '',
|
||||
nextText: '',
|
||||
dateFormat: 'yy-mm-dd'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div class="separation"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:150px">{l s='Image:'}</td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<ul id="id_image_attr">
|
||||
{foreach from=$images key=k item=image}
|
||||
<li style="float: left; width: {$imageWidth}px;">
|
||||
<input type="checkbox" name="id_image_attr[]" value="{$image.id_image}" id="id_image_attr_{$image.id_image}" />
|
||||
<label for="id_image_attr_{$image.id_image}" style="float: none;">
|
||||
<img src="{$smarty.const._THEME_PROD_DIR_}{$image.obj->getExistingImgPath()}-small.jpg" alt="{$image.legend|htmlentitiesUTF8}" title="{$image.legend|htmlentitiesUTF8}" />
|
||||
</label>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
<img id="pic" alt="" title="" style="display: none; width: 100px; height: 100px; float: left; border: 1px dashed #BBB; margin-left: 20px;" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:150px">{l s='Default:'}<br /><br /></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<input type="checkbox" name="attribute_default" id="attribute_default" value="1" />
|
||||
{l s='Make this the default combination for this product'}<br /><br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:150px"> </td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<span style="float: left;">
|
||||
<input type="submit" name="submitProductAttribute" id="submitProductAttribute" value="{l s='Add this combination'}" class="button" onclick="attr_selectall(); this.form.action += '&addproduct&tabs=3';" add="{l s='Add this combination'}" update="{l s='Update this combination'}" />
|
||||
</span>
|
||||
<span id="ResetSpan" style="float:left;margin-left:8px;display:none;">
|
||||
<input type="reset" name="ResetBtn" id="ResetBtn" onclick="init_elems();getE('id_product_attribute').value = 0;" class="button" value="{l s='Cancel modification'}" />
|
||||
</span>
|
||||
<span class="clear"></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{$list}
|
||||
{/if}
|
||||
@@ -0,0 +1,97 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 8971 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function() {
|
||||
$('input').keypress(function(e) {
|
||||
var code = null;
|
||||
code = (e.keyCode ? e.keyCode : e.which);
|
||||
return (code == 13) ? false : true;
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
{if isset($obj->id)}
|
||||
<h4>{l s='Add or modify customizable properties'}</h4>
|
||||
|
||||
<div class="separation"></div><br />
|
||||
<table cellpadding="5" style="width:100%">
|
||||
<tr>
|
||||
<td style="width:150px;text-align:right;padding-right:10px;font-weight:bold;vertical-align:top;" valign="top">{l s='File fields:'}</td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<input type="text" name="uploadable_files" id="uploadable_files" size="4" value="{$uploadable_files}" />
|
||||
<p class="preference_description">{l s='Number of upload file fields displayed'}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:150px;text-align:right;padding-right:10px;font-weight:bold;vertical-align:top;" valign="top">{l s='Text fields:'}</td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<input type="text" name="text_fields" id="text_fields" size="4" value="{$text_fields}" />
|
||||
<p class="preference_description">{l s='Number of text fields displayed'}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><div class="clear"> </div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:150px;"></td>
|
||||
<td>
|
||||
<input type="submit" name="submitCustomizationConfiguration" value="{l s='Update settings'}" class="button" onclick="this.form.action += '&addproduct&tabs=5';" />
|
||||
</td>
|
||||
</tr>
|
||||
{if $has_file_labels}
|
||||
<tr>
|
||||
<td colspan="2"><div class="separation"></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:150px" valign="top">{l s='Files fields:'}</td>
|
||||
<td>
|
||||
{$display_file_labels}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if $has_text_labels}
|
||||
<tr>
|
||||
<td colspan="2"><div class="separation"></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:150px" valign="top">{l s='Text fields:'}</td>
|
||||
<td>
|
||||
{$display_text_labels}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr>
|
||||
<td colspan="2" style="text-align:center;">
|
||||
{if $has_file_labels || $has_text_labels}
|
||||
<input type="submit" name="submitProductCustomization" id="submitProductCustomization" value="{l s='Save labels'}" class="button" onclick="this.form.action += '&addproduct&tabs=5';" style="margin-top: 9px" />
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/if}
|
||||
@@ -0,0 +1,118 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function() {
|
||||
$('input').keypress(function(e) {
|
||||
var code = null;
|
||||
code = (e.keyCode ? e.keyCode : e.which);
|
||||
return (code == 13) ? false : true;
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
{if isset($product->id)}
|
||||
|
||||
<h4>{l s='Assign features to this product:'}</h4>
|
||||
<div class="separation"></div>
|
||||
<ul>
|
||||
<li>{l s='You can specify a value for each relevant feature regarding this product, empty fields will not be displayed.'}</li>
|
||||
<li>{l s='You can either set a specific value, or select among existing pre-defined values you added previously.'}</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<table border="0" cellpadding="0" cellspacing="0" class="table" style="width:100%;">
|
||||
<colgroup>
|
||||
<col width="300"></col>
|
||||
<col width=""></col>
|
||||
<col width="300"></col>
|
||||
</colgroup>
|
||||
<tr>
|
||||
<th height="39px">{l s='Feature'}</td>
|
||||
<th>{l s='Pre-defined value'}</td>
|
||||
<th><u>{l s='or'}</u> {l s='Customized value'}</td>
|
||||
</tr>
|
||||
</table>
|
||||
{foreach from=$available_features item=available_feature}
|
||||
<table cellpadding="5" style="background-color:#fff; width: 100%;border:1px solid #ccc; border-top:none; padding:4px 6px;">
|
||||
<colgroup>
|
||||
<col width="300"></col>
|
||||
<col width=""></col>
|
||||
<col width="300"></col>
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td>{$available_feature.name}</td>
|
||||
<td>
|
||||
{if sizeof($available_feature.featureValues)}
|
||||
<select id="feature_{$available_feature.id_feature}_value" name="feature_{$available_feature.id_feature}_value"
|
||||
onchange="$('.custom_{$available_feature.id_feature}_').val('');">
|
||||
<option value="0">--- </option>
|
||||
{foreach from=$available_feature.featureValues item=value}
|
||||
<option value="{$value.id_feature_value}"{if $available_feature.current_item == $value.id_feature_value}selected="selected"{/if} >
|
||||
{$value.value|truncate:40}
|
||||
</option>
|
||||
{/foreach}
|
||||
|
||||
</select>
|
||||
{else}
|
||||
<input type="hidden" name="feature_{$available_feature.id_feature}_value" value="0" />
|
||||
<span>{l s='N/A'} -
|
||||
<a href="{$link->getAdminLink('AdminFeatures')}&addfeature_value&id_feature={$available_feature.id_feature}"
|
||||
class="confirm_leave button"><img src="../img/admin/add.gif" alt="values_first" title="{l s='Add pre-defined values first'}" /> {l s='Add pre-defined values first'}</a>
|
||||
</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td class="translatable">
|
||||
{foreach from=$languages key=k item=language}
|
||||
<div class="lang_{$language.id_lang}" style="{if $language.id_lang != $default_form_language}display:none;{/if}float: left;">
|
||||
<textarea class="custom_{$available_feature.id_feature}_" name="custom_{$available_feature.id_feature}_{$language.id_lang}" cols="40" rows="1"
|
||||
onkeyup="if (isArrowKey(event)) return ;$('#feature_{$available_feature.id_feature}_value').val(0);" >{$available_feature.val[$k].value|htmlentitiesUTF8|default:""}</textarea>
|
||||
</div>
|
||||
{/foreach}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{foreachelse}
|
||||
<tr><td colspan="3" style="text-align:center;">{l s='No features defined'}</td></tr>
|
||||
{/foreach}
|
||||
|
||||
</table>
|
||||
<div class="separation"></div>
|
||||
<div>
|
||||
<a href="{$link->getAdminLink('AdminFeatures')}&addfeature" class="confirm_leave button">
|
||||
<img src="../img/admin/add.gif" alt="new_features" title="{l s='Add a new feature'}" /> {l s='Add a new feature'}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
displayFlags(languages, id_language, allowEmployeeFormLang);
|
||||
</script>
|
||||
|
||||
{/if}
|
||||
@@ -0,0 +1,314 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{extends file="helper/form/form.tpl"}
|
||||
|
||||
{block name="autoload_tinyMCE"}
|
||||
// change each by click to load only on click
|
||||
$(".autoload_rte").each(function(e){
|
||||
tinySetup({
|
||||
mode :"exact",
|
||||
editor_selector :"autoload_rte",
|
||||
elements : $(this).attr("id"),
|
||||
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull|cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,undo,redo",
|
||||
theme_advanced_buttons2 : "link,unlink,anchor,image,cleanup,code,|,forecolor,backcolor,|,hr,removeformat,visualaid,|,charmap,media,|,ltr,rtl,|,fullscreen",
|
||||
theme_advanced_buttons3 : "",
|
||||
theme_advanced_buttons4 : "",
|
||||
setup : function(ed) {
|
||||
|
||||
{* Count the total number of the field *}
|
||||
|
||||
ed.onKeyUp.add(function(ed, e) {
|
||||
tinyMCE.triggerSave();
|
||||
textarea = $('#'+ed.id);
|
||||
max = textarea.parent('div').find('span.counter').attr('max');
|
||||
if (max != 'none')
|
||||
{
|
||||
textarea_value = textarea.val();
|
||||
count = stripHTML(textarea_value).length;
|
||||
rest = max - count;
|
||||
if (rest < 0)
|
||||
textarea.parent('div').find('span.counter').html('<span style="color:red;">{l s='Maximum'} '+max+' {l s=' characters'} : '+rest+'</span>');
|
||||
else
|
||||
textarea.parent('div').find('span.counter').html(' ');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
})
|
||||
{/block}
|
||||
|
||||
{block name="defaultForm"}
|
||||
<div>
|
||||
<div class="productTabs" style="display:none;">
|
||||
<ul class="tab">
|
||||
{foreach $product_tabs key=numStep item=tab}
|
||||
<li class="tab-row">
|
||||
<a class="tab-page {if $tab.selected}selected{/if}" id="link-{$tab.id}" href="{$tab.href}&updateproduct">{$tab.name}</a>{*todo href when nojs*}
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var toload = new Array();
|
||||
$('#product-tab-content-wait').show();
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('#product-tab-content-wait').show();
|
||||
{if $is_pack}
|
||||
$('#pack_product').attr('checked', 'checked');
|
||||
$('li.tab-row a[id*="VirtualProduct"]').hide();
|
||||
{elseif $product->is_virtual}
|
||||
$('#virtual_product').attr('checked', 'checked');
|
||||
$('li.tab-row a[id*="Pack"]').hide();
|
||||
$('li.tab-row a[id*="Shipping"]').hide();
|
||||
$('#condition').attr('disabled', 'disabled');
|
||||
$('#condition option[value=new]').attr('selected', 'selected');
|
||||
{else}
|
||||
$('#simple_product').attr('checked', 'checked');
|
||||
$('li.tab-row a[id*="Pack"]').hide();
|
||||
$('li.tab-row a[id*="VirtualProduct"]').hide();
|
||||
{/if}
|
||||
|
||||
$('input[name="type_product"]').click(function() {
|
||||
|
||||
// Reset settings
|
||||
$('li.tab-row a[id*="Pack"]').hide();
|
||||
$('li.tab-row a[id*="VirtualProduct"]').hide();
|
||||
$('div.ppack').hide();
|
||||
$('#is_virtual_good').removeAttr('checked');
|
||||
$('div.is_virtual_good').hide();
|
||||
$('#is_virtual').val(0);
|
||||
$("#virtual_good_attributes").hide();
|
||||
|
||||
var product_type = $(this).val();
|
||||
|
||||
// until a product is added in the pack
|
||||
// if product is PTYPE_PACK, save buttons will be disabled
|
||||
if (product_type == {Product::PTYPE_PACK})
|
||||
{
|
||||
//when you change the type of the product, directly go to the pack tab
|
||||
$('li.tab-row a[id*="Pack"]').show().click();
|
||||
$('#ppack').val(1).attr('checked', true).attr('disabled', 'disabled');
|
||||
$('#ppackdiv').show();
|
||||
// If the pack tab has not finished loaded the changes will be made when the loading event is triggered
|
||||
$("#product-tab-content-Pack").bind('loaded', function(){
|
||||
$('#ppack').val(1).attr('checked', true).attr('disabled', 'disabled');
|
||||
$('#ppackdiv').show();
|
||||
});
|
||||
$("#product-tab-content-Quantities").bind('loaded', function(){
|
||||
$('.stockForVirtualProduct').show();
|
||||
});
|
||||
|
||||
$('li.tab-row a[id*="Shipping"]').show();
|
||||
$('#condition').removeAttr('disabled');
|
||||
$('#condition option[value=new]').removeAttr('selected');
|
||||
$('.stockForVirtualProduct').show();
|
||||
// if pack is enabled, if you choose pack, automatically switch to pack page
|
||||
if ($("#link-Pack:visible").length)
|
||||
handleSaveForPack();
|
||||
}
|
||||
else if (product_type == {Product::PTYPE_VIRTUAL})
|
||||
{
|
||||
enableSave();
|
||||
$('li.tab-row a[id*="VirtualProduct"]').show();
|
||||
$('#is_virtual_good').attr('checked', true);
|
||||
$('#virtual_good').show();
|
||||
$('#is_virtual').val(1);
|
||||
$("#virtual_good_attributes").show();
|
||||
// If the virtual product tab has not finished loaded the changes will be made when the loading event is triggered
|
||||
$("#product-tab-content-VirtualProduct").bind('loaded', function(){
|
||||
$('#virtual_good').show();
|
||||
$('#is_virtual').val(1);
|
||||
$("#virtual_good_attributes").show();
|
||||
});
|
||||
$("#product-tab-content-Quantities").bind('loaded', function(){
|
||||
$('.stockForVirtualProduct').hide();
|
||||
});
|
||||
$('li.tab-row a[id*="Shipping"]').hide();
|
||||
$('#condition').attr('disabled', 'disabled');
|
||||
$('#condition option[value=refurbished]').removeAttr('selected');
|
||||
$('#condition option[value=used]').removeAttr('selected');
|
||||
$('.stockForVirtualProduct').hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
// 3rd case : product_type is PTYPE_SIMPLE (0)
|
||||
enableSave();
|
||||
$('li.tab-row a[id*="Shipping"]').show();
|
||||
$('#condition').removeAttr('disabled');
|
||||
$('#condition option[value=new]').removeAttr('selected');
|
||||
$('.stockForVirtualProduct').show();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$('#desc-product-newCombination').hide();
|
||||
|
||||
{* submenu binding *}
|
||||
$(".tab-page").click(function(e){
|
||||
e.preventDefault();
|
||||
|
||||
// currentId is the current product tab id
|
||||
currentId = $(".productTabs a.selected").attr('id').substr(5);
|
||||
// id is the wanted producttab id
|
||||
id = $(this).attr('id').substr(5);
|
||||
|
||||
// Update submit button value
|
||||
var split_position = id.indexOf('-') + 1;
|
||||
var btn_name = id.substr(split_position);
|
||||
|
||||
$('#key_tab').val(btn_name);
|
||||
|
||||
if ($(this).attr("id") != $(".productTabs a.selected").attr('id'))
|
||||
{
|
||||
$(".tab-page").removeClass('selected');
|
||||
$("#product-tab-content-"+currentId).hide();
|
||||
}
|
||||
|
||||
if ($("#product-tab-content-"+id).hasClass('not-loaded') && !$("#product-tab-content-"+id).hasClass('loading'))
|
||||
displayTabProductById(id, true, 0, null);
|
||||
else
|
||||
{
|
||||
$("#product-tab-content-"+id).show();
|
||||
$("#link-"+id).addClass('selected');
|
||||
}
|
||||
|
||||
var languages = new Array();
|
||||
if (btn_name == "Combinations")
|
||||
{
|
||||
$('#desc-product-new').hide();
|
||||
disableSave();
|
||||
$('#desc-product-newCombination').show();
|
||||
populate_attrs();
|
||||
}
|
||||
else if (btn_name == "Attachments")
|
||||
{
|
||||
disableSave();
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#desc-product-newCombination').hide();
|
||||
// if pack is enabled, save button are visible only if pack is valid
|
||||
if ($("#link-Pack:visible").length)
|
||||
handleSaveForPack();
|
||||
else
|
||||
enableSave();
|
||||
}
|
||||
});
|
||||
|
||||
{if $show_product_tab_content}
|
||||
$("div.productTabs a[id$=-{$show_product_tab_content}]").click();
|
||||
{/if}
|
||||
|
||||
// disable save if Associations tab is not loaded
|
||||
if ($('#product-tab-content-Associations').hasClass('not-loaded'))
|
||||
disableSave();
|
||||
|
||||
$('#product-tab-content-Associations').bind('loaded', function()
|
||||
{
|
||||
enableSave();
|
||||
});
|
||||
|
||||
$('.confirm_leave').live('click', function(){
|
||||
// Double quotes are necessary when the translated string has single quotes
|
||||
return confirm("{l s='You will lose all unsaved modifications, do you want to proceed?' js=1}");
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
var tabs_preloaded = new Array();
|
||||
|
||||
$(window).bind("load", function() {
|
||||
{* Fill an array with tabs that need to be preloaded *}
|
||||
var tabs_to_preload = new Array();
|
||||
{foreach $tabs_preloaded as $tab_name => $value}
|
||||
{* If the tab was not given a loading priority number it will not be preloaded *}
|
||||
{if (is_numeric($value))}
|
||||
if ($("#product-tab-content-"+'{$tab_name}').hasClass('not-loaded'))
|
||||
tabs_to_preload.push('{$tab_name}');
|
||||
{/if}
|
||||
{/foreach}
|
||||
|
||||
// Recursively load tabs starting with the first element of stack
|
||||
displayTabProductById(tabs_to_preload[0], false, 0, tabs_to_preload);
|
||||
|
||||
$('.productTabs').show();
|
||||
$('#product_form').show();
|
||||
$('#product-tab-content-wait').hide();
|
||||
});
|
||||
</script>
|
||||
|
||||
{***********************************************}
|
||||
{********** TO CHECK !!!!!!!!!!!!!!! ***********}
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
ThickboxI18nImage = "{l s='Image'}";
|
||||
ThickboxI18nOf = "{l s='of'}";
|
||||
ThickboxI18nClose = "{l s='Close'}";
|
||||
ThickboxI18nOrEscKey = "{l s='(or "Esc")'}";
|
||||
ThickboxI18nNext = "{l s='Next >'}";
|
||||
ThickboxI18nPrev = "{l s='< Previous'}";
|
||||
tb_pathToImage = "../img/loadingAnimation.gif";
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<div id="product-tab-content-wait" style="display:none"><div id="loading">{l s='Loading...'}</div></div>
|
||||
|
||||
<form id="product_form" action="{$form_action}" method="post" enctype="multipart/form-data" name="product" style="display:none;">
|
||||
<input type="hidden" name="id_product" value="{$id_product}" />
|
||||
<div class="tab-pane" id="tabPane1">
|
||||
{if !$product->active}
|
||||
<div class="warn draft" >
|
||||
<p>
|
||||
<span style="float: left">
|
||||
{l s='Your product will be saved as 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" />
|
||||
<br />
|
||||
</p>
|
||||
</div>
|
||||
{/if}
|
||||
{* all input are here *}
|
||||
{foreach $product_tabs key=numStep item=tab}
|
||||
<div id="product-tab-content-{$tab.id}" class="{if !$tab.selected}not-loaded{/if} product-tab-content" {if !$tab.selected}style="display:none"{/if}>
|
||||
{if $tab.selected}
|
||||
{$custom_form}
|
||||
{/if}
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
<input type="hidden" name="id_product_attribute" id="id_product_attribute" value="0" />
|
||||
<input type="hidden" name="key_tab" id="key_tab" value="Informations" />
|
||||
<input id="product_form_submit_btn" type="submit" value="{l s='Save'}" name="submitAddproduct" class="button" />
|
||||
</form>
|
||||
|
||||
<br/>
|
||||
{/block}
|
||||
|
||||
@@ -0,0 +1,344 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function() {
|
||||
$('input').keypress(function(e) {
|
||||
var code = null;
|
||||
code = (e.keyCode ? e.keyCode : e.which);
|
||||
return (code == 13) ? false : true;
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
{if isset($id_product) && isset($product)}
|
||||
<h4 class="tab" >2. {l s='Images'} (<span id="countImage">{$countImages}</span>)</h4>
|
||||
<h4>{if isset($id_image)}{l s='Edit this product image'}{else}{l s='Add a new image to this product'}{/if}</h4> <div class="separation"></div><br />
|
||||
|
||||
<table cellpadding="5" style="width:100%">
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='File:'}</label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<div id="file-uploader">
|
||||
<noscript>
|
||||
<p>{l s='Please enable JavaScript to use file uploader:'}</p>
|
||||
</noscript>
|
||||
</div>
|
||||
<div id="progressBarImage" class="progressBarImage"></div>
|
||||
<div id="showCounter" style="display:none;"><span id="imageUpload">0</span><span id="imageTotal">0</span></div>
|
||||
<p class="preference_description" style="clear: both;">
|
||||
{l s='Format:'} JPG, GIF, PNG. {l s='Filesize:'} {$max_image_size|string_format:"%.2f"}{l s='Kb max.'}
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" style="text-align:center;">
|
||||
<input type="hidden" name="resizer" value="auto" />
|
||||
{if Tools::getValue('id_image')}<input type="hidden" name="id_image" value="{Tools::getValue('id_image')}" />{/if}
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2" style="padding-bottom:10px;"><div class="separation"></div></td></tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table cellspacing="0" cellpadding="0" class="table tableDnD" id="imageTable">
|
||||
<thead>
|
||||
<tr class="nodrag nodrop">
|
||||
<th style="width: 100px;">{l s='Image'}</th>
|
||||
<th>{l s='Position'}</th>
|
||||
{if $shops}
|
||||
{foreach from=$shops item=shop}
|
||||
<th>{$shop.name}</th>
|
||||
{/foreach}
|
||||
{/if}
|
||||
<th>{l s='Cover'}</th>
|
||||
<th>{l s='Action'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="imageList">
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table id="lineType" style="display:none;">
|
||||
<tr id="image_id">
|
||||
<td style="padding: 4px;">
|
||||
<a href="{$smarty.const._THEME_PROD_DIR_}image_path.jpg" target="_blank">
|
||||
<img src="{$smarty.const._THEME_PROD_DIR_}en-default-small.jpg" alt="image_id" title="image_id" />
|
||||
</a>
|
||||
</td>
|
||||
<td id="td_image_id" class="pointer dragHandle center positionImage">
|
||||
image_position
|
||||
</td>
|
||||
{if $shops}
|
||||
{foreach from=$shops item=shop}
|
||||
<td class="center">
|
||||
<input type="checkbox" class="image_shop" name="id_image" id="{$shop.id_shop}image_id" value="{$shop.id_shop}" />
|
||||
</td>
|
||||
{/foreach}
|
||||
{/if}
|
||||
<td class="center cover"><a href="#">
|
||||
<img class="covered" src="../img/admin/blank.gif" alt="e" /></a>
|
||||
</td>
|
||||
<td class="center">
|
||||
<a href="#" class="delete_product_image" >
|
||||
<img src="../img/admin/delete.gif" alt="{l s='Delete this image'}" title="{l s='Delete this image'}" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
var upbutton = '{l s='Upload a file'}';
|
||||
var token = '{$token}';
|
||||
var come_from = '{$table}';
|
||||
var success_add = '{l s='image has been successfully added'}';
|
||||
var id_tmp = 0;
|
||||
{literal}
|
||||
//Ready Function
|
||||
$(document).ready(function(){
|
||||
{/literal}
|
||||
{foreach from=$images item=image}
|
||||
assoc = {literal}"{"{/literal};
|
||||
{if $shops}
|
||||
{foreach from=$shops item=shop}
|
||||
assoc += '"{$shop.id_shop}" : {if $image->isAssociatedToShop($shop.id_shop)}1{else}0{/if},';
|
||||
{/foreach}
|
||||
{/if}
|
||||
if (assoc != {literal}"{"{/literal})
|
||||
{
|
||||
assoc = assoc.slice(0, -1);
|
||||
assoc += {literal}"}"{/literal};
|
||||
}
|
||||
else
|
||||
assoc = false;
|
||||
imageLine({$image->id}, "{$image->getExistingImgPath()}", {$image->position}, "{if $image->cover}enabled{else}forbbiden{/if}", assoc);
|
||||
{/foreach}
|
||||
{literal}
|
||||
$("#imageTable").tableDnD(
|
||||
{
|
||||
onDrop: function(table, row) {
|
||||
current = $(row).attr("id");
|
||||
stop = false;
|
||||
image_up = "{";
|
||||
$("#imageList").find("tr").each(function(i) {
|
||||
$("#td_" + $(this).attr("id")).html(i + 1);
|
||||
if ($(this).attr("id") == current)
|
||||
{
|
||||
image_up += '"' + $(this).attr("id") + '" : ' + (i + 1) + ',';
|
||||
stop = true;
|
||||
}
|
||||
if (!stop || (i + 1) == 2)
|
||||
image_up += '"' + $(this).attr("id") + '" : ' + (i + 1) + ',';
|
||||
});
|
||||
image_up = image_up.slice(0, -1);
|
||||
image_up += "}";
|
||||
updateImagePositon(image_up);
|
||||
}
|
||||
});
|
||||
var filecheck = 1;
|
||||
var uploader = new qq.FileUploader(
|
||||
{
|
||||
element: document.getElementById("file-uploader"),
|
||||
action: "ajax-tab.php",
|
||||
debug: false,
|
||||
params: {
|
||||
id_product : {/literal}{$id_product}{literal},
|
||||
id_category : {/literal}{$id_category_default}{literal},
|
||||
token : "{/literal}{$token}{literal}",
|
||||
tab : "AdminProducts",
|
||||
action : 'addImage',
|
||||
ajax: 1
|
||||
},
|
||||
onComplete: function(id, fileName, responseJSON)
|
||||
{
|
||||
var percent = ((filecheck * 100) / nbfile);
|
||||
$("#progressBarImage").progressbar({value: percent});
|
||||
if (percent != 100)
|
||||
{
|
||||
$("#imageUpload").html(parseInt(filecheck));
|
||||
$("#imageTotal").html(" / " + parseInt(nbfile) + " {/literal}{l s='Images'}{literal}");
|
||||
$("#progressBarImage").show();
|
||||
$("#showCounter").show();
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#progressBarImage").progressbar({value: 0});
|
||||
$("#progressBarImage").hide();
|
||||
$("#showCounter").hide();
|
||||
nbfile = 0;
|
||||
filecheck = 0;
|
||||
}
|
||||
if (responseJSON.status == 'ok')
|
||||
{
|
||||
cover = "forbbiden";
|
||||
if (responseJSON.cover == "1")
|
||||
cover = "enabled";
|
||||
imageLine(responseJSON.id, responseJSON.path, responseJSON.position, cover, false)
|
||||
$("#imageTable tr:last").after(responseJSON.html);
|
||||
$("#countImage").html(parseInt($("#countImage").html()) + 1);
|
||||
$("#img" + id).remove();
|
||||
$("#imageTable").tableDnDUpdate();
|
||||
showSuccessMessage(responseJSON.name + " " + success_add);
|
||||
}
|
||||
else
|
||||
showErrorMessage(responseJSON.error);
|
||||
filecheck++;
|
||||
},
|
||||
onSubmit: function(id, filename)
|
||||
{
|
||||
$("#imageTable").show();
|
||||
$("#listImage").append("<li id='img"+id+"'><div class=\"float\" >" + filename + "</div></div><a style=\"margin-left:10px\"href=\"javascript:delQueue(" + id +");\"><img src=\"../img/admin/disabled.gif\" alt=\"\" border=\"0\"></a><p class=\"errorImg\"></p></li>");
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* on success function
|
||||
*/
|
||||
function afterDeleteProductImage(data)
|
||||
{
|
||||
data = $.parseJSON(data);
|
||||
if (data)
|
||||
{
|
||||
cover = 0;
|
||||
id = data.content.id;
|
||||
if(data.status == 'ok')
|
||||
{
|
||||
if ($("#" + id).find(".covered").attr("src") == "../img/admin/enabled.gif")
|
||||
cover = 1;
|
||||
$("#" + id).remove();
|
||||
}
|
||||
if (cover)
|
||||
$("#imageTable tr").eq(1).find(".covered").attr("src", "../img/admin/enabled.gif");
|
||||
$("#countImage").html(parseInt($("#countImage").html()) - 1);
|
||||
refreshImagePositions($("#imageTable"));
|
||||
|
||||
showSuccessMessage(data.confirmations);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$('.delete_product_image').die().live('click', function(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
id = $(this).parent().parent().attr('id');
|
||||
if (confirm("{/literal}{l s='Are you sure?' js=1}{literal}"))
|
||||
doAdminAjax({
|
||||
"action":"deleteProductImage",
|
||||
"id_image":id,
|
||||
"id_product" : {/literal}{$id_product}{literal},
|
||||
"id_category" : {/literal}{$id_category_default}{literal},
|
||||
"token" : "{/literal}{$token}{literal}",
|
||||
"tab" : "AdminProducts",
|
||||
"ajax" : 1 }, afterDeleteProductImage
|
||||
);
|
||||
});
|
||||
|
||||
$('.covered').die().live('click', function(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
id = $(this).parent().parent().parent().attr('id');
|
||||
$("#imageList .cover img").each( function(i){
|
||||
$(this).attr("src", $(this).attr("src").replace("enabled", "forbbiden"));
|
||||
});
|
||||
$(this).attr("src", $(this).attr("src").replace("forbbiden", "enabled"));
|
||||
doAdminAjax({
|
||||
"action":"UpdateCover",
|
||||
"id_image":id,
|
||||
"id_product" : {/literal}{$id_product}{literal},
|
||||
"token" : "{/literal}{$token}{literal}",
|
||||
"controller" : "AdminProducts",
|
||||
"ajax" : 1 }
|
||||
);
|
||||
|
||||
});
|
||||
|
||||
$('.image_shop').die().live('click', function()
|
||||
{
|
||||
active = false;
|
||||
if ($(this).attr("checked"))
|
||||
active = true;
|
||||
id = $(this).parent().parent().attr('id');
|
||||
id_shop = $(this).attr("id").replace(id, "");
|
||||
doAdminAjax(
|
||||
{
|
||||
"action":"UpdateProductImageShopAsso",
|
||||
"id_image":id,
|
||||
"id_shop": id_shop,
|
||||
"active":active,
|
||||
"token" : "{/literal}{$token}{literal}",
|
||||
"tab" : "AdminProducts",
|
||||
"ajax" : 1
|
||||
});
|
||||
});
|
||||
|
||||
//function
|
||||
function updateImagePositon(json)
|
||||
{
|
||||
doAdminAjax(
|
||||
{
|
||||
"action":"updateImagePosition",
|
||||
"json":json,
|
||||
"token" : "{/literal}{$token}{literal}",
|
||||
"tab" : "AdminProducts",
|
||||
"ajax" : 1
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function delQueue(id)
|
||||
{
|
||||
$("#img" + id).fadeOut("slow");
|
||||
$("#img" + id).remove();
|
||||
}
|
||||
|
||||
function imageLine(id, path, position, cover, shops)
|
||||
{
|
||||
line = $("#lineType").html();
|
||||
line = line.replace(/image_id/g, id);
|
||||
line = line.replace(/en-default/g, path);
|
||||
line = line.replace(/image_path/g, path);
|
||||
line = line.replace(/image_position/g, position);
|
||||
line = line.replace(/blank/g, cover);
|
||||
line = line.replace("<tbody>", "");
|
||||
line = line.replace("</tbody>", "");
|
||||
if (shops != false)
|
||||
{
|
||||
tmp = jQuery.parseJSON(shops);
|
||||
$.each(tmp, function(key, value){
|
||||
if (value == 1)
|
||||
line = line.replace('id="' + key + '' + id + '"','id="' + key + '' + id + '" checked=checked');
|
||||
});
|
||||
}
|
||||
$("#imageList").append(line);
|
||||
}
|
||||
});
|
||||
{/literal}
|
||||
</script>
|
||||
{/if}
|
||||
@@ -0,0 +1,347 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function() {
|
||||
$('input').keypress(function(e) {
|
||||
var code = null;
|
||||
code = (e.keyCode ? e.keyCode : e.which);
|
||||
return (code == 13) ? false : true;
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<div id="step1">
|
||||
<h4 class="tab">1. {l s='Info.'}</h4>
|
||||
<h4>{l s='Product global information'}</h4>
|
||||
<script type="text/javascript">
|
||||
var token = '{$token}';
|
||||
var id_product = {if isset($product->id)}{$product->id}{else}0{/if};
|
||||
|
||||
{$combinationImagesJs}
|
||||
$(document).ready(function(){
|
||||
|
||||
$('#id_mvt_reason').change(function(){
|
||||
updateMvtStatus($(this).val());
|
||||
});
|
||||
updateMvtStatus($(this).val());
|
||||
});
|
||||
function updateMvtStatus(id_mvt_reason)
|
||||
{
|
||||
if (id_mvt_reason == -1)
|
||||
return $('#mvt_sign').hide();
|
||||
if ($('#id_mvt_reason option:selected').attr('rel') == -1)
|
||||
$('#mvt_sign').html('<img src="../img/admin/arrow_down.png" /> {l s='Decrease your stock'}');
|
||||
else
|
||||
$('#mvt_sign').html('<img src="../img/admin/arrow_up.png" /> {l s='Increase your stock'}');
|
||||
$('#mvt_sign').show();
|
||||
}
|
||||
</script>
|
||||
<div class="separation"></div>
|
||||
|
||||
<div>
|
||||
<label class="text">{l s='Type:'}</label>
|
||||
|
||||
<input type="radio" name="type_product" id="simple_product" value="{Product::PTYPE_SIMPLE}" />
|
||||
<label class="radioCheck">{l s='Product'}</label>
|
||||
|
||||
|
||||
<input type="radio" name="type_product" id="pack_product" value="{Product::PTYPE_PACK}" {if $is_pack}checked="checked"{/if} />
|
||||
<label class="radioCheck">{l s='Pack'}</label>
|
||||
|
||||
|
||||
<input type="radio" name="type_product" id="virtual_product" value="{Product::PTYPE_VIRTUAL}" />
|
||||
<label class="radioCheck">{l s='Virtual Product (services, booking and downloadable products)'}</label>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="separation"></div>
|
||||
<br />
|
||||
<table cellpadding="5" style="width: 50%; float: left; margin-right: 20px; border-right: 1px solid #CCCCCC;">
|
||||
{* global information *}
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='Name:'}</label></td>
|
||||
<td style="padding-bottom:5px;" class="translatable">
|
||||
{foreach from=$languages item=language}
|
||||
<div class="lang_{$language.id_lang}" style="{if !$language.is_default}display: none;{/if} float: left;">
|
||||
<input class="{if !$product->id}copy2friendlyUrl{/if} updateCurrentText" size="43" type="text" {if !$product->id}disabled="disabled"{/if}
|
||||
id="name_{$language.id_lang}" name="name_{$language.id_lang}"
|
||||
value="{$product->name[$language.id_lang]|htmlentitiesUTF8|default:''}"/><sup> *</sup>
|
||||
<span class="hint" name="help_box">{l s='Invalid characters:'} <>;=#{}<span class="hint-pointer"> </span>
|
||||
</span>
|
||||
</div>
|
||||
{/foreach}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='Reference:'}</label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<input size="55" type="text" name="reference" value="{$product->reference|htmlentitiesUTF8}" style="width: 130px; margin-right: 44px;" />
|
||||
<span class="hint" name="help_box">{l s='Special characters allowed:'}.-_#\<span class="hint-pointer"> </span></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='EAN13 or JAN:'}</label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<input size="55" maxlength="13" type="text" name="ean13" value="{$product->ean13|htmlentitiesUTF8}" style="width: 130px; margin-right: 5px;" /> <span class="small">{l s='(Europe, Japan)'}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='UPC:'}</label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<input size="55" maxlength="12" type="text" name="upc" value="{$product->upc}" style="width: 130px; margin-right: 5px;" /> <span class="small">{l s='(US, Canada)'}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{* status informations *}
|
||||
<table cellpadding="5" style="width: 40%; float: left; margin-left: 10px;">
|
||||
<tr>
|
||||
<td class="col-left">
|
||||
|
||||
|
||||
<label class="text">{l s='Status:'}</label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<ul class="listForm">
|
||||
<li>
|
||||
<input onclick="toggleDraftWarning(false);showOptions(true);" type="radio" name="active" id="active_on" value="1" {if $product->active}checked="checked" {/if} />
|
||||
<label for="active_on" class="radioCheck">
|
||||
{l s='Enabled'}</label>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<input onclick="toggleDraftWarning(true);showOptions(false);" type="radio" name="active" id="active_off" value="0" {if !$product->active}checked="checked"{/if} />
|
||||
<label for="active_off" class="radioCheck">{l s='Disabled'} </label>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="product_options" {if !$product->active}style="display:none"{/if} >
|
||||
<td class="col-left"><label>{l s='Options:'}</label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<ul class="listForm">
|
||||
<li><input type="checkbox" name="available_for_order" id="available_for_order" value="1" {if $product->available_for_order}checked="checked"{/if} />
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#available_for_order").click(function(){
|
||||
if ($(this).is(':checked'))
|
||||
{
|
||||
$('#show_price').attr('checked', 'checked');
|
||||
$('#show_price').attr('disabled', 'disabled');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#show_price').attr('disabled', '');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<label for="available_for_order" class="t">{l s='available for order'}</label></li>
|
||||
<li>
|
||||
<input type="checkbox" name="show_price" id="show_price" value="1" {if $product->show_price}checked="checked"{/if} {if $product->available_for_order}disabled="disabled"{/if}/>
|
||||
<label for="show_price" class="t">{l s='show price'}</label>
|
||||
</li>
|
||||
<li>
|
||||
<input type="checkbox" name="online_only" id="online_only" value="1" {if $product->online_only}checked="checked"{/if} />
|
||||
<label for="online_only" class="t">{l s='online only (not sold in store)'}</label>
|
||||
</li>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='Condition:'}</label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<select name="condition" id="condition">
|
||||
<option value="new" {if $product->condition == 'new'}selected="selected"{/if} >{l s='New'}</option>
|
||||
<option value="used" {if $product->condition == 'used'}selected="selected"{/if} >{l s='Used'}</option>
|
||||
<option value="refurbished" {if $product->condition == 'refurbished'}selected="selected"{/if}>{l s='Refurbished'}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</ul>
|
||||
</table>
|
||||
|
||||
<table cellpadding="5" cellspacing="0" border="0" style="width: 100%;"><tr><td><div class="separation"></div></td></tr></table>
|
||||
|
||||
|
||||
<table cellspacing="0" cellpadding="5" border="0">
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='Short description:'}<br /></label><p class="product_description">({l s='appears in the product lists and on the top of the product page'})</p></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
{include file="controllers/products/textarea_lang.tpl"
|
||||
languages=$languages
|
||||
input_name='description_short'
|
||||
input_value=$product->description_short
|
||||
max=$PS_PRODUCT_SHORT_DESC_LIMIT}
|
||||
|
||||
<p class="clear"></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='Description:'}<br /></label><p class="product_description">({l s='appears in the body of the product page'})</p></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
{include file="controllers/products/textarea_lang.tpl" languages=$languages
|
||||
input_name='description'
|
||||
input_value=$product->description
|
||||
}
|
||||
<p class="clear"></p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{if $images}
|
||||
|
||||
<tr>
|
||||
<td class="col-left"><label></label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<div style="display:block;width:620px;" class="hint clear">
|
||||
{l s='Do you want an image associated with the product in your description?'}
|
||||
<span class="addImageDescription" style="cursor:pointer">{l s='Click here'}</span>.
|
||||
</div>
|
||||
<p class="clear"></p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<table id="createImageDescription" style="display:none;width:100%">
|
||||
<tr>
|
||||
<td colspan="2" height="10"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='Select your image:'}</label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<ul class="smallImage">
|
||||
{foreach from=$images item=image key=key}
|
||||
<li>
|
||||
<input type="radio" name="smallImage" id="smallImage_{$key}" value="{$image.id_image}" {if $key == 0}checked="checked"{/if} >
|
||||
<label for="smallImage_{$key}" class="t">
|
||||
<img src="{$image.src}" alt="{$image.legend}" />
|
||||
</label>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
<p class="clear"></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='Where to place it?'}</label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<ul class="listForm">
|
||||
<li><input type="radio" name="leftRight" id="leftRight_1" value="left" checked>
|
||||
<label for="leftRight_1" class="t">{l s='left'}</label>
|
||||
</li>
|
||||
<li>
|
||||
<input type="radio" name="leftRight" id="leftRight_2" value="right">
|
||||
<label for="leftRight_2" class="t">{l s='right'}</label>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='Select the type of picture:'}</label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<ul class="listForm">
|
||||
{foreach from=$imagesTypes key=key item=type}
|
||||
<li><input type="radio" name="imageTypes" id="imageTypes_{$key}" value="{$type.name}" {if $key == 0}checked="checked"{/if}>
|
||||
<label for="imageTypes_{$key}" class="t">{$type.name} <span>({$type.width}px par {$type.height}px)</span></label>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
<p class="clear"></p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='Image tag to insert:'}</label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<input type="text" id="resultImage" name="resultImage" />
|
||||
<p class="preference_description">{l s='The tag is to copy / paste in the description.'}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div class="separation"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
changeTagImage();
|
||||
$('#createImageDescription input').change(function(){
|
||||
changeTagImage();
|
||||
});
|
||||
|
||||
var i = 0;
|
||||
$('.addImageDescription').click(function(){
|
||||
if (i == 0){
|
||||
$('#createImageDescription').animate({
|
||||
opacity: 1, height: 'toggle'
|
||||
}, 500);
|
||||
i = 1;
|
||||
}else{
|
||||
$('#createImageDescription').animate({
|
||||
opacity: 0, height: 'toggle'
|
||||
}, 500);
|
||||
i = 0;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function changeTagImage(){
|
||||
var smallImage = $('input[name=smallImage]:checked').attr('value');
|
||||
var leftRight = $('input[name=leftRight]:checked').attr('value');
|
||||
var imageTypes = $('input[name=imageTypes]:checked').attr('value');
|
||||
var tag = '[img-'+smallImage+'-'+leftRight+'-'+imageTypes+']';
|
||||
$('#resultImage').val(tag);
|
||||
}
|
||||
</script>
|
||||
{/if}
|
||||
<table>
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='Tags:'}</label></td>
|
||||
<td style="padding-bottom:5px;" class="translatable">
|
||||
{foreach from=$languages item=language}
|
||||
<div class="lang_{$language.id_lang}" style="{if !$language.is_default}display: none;{/if}float: left;">
|
||||
<input size="55" type="text" id="tags_{$language.id_lang}" name="tags_{$language.id_lang}"
|
||||
value="{$product->getTags($language.id_lang, true)|htmlentitiesUTF8}" />
|
||||
<span class="hint" name="help_box">{l s='Forbidden characters:'} !<;>;?=+#"°{}_$%<span class="hint-pointer"> </span></span>
|
||||
</div>
|
||||
{/foreach}
|
||||
<p class="preference_description clear">{l s='Tags separated by commas (e.g., dvd, dvd player, hifi)'}</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<div class="translatable">
|
||||
{foreach from=$languages item=language}
|
||||
<div class="lang_{$language.id_lang}" style="{if !$language.is_default}display:none;{/if}float: left;">
|
||||
<input size="30" type="text" id="{$input_name}_{$language.id_lang}"
|
||||
name="{$input_name}_{$language.id_lang}"
|
||||
value="{$input_value[$language.id_lang]|htmlentitiesUTF8|default:''}"
|
||||
onchange="updateFriendlyURL();"
|
||||
onkeyup="if (isArrowKey(event)) return ;updateFriendlyURL();"/>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
@@ -0,0 +1,53 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{extends file="helper/list/list_header.tpl"}
|
||||
|
||||
{block name=leadin}
|
||||
{if isset($category_tree)}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$('#go_to_categ').bind('change', function(){
|
||||
var base_url = '{$base_url}';
|
||||
if (this.value !== "")
|
||||
location.href = base_url + '&id_category=' + parseInt(this.value);
|
||||
else
|
||||
location.href = base_url;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div class="bloc-leadin">
|
||||
{l s='Go to category:'}
|
||||
<select id="go_to_categ" name="go_to_categ">
|
||||
{foreach from=$category_tree item=categ}
|
||||
<option value="{$categ->id}" {if $categ->selected}selected="selected"{/if} >
|
||||
{$categ->dashes}{$categ->name}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
@@ -0,0 +1,226 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 11204 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var msg_select_one = '{l s='Thanks to select at least one product.' js=1}';
|
||||
var msg_set_quantity = '{l s='Thanks to set a quantity to add a product.' js=1}';
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$('input').keypress(function(e) {
|
||||
var code = null;
|
||||
code = (e.keyCode ? e.keyCode : e.which);
|
||||
return (code == 13) ? false : true;
|
||||
});
|
||||
|
||||
if ($('#ppack').attr('checked'))
|
||||
{
|
||||
$('#ppack').attr('disabled', 'disabled');
|
||||
$('#ppackdiv').show();
|
||||
}
|
||||
|
||||
$('div.ppack').hide();
|
||||
|
||||
$('#curPackItemName').autocomplete('ajax_products_list.php', {
|
||||
delay: 100,
|
||||
minChars: 1,
|
||||
autoFill: true,
|
||||
max:20,
|
||||
matchContains: true,
|
||||
mustMatch:true,
|
||||
scroll:false,
|
||||
cacheLength:0,
|
||||
// param multipleSeparator:'||' ajouté à cause de bug dans lib autocomplete
|
||||
multipleSeparator:'||',
|
||||
formatItem: function(item) {
|
||||
return item[1]+' - '+item[0];
|
||||
},
|
||||
extraParams: {
|
||||
excludeIds : getSelectedIds(),
|
||||
excludeVirtuals : 1
|
||||
}
|
||||
}).result(function(event, item){
|
||||
$('#curPackItemId').val(item[1]);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function addPackItem()
|
||||
{
|
||||
var curPackItemId = $('#curPackItemId').val();
|
||||
var curPackItemName = $('#curPackItemName').val();
|
||||
var curPackItemQty = $('#curPackItemQty').val();
|
||||
if (curPackItemId == '' || curPackItemName == '')
|
||||
{
|
||||
jAlert(msg_select_one);
|
||||
return false;
|
||||
}
|
||||
else if (curPackItemId == '' || curPackItemQty == '')
|
||||
{
|
||||
jAlert(msg_set_quantity);
|
||||
return false;
|
||||
}
|
||||
|
||||
var lineDisplay = curPackItemQty+ 'x ' +curPackItemName;
|
||||
|
||||
var divContent = $('#divPackItems').html();
|
||||
divContent += lineDisplay;
|
||||
divContent += '<span onclick="delPackItem(' + curPackItemId + ');" style="cursor: pointer;"><img src="../img/admin/delete.gif" /></span><br />';
|
||||
|
||||
// QTYxID-QTYxID
|
||||
// @todo : it should be better to create input for each items and each qty
|
||||
// instead of only one separated by x, - and ¤
|
||||
var line = curPackItemQty+ 'x' +curPackItemId;
|
||||
|
||||
$('#inputPackItems').val($('#inputPackItems').val() + line + '-');
|
||||
$('#divPackItems').html(divContent);
|
||||
$('#namePackItems').val($('#namePackItems').val() + lineDisplay + '¤');
|
||||
|
||||
$('#curPackItemId').val('');
|
||||
$('#curPackItemName').val('');
|
||||
$('p.listOfPack').show();
|
||||
|
||||
$('#curPackItemName').setOptions({
|
||||
extraParams: {
|
||||
excludeIds : getSelectedIds()
|
||||
}
|
||||
});
|
||||
// show / hide save buttons
|
||||
handleSaveForPack();
|
||||
}
|
||||
|
||||
function delPackItem(id)
|
||||
{
|
||||
var reg = new RegExp('-', 'g');
|
||||
var regx = new RegExp('x', 'g');
|
||||
|
||||
var div = getE('divPackItems');
|
||||
var input = getE('inputPackItems');
|
||||
var name = getE('namePackItems');
|
||||
var select = getE('curPackItemId');
|
||||
var select_quantity = getE('curPackItemQty');
|
||||
|
||||
var inputCut = input.value.split(reg);
|
||||
var nameCut = name.value.split(new RegExp('¤', 'g'));
|
||||
|
||||
input.value = '';
|
||||
name.value = '';
|
||||
div.innerHTML = '';
|
||||
|
||||
for (var i = 0; i < inputCut.length; ++i)
|
||||
if (inputCut[i])
|
||||
{
|
||||
var inputQty = inputCut[i].split(regx);
|
||||
if (inputQty[1] != id)
|
||||
{
|
||||
input.value += inputCut[i] + '-';
|
||||
name.value += nameCut[i] + '¤';
|
||||
div.innerHTML += nameCut[i] + ' <span onclick="delPackItem(' + inputQty[1] + ');" style="cursor: pointer;"><img src="../img/admin/delete.gif" /></span><br />';
|
||||
}
|
||||
}
|
||||
|
||||
$('#curPackItemName').setOptions({
|
||||
extraParams: {
|
||||
excludeIds : getSelectedIds()
|
||||
}
|
||||
});
|
||||
|
||||
// if no item left in the pack, disable save buttons
|
||||
handleSaveForPack();
|
||||
}
|
||||
|
||||
function getSelectedIds()
|
||||
{
|
||||
var ids = id_product + ',';
|
||||
ids += $('#inputPackItems').val().replace(/\d*x/g, '').replace(/\-/g,',');
|
||||
ids = ids.replace(/\,$/,'');
|
||||
return ids;
|
||||
}
|
||||
|
||||
function handleSaveForPack()
|
||||
{
|
||||
// if no item left in the pack, disable save buttons
|
||||
$("#disablePackMessage").remove();
|
||||
if ($("#inputPackItems").val() == "")
|
||||
{
|
||||
disableSave();
|
||||
$(".leadin").append('<div id="disablePackMessage" class="warn">{l s='Pack is empty. You need to add at least one product to the pack before you can save it.'}</div>');
|
||||
}
|
||||
else
|
||||
enableSave();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<h4>{l s='Pack'}</h4>
|
||||
<div class="separation"></div>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="ppack">
|
||||
<input type="checkbox" name="ppack" id="ppack" value="1" {if $is_pack}checked="checked"{/if} onclick="$('#ppackdiv').slideToggle();" />
|
||||
<label class="t" for="ppack">{l s='Pack'}</label>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div id="ppackdiv" {if !$is_pack}style="display: none;"{/if}>
|
||||
|
||||
<label for="curPackItemName" style="width:560px;text-align:left;">
|
||||
{l s='Begin typing the first letters of the product name, then select the product from the drop-down list:'}
|
||||
</label><br /><br />
|
||||
|
||||
<input type="text" size="25" id="curPackItemName" />
|
||||
<input type="text" name="curPackItemQty" id="curPackItemQty" value="1" size="1" />
|
||||
<input type="hidden" name="inputPackItems" id="inputPackItems" value="{$input_pack_items}" />
|
||||
<input type="hidden" name="namePackItems" id="namePackItems" value="{$input_namepack_items}" />
|
||||
<input type="hidden" size="2" id="curPackItemId" />
|
||||
|
||||
<span onclick="addPackItem();" class="button" style="cursor: pointer;">
|
||||
{l s='Add this product in the pack'}
|
||||
</span>
|
||||
|
||||
<p class="product_description listOfPack" style="display:{if count($product->packItems) > 0}block{else}none{/if};text-align: left;">
|
||||
<br />{l s='List of products for that pack:'}
|
||||
</p>
|
||||
|
||||
<div id="divPackItems">
|
||||
{foreach from=$product->packItems item=packItem}
|
||||
{$packItem->pack_quantity} x {$packItem->name}
|
||||
<span onclick="delPackItem({$packItem->id});" style="cursor: pointer;">
|
||||
<img src="../img/admin/delete.gif" />
|
||||
</span><br />
|
||||
{/foreach}
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<p class="hint" style="display:block">{l s='You cannot add downloadable products to a pack.'}</p>
|
||||
|
||||
</td>
|
||||
</div>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -0,0 +1,391 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision$
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{* BEGIN CUSTOMER AUTO-COMPLETE / TO REFACTO *}
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
var Customer = {
|
||||
"hiddenField": jQuery('#id_customer'),
|
||||
"field": jQuery('#customer'),
|
||||
"container": jQuery('#customers'),
|
||||
"loader": jQuery('#customerLoader'),
|
||||
"init": function() {
|
||||
jQuery(Customer.field).typeWatch({
|
||||
"captureLength": 1,
|
||||
"highlight": true,
|
||||
"wait": 50,
|
||||
"callback": Customer.search
|
||||
}).focus(Customer.placeholderIn).blur(Customer.placeholderOut);
|
||||
},
|
||||
"placeholderIn": function() {
|
||||
if (this.value == '{/literal}{l s='All customers'}{literal}') {
|
||||
this.value = '';
|
||||
}
|
||||
},
|
||||
"placeholderOut": function() {
|
||||
if (this.value == '') {
|
||||
this.value = '{/literal}{l s='All customers'}{literal}';
|
||||
}
|
||||
},
|
||||
"search": function()
|
||||
{
|
||||
Customer.showLoader();
|
||||
jQuery.ajax({
|
||||
"type": "POST",
|
||||
"url": "{/literal}{$link->getAdminLink('AdminProducts')}{literal}",
|
||||
"async": true,
|
||||
"dataType": "json",
|
||||
"data": {
|
||||
"ajax": "1",
|
||||
"token": "{/literal}{$token}{literal}",
|
||||
"tab": "AdminProducts",
|
||||
"action": "searchCustomers",
|
||||
"customer_search": Customer.field.val()
|
||||
},
|
||||
"success": Customer.success
|
||||
});
|
||||
},
|
||||
"success": function(result)
|
||||
{
|
||||
if(result.found) {
|
||||
var html = '<ul class="clearfix">';
|
||||
jQuery.each(result.customers, function() {
|
||||
html += '<li><a class="fancybox" href="{/literal}{$link->getAdminLink('AdminCustomers')}{literal}&id_customer='+this.id_customer+'&viewcustomer&liteDisplaying=1">'+this.firstname+' '+this.lastname+'</a>'+(this.birthday ? ' - '+this.birthday:'')+'<br/>';
|
||||
html += '<a href="mailto:'+this.email+'">'+this.email+'</a><br />';
|
||||
html += '<a onclick="Customer.select('+this.id_customer+', \''+this.firstname+' '+this.lastname+'\'); return false;" href="#" class="button">{/literal}{l s='Choose'}{literal}</a></li>';
|
||||
});
|
||||
html += '</ul>';
|
||||
}
|
||||
else
|
||||
html = '<div class="warn">{/literal}{l s='No customers found'}{literal}</div>';
|
||||
Customer.hideLoader();
|
||||
Customer.container.html(html);
|
||||
jQuery('.fancybox', Customer.container).fancybox();
|
||||
},
|
||||
"select": function(id_customer, fullname)
|
||||
{
|
||||
Customer.hiddenField.val(id_customer);
|
||||
Customer.field.val(fullname);
|
||||
Customer.container.empty();
|
||||
return false;
|
||||
},
|
||||
"showLoader": function() {
|
||||
Customer.loader.fadeIn();
|
||||
},
|
||||
"hideLoader": function() {
|
||||
Customer.loader.fadeOut();
|
||||
}
|
||||
};
|
||||
jQuery(document).ready(Customer.init);
|
||||
</script>
|
||||
{/literal}
|
||||
{* END CUSTOMER AUTO-COMPLETE / TO REFACTO *}
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function() {
|
||||
$('input').keypress(function(e) {
|
||||
var code = null;
|
||||
code = (e.keyCode ? e.keyCode : e.which);
|
||||
return (code == 13) ? false : true;
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<div class="block_specific_prices_modifications">
|
||||
<h4>{l s='Product price'}</h4>
|
||||
<div class="separation"></div>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='Pre-tax wholesale price:'}</label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
{$currency->prefix}<input size="11" maxlength="14" name="wholesale_price" type="text" value="{$product->wholesale_price}" onchange="this.value = this.value.replace(/,/g, '.');" />{$currency->suffix}
|
||||
<p class="preference_description">{l s='The wholesale price at which you bought this product'}</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='Pre-tax retail price:'}</label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
{$currency->prefix}<input size="11" maxlength="14" id="priceTE" name="price" type="text" value="{$product->price}" onchange="this.value = this.value.replace(/,/g, '.');" onkeyup="$('#priceType').val('TE');if (isArrowKey(event)) return; calcPriceTI();" />{$currency->suffix}<sup> *</sup>
|
||||
<p class="preference_description">{l s='The pre-tax retail price to sell this product'}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='Tax rule:'}</label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<script type="text/javascript">
|
||||
noTax = {if $tax_exclude_taxe_option}true{else}false{/if};
|
||||
taxesArray = new Array ();
|
||||
taxesArray[0] = 0;
|
||||
{foreach $tax_rules_groups as $tax_rules_group}
|
||||
{if isset($taxesRatesByGroup[$tax_rules_group['id_tax_rules_group']])}
|
||||
taxesArray[{$tax_rules_group.id_tax_rules_group}] = {$taxesRatesByGroup[$tax_rules_group['id_tax_rules_group']]};
|
||||
{else}
|
||||
taxesArray[{$tax_rules_group.id_tax_rules_group}] = 0;
|
||||
{/if}
|
||||
{/foreach}
|
||||
ecotaxTaxRate = {$ecotaxTaxRate / 100};
|
||||
</script>
|
||||
|
||||
<span {if $tax_exclude_taxe_option}style="display:none;"{/if} >
|
||||
<select onChange="javascript:calcPrice(); unitPriceWithTax('unit');" name="id_tax_rules_group" id="id_tax_rules_group" {if $tax_exclude_taxe_option}disabled="disabled"{/if} >
|
||||
<option value="0">{l s='No Tax'}</option>
|
||||
{foreach from=$tax_rules_groups item=tax_rules_group}
|
||||
<option value="{$tax_rules_group.id_tax_rules_group}" {if $product->id_tax_rules_group == $tax_rules_group.id_tax_rules_group}selected="selected"{/if} >
|
||||
{$tax_rules_group['name']|htmlentitiesUTF8}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
<a class="button" href="{$link->getAdminLink('AdminTaxRulesGroup')}&addtax_rules_group&id_product={$product->id}" class="confirm_leave">
|
||||
<img src="../img/admin/add.gif" alt="{l s='Create'}" title="{l s='Create'}" /> <b>{l s='Create'}</b>
|
||||
</a>
|
||||
</span>
|
||||
{if $tax_exclude_taxe_option}
|
||||
<span style="margin-left:10px; color:red;">{l s='Taxes are currently disabled'}</span> (<b><a href="{$link->getAdminLink('AdminTaxes')}">{l s='Tax options'}</a></b>)
|
||||
<input type="hidden" value="{$product->id_tax_rules_group}" name="id_tax_rules_group" />
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{if $ps_use_ecotax}
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='Eco-tax (tax incl.):'}</label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
{$currency->prefix}<input size="11" maxlength="14" id="ecotax" name="ecotax" type="text" value="{$product->ecotax}" onkeyup="$('#priceType').val('TI');if (isArrowKey(event))return; calcPriceTE(); this.value = this.value.replace(/,/g, '.'); if (parseInt(this.value) > getE('priceTE').value) this.value = getE('priceTE').value; if (isNaN(this.value)) this.value = 0;" />{$currency->suffix}
|
||||
<span style="margin-left:10px">({l s='already included in price'})</span>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr {if !$country_display_tax_label || $tax_exclude_taxe_option}style="display:none"{/if} >
|
||||
<td class="col-left"><label>{l s='Retail price with tax:'}</label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
{$currency->prefix}<input size="11" maxlength="14" id="priceTI" type="text" value="" onchange="noComma('priceTI');" onkeyup="$('#priceType').val('TI');if (isArrowKey(event)) return; calcPriceTE();" />{$currency->suffix}
|
||||
<input id="priceType" name="priceType" type="hidden" value="TE" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tr_unit_price">
|
||||
<td class="col-left"><label>{l s='Unit price:'}</label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
{$currency->prefix} <input size="11" maxlength="14" id="unit_price" name="unit_price" type="text" value="{$unit_price|number_format:6}"
|
||||
onkeyup="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.'); unitPriceWithTax('unit');"/>{$currency->suffix}
|
||||
{l s='/'} <!--<input size="6" maxlength="10" id="unity" name="unity" type="text" value="{$product->unity|htmlentitiesUTF8}" onkeyup="if (isArrowKey(event)) return ;unitySecond();" onchange="unitySecond();"/> -->
|
||||
<select onchange="unitySecond();" name="unity" id="unity">
|
||||
{foreach $unities as $unity}
|
||||
<option value="{$unity}" {if $unity == $product->unity} selected="selected"{/if}>{$unity}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
{if $ps_tax && $country_display_tax_label}
|
||||
<span style="margin-left:15px">{l s='or'}
|
||||
{$currency->prefix}<span id="unit_price_with_tax">0.00</span>{$currency->suffix}
|
||||
{l s='/'} <span id="unity_second">{$product->unity}</span> {l s='with tax'}
|
||||
</span>
|
||||
{/if}
|
||||
<p>{l s='Eg. $15 per Lb'}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-left"><label> </label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<input type="checkbox" name="on_sale" id="on_sale" style="padding-top: 5px;" {if $product->on_sale}checked="checked"{/if} value="1" /> <label for="on_sale" class="t">{l s='Display "on sale" icon on product page and text on product listing'}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-left"><label><b>{l s='Final retail price:'}</b></label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<span {if !$country_display_tax_label}style="display:none"{/if} >
|
||||
{$currency->prefix}<span id="finalPrice" style="font-weight: bold;"></span>{$currency->suffix}<span {if $ps_tax}style="display:none;"{/if}> ({l s='tax incl.'})</span>
|
||||
</span>
|
||||
<span {if $ps_tax}style="display:none;"{/if} >
|
||||
|
||||
{if $country_display_tax_label}
|
||||
/
|
||||
{/if}
|
||||
{$currency->prefix}<span id="finalPriceWithoutTax" style="font-weight: bold;"></span>{$currency->suffix} {if $country_display_tax_label}({l s='tax excl.'}){/if}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="separation"></div>
|
||||
|
||||
{if isset($specificPriceModificationForm)}
|
||||
<h4>{l s='Specific prices'}</h4>
|
||||
<div class="hint" style="display:block;min-height:0;">
|
||||
{l s='You can set specific prices for clients belonging to different groups, different countries...'}
|
||||
</div>
|
||||
<br />
|
||||
<a class="button bt-icon" href="#" onclick="$('#add_specific_price').slideToggle();return false;"><img src="../img/admin/add.gif" alt="" /><span>{l s='Add a new specific price'}</span></a>
|
||||
<br/>
|
||||
<script type="text/javascript">
|
||||
var product_prices = new Array();
|
||||
{foreach from=$combinations item='combination'}
|
||||
product_prices['{$combination.id_product_attribute}'] = '{$combination.price}';
|
||||
{/foreach}
|
||||
</script>
|
||||
<div id="add_specific_price" style="display: none;">
|
||||
<label>{l s='For:'}</label>
|
||||
{if !$multi_shop}
|
||||
<div class="margin-form">
|
||||
<input type="hidden" name="sp_id_shop" value="0" />
|
||||
{else}
|
||||
<div class="margin-form">
|
||||
<select name="sp_id_shop">
|
||||
<option value="0">{l s='All shops'}</option>
|
||||
{foreach from=$shops item=shop}
|
||||
<option value="{$shop.id_shop}">{$shop.name|htmlentitiesUTF8}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
>
|
||||
{/if}
|
||||
<select name="sp_id_currency" id="spm_currency_0" onchange="changeCurrencySpecificPrice(0);">
|
||||
<option value="0">{l s='All currencies'}</option>
|
||||
{foreach from=$currencies item=curr}
|
||||
<option value="{$curr.id_currency}">{$curr.name|htmlentitiesUTF8}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
>
|
||||
<select name="sp_id_country">
|
||||
<option value="0">{l s='All countries'}</option>
|
||||
{foreach from=$countries item=country}
|
||||
<option value="{$country.id_country}">{$country.name|htmlentitiesUTF8}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
>
|
||||
<select name="sp_id_group">
|
||||
<option value="0">{l s='All groups'}</option>
|
||||
{foreach from=$groups item=group}
|
||||
<option value="{$group.id_group}">{$group.name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
<label>{l s='Customer:'}</label>
|
||||
<div class="margin-form">
|
||||
<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" />
|
||||
<img src="../img/admin/field-loader.gif" id="customerLoader" alt="{l s='Loading...'}" style="display: none;" />
|
||||
<div id="customers"></div>
|
||||
</div>
|
||||
{if $combinations|@count != 0}
|
||||
<label>{l s='Combination:'}</label>
|
||||
<div class="margin-form">
|
||||
<select id="sp_id_product_attribute" name="sp_id_product_attribute">
|
||||
<option value="0">{l s='Apply to all combinations'}</option>
|
||||
{foreach from=$combinations item='combination'}
|
||||
<option value="{$combination.id_product_attribute}">{$combination.attributes}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
{/if}
|
||||
<label>{l s='Available from:'}</label>
|
||||
<div class="margin-form">
|
||||
<input class="datepicker" type="text" name="sp_from" value="" style="text-align: center" id="sp_from" /><span style="font-weight:bold; color:#000000; font-size:12px"> {l s='to'}</span>
|
||||
<input class="datepicker" type="text" name="sp_to" value="" style="text-align: center" id="sp_to" />
|
||||
</div>
|
||||
|
||||
<label>{l s='Starting at'}</label>
|
||||
<div class="margin-form">
|
||||
<input type="text" name="sp_from_quantity" value="1" size="3" /> <span style="font-weight:bold; color:#000000; font-size:12px">{l s='unit'}</span>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
product_prices['0'] = $('#sp_current_ht_price').html();
|
||||
|
||||
$('#id_product_attribute').change(function() {
|
||||
$('#sp_current_ht_price').html(product_prices[$('#id_product_attribute option:selected').val()]);
|
||||
});
|
||||
|
||||
$('.datepicker').datepicker({
|
||||
prevText: '',
|
||||
nextText: '',
|
||||
dateFormat: 'yy-mm-dd'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<label>{l s='Product price'}
|
||||
{if $country_display_tax_label}
|
||||
{l s='(tax excl.):'}
|
||||
{/if}
|
||||
</label>
|
||||
<div class="margin-form">
|
||||
<span id="spm_currency_sign_pre_0" style="font-weight:bold; color:#000000; font-size:12px">
|
||||
{$currency->prefix}
|
||||
</span>
|
||||
<input type="text" name="sp_price" value="0" size="11" />
|
||||
<span id="spm_currency_sign_post_0" style="font-weight:bold; color:#000000; font-size:12px">
|
||||
{$currency->suffix}
|
||||
</span>
|
||||
<span>
|
||||
(
|
||||
{l s='Current:'}
|
||||
<span id="sp_current_ht_price">{displayWtPrice p=$product->price}</span>
|
||||
)
|
||||
</span>
|
||||
<div class="hint" style="display:block;min-height:0;">
|
||||
{l s='You can set this value at 0 in order to apply the default price'}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label>{l s='Apply a discount of:'}</label>
|
||||
<div class="margin-form">
|
||||
<input type="text" name="sp_reduction" value="0.00" size="11" />
|
||||
<select name="sp_reduction_type">
|
||||
<option selected="selected">---</option>
|
||||
<option value="amount">{l s='Amount'}</option>
|
||||
<option value="percentage">{l s='Percentage'}</option>
|
||||
</select>
|
||||
{l s='(if set to "amount", the tax is included)'}
|
||||
</div>
|
||||
|
||||
<div class="margin-form">
|
||||
<input type="submit" name="submitPriceAddition" value="{l s='Add'}" class="button" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table style="text-align: center;width:100%" class="table" cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="cell border" style="width: 12%;">{l s='Rule'}</th>
|
||||
<th class="cell border" style="width: 12%;">{l s='Combination'}</th>
|
||||
{if $multi_shop}<th class="cell border" style="width: 12%;">{l s='Shop'}</th>{/if}
|
||||
<th class="cell border" style="width: 12%;">{l s='Currency'}</th>
|
||||
<th class="cell border" style="width: 11%;">{l s='Country'}</th>
|
||||
<th class="cell border" style="width: 13%;">{l s='Group'}</th>
|
||||
<th class="cell border" style="width: 13%;">{l s='Customer'}</th>
|
||||
<th class="cell border" style="width: 12%;">{l s='Price'} {if $country_display_tax_label}{l s='(tax excl)'}{/if}</th>
|
||||
<th class="cell border" style="width: 10%;">{l s='Reduction'}</th>
|
||||
<th class="cell border" style="width: 15%;">{l s='Period'}</th>
|
||||
<th class="cell border" style="width: 10%;">{l s='From (quantity)'}</th>
|
||||
<th class="cell border" style="width: 15%;">{l s='Final price'} {if $country_display_tax_label}{l s='(tax excl.)'}{/if}</th>
|
||||
<th class="cell border" style="width: 2%;">{l s='Action'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{$specificPriceModificationForm}
|
||||
<script type="text/javascript">
|
||||
calcPriceTI();
|
||||
unitPriceWithTax('unit');
|
||||
</script>
|
||||
{/if}
|
||||
@@ -0,0 +1,348 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 11069 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function() {
|
||||
$('input').keypress(function(e) {
|
||||
var code = null;
|
||||
code = (e.keyCode ? e.keyCode : e.which);
|
||||
return (code == 13) ? false : true;
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
{if isset($product->id)}
|
||||
|
||||
<h4>{l s='Available quantities for sale'}</h4>
|
||||
<div class="separation"></div>
|
||||
<div class="hint" style="display:block; position:'auto';">
|
||||
<p>{l s='This interface allows you to manage the available quantities for sale of the current product and its combinations on the current shop.'}</p>
|
||||
<p>{l s='You can choose to use the advanced stock management system for this product or not.'}</p>
|
||||
<p>{l s='You can manually specify the quantities for the product / each product combinations, or choose to automatically determine these quantities based on your stock (if advanced stock management is activated).'}</p>
|
||||
<p>{l s='In this case, the quantities correspond to the quantitites of the real stock in the warehouses associated to the current shop or current group of shops.'}</p>
|
||||
</div>
|
||||
<br />
|
||||
<h4>{l s='Available quantities for sale'}</h4>
|
||||
<div class="separation"></div>
|
||||
|
||||
|
||||
{if $show_quantities == true && !$product->cache_is_pack}
|
||||
<div class="warn" id="available_quantity_ajax_msg" style="display: none;"></div>
|
||||
<div class="error" id="available_quantity_ajax_error_msg" style="display: none;"></div>
|
||||
<div class="conf" id="available_quantity_ajax_success_msg" style="display: none;"></div>
|
||||
|
||||
<table cellpadding="5" style="width:100%">
|
||||
<tbody>
|
||||
<tr {if $product->is_virtual}style="display:none;"{/if} class="stockForVirtualProduct">
|
||||
<td valign="top" style="vertical-align:top;">
|
||||
<input {if $product->advanced_stock_management == 1 && $stock_management_active == 1}value="1" checked="checked"{else}value="0"{/if} {if $stock_management_active == 0}disabled="disabled" {/if}
|
||||
type="checkbox" name="advanced_stock_management" class="advanced_stock_management" id="advanced_stock_management" />
|
||||
<label style="float:none;font-weight:normal" for="advanced_stock_management">{l s='I want to use the advanced stock management system for this product'} {if $stock_management_active == 0} - <b>{l s='This requires to enable the advanced stock management.'}</b>{/if}</label>
|
||||
<br /><br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr {if $product->is_virtual}style="display:none;"{/if} class="stockForVirtualProduct">
|
||||
<td valign="top" style="vertical-align:top;">
|
||||
<input {if $product->depends_on_stock == 1 && $stock_management_active == 1}checked="checked" {/if} {if $stock_management_active == 0 || $product->advanced_stock_management == 0}disabled="disabled" {/if} type="radio" name="depends_on_stock" class="depends_on_stock" id="depends_on_stock_1" value="1"/>
|
||||
<label style="float:none;font-weight:normal" for="depends_on_stock_1">{l s='Available quantities for current product and its combinations are based on stock in the warehouses'} {if $stock_management_active == 0 || $product->advanced_stock_management == 0} - <b>{l s='This requires to enable the advanced stock management globaly/for this product.'}</b>{/if}</label>
|
||||
<br /><br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr {if $product->is_virtual}style="display:none;"{/if} class="stockForVirtualProduct">
|
||||
<td valign="top" style="vertical-align:top;">
|
||||
<input {if $product->depends_on_stock == 0 || $stock_management_active == 0}checked="checked" {/if} type="radio" name="depends_on_stock" class="depends_on_stock" id="depends_on_stock_0" value="0"/>
|
||||
<label style="float:none;font-weight:normal" for="depends_on_stock_0">{l s='I want to specify available quantities manually'}</label>
|
||||
<br /><br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" style="text-align:left;vertical-align:top;">
|
||||
<table class="table" cellpadding="0" cellspacing="0" style="width:100%;">
|
||||
<colgroup>
|
||||
<col width="50"></col>
|
||||
<col></col>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{l s='Quantity'}</th>
|
||||
<th>{l s='Designation'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{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']]}"/>
|
||||
</td>
|
||||
<td>{$product_designation[$attribute['id_product_attribute']]}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="when_out_of_stock">
|
||||
<td>
|
||||
<table style="margin-top: 15px;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='When out of stock:'}</label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<ul class="listForm">
|
||||
<li>
|
||||
<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">
|
||||
<label id="label_out_of_stock_1" class="t" for="out_of_stock_1">{l s='Deny orders'}</label>
|
||||
</li>
|
||||
<li>
|
||||
<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">
|
||||
<label id="label_out_of_stock_2" class="t" for="out_of_stock_2">{l s='Allow orders'}</label>
|
||||
</li>
|
||||
<li>
|
||||
<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">
|
||||
<label id="label_out_of_stock_3" class="t" for="out_of_stock_3">
|
||||
{l s='Default'}:
|
||||
<i>{l s='Deny orders'}</i>
|
||||
<a class="confirm_leave" href="index.php?tab=AdminPPreferences&token={$token_preferences}">
|
||||
{l s='as set in Preferences'}
|
||||
</a>
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{elseif $product->cache_is_pack}
|
||||
<div class="warn">
|
||||
<p>{l s='It is not possible to manage quantities when you are managing a pack.'}</p>
|
||||
</div>
|
||||
{else}
|
||||
<div class="warn">
|
||||
<p>{l s='It is not possible to manage quantities when : '}</p>
|
||||
<ul>
|
||||
<li>{l s='You are managing all shops.'}</li>
|
||||
<li>{l s='You are managing a group of shops where quantities are not shared between all shops of this group.'}</li>
|
||||
<li>{l s='You are managing a shop which is in a group where quantities are shared between all shops of this group.'}</li>
|
||||
</ul>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="separation"></div>
|
||||
<h4>{l s='Availability settings'}</h4>
|
||||
<table cellpadding="5">
|
||||
{if !$ps_stock_management}
|
||||
<tr>
|
||||
<td colspan="2">{l s='The stock management is disabled'}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if !$has_attribute}
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='Minimum quantity:'}</label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<input size="3" maxlength="6" name="minimal_quantity" id="minimal_quantity" type="text" value="{$product->minimal_quantity|default:1}" />
|
||||
<p class="preference_description">{l s='The minimum quantity to buy this product (set to 1 to disable this feature)'}</p>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='Displayed text when in-stock:'}</label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
{include file="controllers/products/input_text_lang.tpl"
|
||||
languages=$languages
|
||||
input_value=$product->available_now
|
||||
input_name='available_now'}
|
||||
<span class="hint" name="help_box">{l s='Forbidden characters:'} <>;=#{}<span class="hint-pointer"> </span></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='Displayed text when allowed to be back-ordered:'}</label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
{include file="controllers/products/input_text_lang.tpl"
|
||||
languages=$languages
|
||||
input_value=$product->available_later
|
||||
input_name='available_later'}
|
||||
<span class="hint" name="help_box">{l s='Forbidden characters:'} <>;=#{}<span class="hint-pointer"> </span></span>
|
||||
</td>
|
||||
</tr>
|
||||
{if !$countAttributes}
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='Available date:'}</label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<input id="available_date" name="available_date" value="{$product->available_date}" class="datepicker"
|
||||
style="text-align: center;" type="text" />
|
||||
<p>{l s='The available date when this product is out of stock'}</p>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
var showAjaxError = function(msg)
|
||||
{
|
||||
$('#available_quantity_ajax_error_msg').html(msg);
|
||||
$('#available_quantity_ajax_error_msg').show();
|
||||
$('#available_quantity_ajax_msg').hide();
|
||||
$('#available_quantity_ajax_success_msg').hide();
|
||||
};
|
||||
|
||||
var showAjaxSuccess = function(msg)
|
||||
{
|
||||
$('#available_quantity_ajax_success_msg').html(msg);
|
||||
$('#available_quantity_ajax_error_msg').hide();
|
||||
$('#available_quantity_ajax_msg').hide();
|
||||
$('#available_quantity_ajax_success_msg').show();
|
||||
};
|
||||
|
||||
var showAjaxMsg = function(msg)
|
||||
{
|
||||
$('#available_quantity_ajax_msg').html(msg);
|
||||
$('#available_quantity_ajax_error_msg').hide();
|
||||
$('#available_quantity_ajax_msg').show();
|
||||
$('#available_quantity_ajax_success_msg').hide();
|
||||
};
|
||||
|
||||
var ajaxCall = function(data)
|
||||
{
|
||||
data.ajaxProductQuantity = 1;
|
||||
data.id_product = '{$product->id}';
|
||||
data.token = "{$token}";
|
||||
data.ajax = 1;
|
||||
data.controller = "AdminProducts";
|
||||
data.action = "productQuantity";
|
||||
showAjaxMsg('{l s='Saving data...'}');
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "ajax-tab.php",
|
||||
data: data,
|
||||
dataType: 'json',
|
||||
async : true,
|
||||
success: function(msg)
|
||||
{
|
||||
if (msg.error)
|
||||
{
|
||||
showAjaxError('{l s='Error durring saving data'}');
|
||||
return;
|
||||
}
|
||||
showAjaxSuccess('{l s='Data saved'}');
|
||||
},
|
||||
error: function(msg)
|
||||
{
|
||||
showAjaxError('{l s='Error durring saving data'}');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var refreshQtyAvaibilityForm = function()
|
||||
{
|
||||
if ($('#depends_on_stock_0').attr('checked'))
|
||||
{
|
||||
$('.available_quantity').find('input').show();
|
||||
$('.available_quantity').find('span').hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
$('.available_quantity').find('input').hide();
|
||||
$('.available_quantity').find('span').show();
|
||||
}
|
||||
};
|
||||
|
||||
$('.depends_on_stock').click(function(e)
|
||||
{
|
||||
refreshQtyAvaibilityForm();
|
||||
ajaxCall( { actionQty: 'depends_on_stock', value: $(this).val() } );
|
||||
if($(this).val() == 0)
|
||||
$('.available_quantity input').trigger('change');
|
||||
});
|
||||
|
||||
$('.advanced_stock_management').click(function(e)
|
||||
{
|
||||
var val = 0;
|
||||
if ($(this).attr('checked'))
|
||||
val = 1;
|
||||
|
||||
ajaxCall( { actionQty: 'advanced_stock_management', value: val } );
|
||||
if (val == 1)
|
||||
{
|
||||
$(this).val(1);
|
||||
$('#depends_on_stock_1').attr('disabled', false);
|
||||
}
|
||||
else
|
||||
{
|
||||
$(this).val(0);
|
||||
$('#depends_on_stock_1').attr('disabled', true);
|
||||
$('#depends_on_stock_0').attr('checked', true);
|
||||
ajaxCall( { actionQty: 'depends_on_stock', value: 0} );
|
||||
refreshQtyAvaibilityForm();
|
||||
}
|
||||
refreshQtyAvaibilityForm();
|
||||
});
|
||||
|
||||
// bind enter key event on search field
|
||||
$('.available_quantity').find('input').bind('keypress', function(e) {
|
||||
var code = (e.keyCode ? e.keyCode : e.which);
|
||||
if(code == 13) { //Enter keycode
|
||||
e.stopPropagation();//Stop event propagation
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$('.available_quantity').find('input').blur(function(e)
|
||||
{
|
||||
ajaxCall( { actionQty: 'set_qty', id_product_attribute: $(this).parent().attr('id').split('_')[1], value: $(this).val() } );
|
||||
});
|
||||
|
||||
$('.available_quantity').find('input').click(function(e)
|
||||
{
|
||||
if(typeof(this.intervalId) != 'undefined')
|
||||
window.clearInterval(this.intervalId);
|
||||
this.intervalId = window.setInterval(function(it, initialValue)
|
||||
{
|
||||
if(initialValue != $(it).val())
|
||||
{
|
||||
window.clearInterval(it.intervalId);
|
||||
$(it).trigger('change');
|
||||
$(it).trigger('click');
|
||||
}
|
||||
}, 500, this, $(this).val())
|
||||
});
|
||||
|
||||
$('.out_of_stock').click(function(e)
|
||||
{
|
||||
refreshQtyAvaibilityForm();
|
||||
ajaxCall( { actionQty: 'out_of_stock', value: $(this).val() } );
|
||||
});
|
||||
|
||||
refreshQtyAvaibilityForm();
|
||||
</script>
|
||||
|
||||
{/if}
|
||||
@@ -0,0 +1,106 @@
|
||||
{*
|
||||
* 2007-2011 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-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 11204 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function() {
|
||||
$('input').keypress(function(e) {
|
||||
var code = null;
|
||||
code = (e.keyCode ? e.keyCode : e.which);
|
||||
return (code == 13) ? false : true;
|
||||
});
|
||||
|
||||
// Enable product name field when the url rewrite field is loaded
|
||||
$('.copy2friendlyUrl').removeAttr('disabled');
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<h4>{l s='SEO'}</h4>
|
||||
<div class="separation"></div>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td class="col-left">
|
||||
<label>{l s='Meta title:'}</label>
|
||||
</td>
|
||||
<td>
|
||||
{include file="controllers/products/input_text_lang.tpl"
|
||||
languages=$languages
|
||||
input_name='meta_title'
|
||||
input_value=$product->meta_title}
|
||||
<p class="preference_description">{l s='Product page title; leave blank to use product name'}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-left">
|
||||
<label>{l s='Meta description:'}</label>
|
||||
</td>
|
||||
<td>
|
||||
{include file="controllers/products/input_text_lang.tpl"
|
||||
languages=$languages
|
||||
input_name='meta_description'
|
||||
input_value=$product->meta_description
|
||||
input_hint='{l s=\'Forbidden characters:\'\} <>;=#{\}'}
|
||||
<p class="preference_description">{l s='A single sentence for HTML header'}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-left">
|
||||
<label>{l s='Meta keywords:'}</label>
|
||||
</td>
|
||||
<td>
|
||||
{include file="controllers/products/input_text_lang.tpl" languages=$languages
|
||||
input_value=$product->meta_keywords
|
||||
input_name='meta_keywords'}
|
||||
<p class="preference_description">{l s='Keywords for HTML header, separated by a comma'}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-left">
|
||||
<label>{l s='Friendly URL:'}</label>
|
||||
</td>
|
||||
<td>
|
||||
{include file="controllers/products/input_text_lang.tpl"
|
||||
languages=$languages
|
||||
input_value=$product->link_rewrite
|
||||
input_name='link_rewrite'}
|
||||
|
||||
<p class="clear" style="padding:10px 0 0 0">
|
||||
<a style="cursor:pointer" class="button"
|
||||
onmousedown="updateFriendlyURLByName();">{l s='Generate'}</a>
|
||||
{l s='Friendly-url from product\'s name.'}<br /><br />
|
||||
{l s='Product link will look like this:'}
|
||||
{if $ps_ssl_enabled}https://{else}http://{/if}{$smarty.server.SERVER_NAME}{$smarty.const.__PS_BASE_URI__}{if isset($product->id)}{$product->id}{else}<b>id_product</b>{/if}-<span id="friendly-url">{$product->link_rewrite[$default_language]}</span>.html</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
displayFlags(languages, id_language, allowEmployeeFormLang);
|
||||
</script>
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user