[-] INSTALLER : Fixed a missing "echo" at Step 3 in the SMTP configuration

[-] BO : Fixed a French hardcoded page (Favorites Views)
[-] BO : Fixed a typo ("Informations" => "Information")
[*] BO : Improved the UI of the Combinations generator and added some explanations - #PSCFV-770
[*] MO : Added a # before the order number in the e-mail sent to the merchant when an order is placed
This commit is contained in:
bLeveque
2012-05-19 20:55:05 +00:00
parent 29933ad43b
commit f6414739c7
9 changed files with 81 additions and 99 deletions
@@ -25,14 +25,13 @@
*}
<script type="text/javascript">
i18n_tax_exc = "{l s='Tax Excl.:'}";
i18n_tax_inc = "{l s='Tax Incl.:'}";
i18n_tax_exc = '{l s='Tax Excl.:'} ';
i18n_tax_inc = '{l s='Tax Incl.:'} ';
var product_tax = "{$tax_rates}";
var product_tax = '{$tax_rates}';
function calcPrice(element, element_has_tax)
{
name = element.attr("name");
var element_price = element.val().replace(/,/g, ".");
var element_price = element.val().replace(/,/g, '.');
var other_element_price = 0;
if (!isNaN(element_price) && element_price > 0)
@@ -45,99 +44,81 @@
other_element_price = other_element_price.toFixed(2);
}
$("#related_to_"+name).val(other_element_price);
$('#related_to_'+element.attr('name')).val(other_element_price);
}
$(document).ready(function()
{
$(".price_impact").each(function()
{
calcPrice($(this), false);
});
});
$(document).ready(function() { $('.price_impact').each(function() { calcPrice($(this), false); }); });
</script>
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
<div class="leadin">{block name="leadin"}{/block}</div>
{if $generate}
<div class="module_confirmation conf confirm">
{l s='%d product(s) successfully created.' sprintf=$combinations_size}
</div>
{/if}
{if $generate}<div class="module_confirmation conf confirm">{l s='%d product(s) successfully created.' sprintf=$combinations_size}</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, hold down the "Ctrl" key, 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 />
<legend><img src="../img/admin/asterisk.gif" alt="" />{l s='Attributes generator'}</legend>
<div style="float: left; margin-right: 50px;">
<select multiple name="attributes[]" id="attribute_group" style="height: 500px; 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 style="text-align: center; margin-bottom: 10px;">
<p>
<input class="button" type="button" style="margin-right: 15px;" value="{l s='Add'}" class="button" onclick="add_attr_multiple();" />
<input class="button" type="button" value="{l s='Delete'}" class="button" onclick="del_attr_multiple();" />
</p>
</div>
</div>
<br />
{l s='Add or modify attributes for:'} <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|escape:'htmlall':'UTF-8'}"/>
</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}
<div style="float: left; width: 570px;">
<div class="hint" style="width: 570px; padding-left: 45px; margin-bottom: 15px; display: block; position: inherit;">{l s='The Combinations Generator is a tool which allows you to easily create a series of combinations by selecting the related attributes. For example, if you are selling T-Shirts, in 3 different sizes and 2 different colors, the Generator will create 6 combinations for you.'}</div>
<p>{l s='You are currently generating combinations for the following product:'} <b>{$product_name|escape:'htmlall':'UTF-8'}</b></p>
<h4>{l s='Step 1: On the left side, Select the attributes you want to use (Holding down the "CTRL" Key on your keyboard and validating by clicking on "Add"'}</h4>
<div>
{foreach $attribute_groups as $k => $attribute_group}
{if isset($attribute_js[$attribute_group['id_attribute_group']])}
<table class="table clear" cellpadding="0" cellspacing="0" 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='Impact on the Product Price'} ({$currency_sign})</th>
<th style="width: 150px">{l s='Impact on the Product Weight'} ({$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}
{/foreach}
{/if}
{/foreach}
</div>
<h4>{l s='Step 2 (optional): Select a default Quantity and Reference for all the combinations that the Generator will create for this product'}</h4>
<table border="0" class="table" cellpadding="0" cellspacing="0">
<tr>
<td>{l s='Default Quantity:'}</td>
<td><input type="text" size="20" name="quantity" value="0" style="width: 50px;" /></td>
</tr>
<tr>
<td>{l s='Default Reference:'}</td>
<td><input type="text" size="20" name="reference" value="{$product_reference|escape:'htmlall':'UTF-8'}" /></td>
</tr>
</table>
<h4>{l s='Finally, click on "Generate these combinations"'}</h4>
<p><input type="submit" class="button" style="margin-bottom:5px;" name="generate" value="{l s='Generate these combinations'}" /></p>
</div>
</fieldset>
</form>
@@ -5,7 +5,7 @@
<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>
<a class="tab-page" id="cart_rule_link_informations" href="javascript:displayCartRuleTab('informations');">{l s='Information'}</a>
</li>
<li class="tab-row">
<a class="tab-page" id="cart_rule_link_conditions" href="javascript:displayCartRuleTab('conditions');">{l s='Conditions'}</a>
@@ -23,13 +23,13 @@
</colgroup>
<thead>
<tr class="nodrag nodrop">
<th class="center">Logo</th>
<th>Nom du module</th>
<th>Description</th>
<th>Etat</th>
<th>Catégories</th>
<th>Intérêt</th>
<th>Favori</th>
<th class="center">{l s='Logo'}</th>
<th>{l s='Module Name'}</th>
<th>{l s='Description'}</th>
<th>{l s='Status'}</th>
<th>{l s='Categories'}</th>
<th>{l s='Interest'}</th>
<th>{l s='Favorite'}</th>
<th>&nbsp;</th>
</tr>
</thead>
@@ -583,8 +583,7 @@
<br /><br />{l s='Merchandise returns are disabled'}
{/if}
</div>
<div style="float:right;">
<div style="float:right; margin-top: 20px;">
<table class="table" width="450px;" style="border-radius:0px;"cellspacing="0" cellpadding="0">
<tr id="total_products">
<td width="150px;"><b>{l s='Products'}</b></td>
@@ -47,8 +47,9 @@
{/foreach}
</script>
<h4>{l s='Add or modify combinations for this product'}</h4>
<div class="separation"></div> {l s='or go to'}
&nbsp;<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> {l s='or use the'}
&nbsp;<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>
{l s='in order to create automatically a set of combinations'}
{if isset($display_multishop_checkboxes) && $display_multishop_checkboxes}
<br />
@@ -71,9 +71,10 @@
<div>
<div class="productTabs" style="display:none;">
<ul class="tab">
{*todo href when nojs*}
{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}&amp;updateproduct">{$tab.name}</a>{*todo href when nojs*}
<a class="tab-page {if $tab.selected}selected{/if}" id="link-{$tab.id}" href="{$tab.href}&amp;updateproduct">{$tab.name|escape:'htmlall':'UTF-8'}</a>
</li>
{/foreach}
</ul>
@@ -157,7 +157,7 @@ class AdminProductsControllerCore extends AdminController
// @since 1.5 : translations for tabs
$this->available_tabs_lang = array (
'Informations' => $this->l('Informations'),
'Informations' => $this->l('Information'),
'Pack' => $this->l('Pack'),
'VirtualProduct' => $this->l('Virtual Product'),
'Prices' => $this->l('Prices'),
+1 -1
View File
@@ -74,7 +74,7 @@
<p>
<label for="smtpEnc"><?php echo $this->l('Encryption:') ?></label>
<select id="smtpEnc" name="smtpEnc">
<option value="off" <?php if ($this->smtp_encryption == 'off'): ?>selected="selected"<?php endif; ?>><?php $this->l('None') ?></option>
<option value="off" <?php if ($this->smtp_encryption == 'off'): ?>selected="selected"<?php endif; ?>><?php echo $this->l('None') ?></option>
<option value="tls" <?php if ($this->smtp_encryption == 'tls'): ?>selected="selected"<?php endif; ?>>TLS</option>
<option value="ssl" <?php if ($this->smtp_encryption == 'ssl'): ?>selected="selected"<?php endif; ?>>SSL</option>
</select>
+1 -1
View File
@@ -333,7 +333,7 @@ class MailAlerts extends Module
// Filling-in vars for email
$template = 'new_order';
$subject = $this->l('New order', false, $id_lang).' - '.sprintf('%06d', $order->id);
$subject = $this->l('New order', false, $id_lang).' - #'.sprintf('%06d', $order->id);
$template_vars = array(
'{firstname}' => $customer->firstname,
'{lastname}' => $customer->lastname,