From 0aa908bd2511c4d4d7b154b6c787921943c7d906 Mon Sep 17 00:00:00 2001 From: Jerome Nadaud Date: Mon, 19 Aug 2013 11:59:27 +0200 Subject: [PATCH 01/10] [+] BO : Products add fileset for informations and prices tab --- .../products/helpers/form/form.tpl | 4 +- .../controllers/products/informations.tpl | 772 +++++++++--------- .../template/controllers/products/prices.tpl | 699 ++++++++-------- controllers/admin/AdminProductsController.php | 8 +- js/admin-products.js | 3 +- 5 files changed, 745 insertions(+), 741 deletions(-) diff --git a/admin-dev/themes/default/template/controllers/products/helpers/form/form.tpl b/admin-dev/themes/default/template/controllers/products/helpers/form/form.tpl index 284acc386..7c39d30ee 100644 --- a/admin-dev/themes/default/template/controllers/products/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/controllers/products/helpers/form/form.tpl @@ -251,11 +251,11 @@ {* all input are here *}
{foreach $product_tabs key=numStep item=tab} -
+
{if $tab.selected} {$custom_form} {/if} -
+
{/foreach} diff --git a/admin-dev/themes/default/template/controllers/products/informations.tpl b/admin-dev/themes/default/template/controllers/products/informations.tpl index ad0fa3004..1699d21d7 100644 --- a/admin-dev/themes/default/template/controllers/products/informations.tpl +++ b/admin-dev/themes/default/template/controllers/products/informations.tpl @@ -28,404 +28,406 @@ {assign var=class_input_ajax value=''} {/if} - -

{l s='Info.'}

-
{l s='Product global information'}
- - -{if isset($display_common_field) && $display_common_field} -
{l s='Warning, if you change the value of fields with an orange bullet %s, the value will be changed for all other shops for this product' sprintf=$bullet_common_field}
-{/if} - -{include file="controllers/products/multishop/check_fields.tpl" product_tab="Informations"} - - - -
- -
-
- -
-
- -
-
- -
-
-
- -
- -
- -
-
- {include file="controllers/products/input_text_lang.tpl" - languages=$languages - input_class="{$class_input_ajax}{if !$product->id}copy2friendlyUrl{/if} updateCurrentText" - input_value=$product->name - input_name="name" - } -
-
-
- -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
- -
- -{* status informations *} -{include file="controllers/products/multishop/checkbox.tpl" field="active" type="radio" onclick=""} -
- -
- - active || !$product->isAssociatedToShop()}checked="checked" {/if} /> - - active && $product->isAssociatedToShop()}checked="checked"{/if} /> - - - -
-
- - - - - - -
- {include file="controllers/products/multishop/checkbox.tpl" field="visibility" type="default"} - -
- -
-
- -
active}style="display:none"{/if} > -
- {if isset($display_multishop_checkboxes) && $display_multishop_checkboxes} -
- {include file="controllers/products/multishop/checkbox.tpl" only_checkbox="true" field="available_for_order" type="default"} - {include file="controllers/products/multishop/checkbox.tpl" only_checkbox="true" field="show_price" type="show_price"} - {include file="controllers/products/multishop/checkbox.tpl" only_checkbox="true" field="online_only" type="default"} -
+
+ +

{l s='Info.'}

+
{l s='Product global information'}
+ + + {if isset($display_common_field) && $display_common_field} +
{l s='Warning, if you change the value of fields with an orange bullet %s, the value will be changed for all other shops for this product' sprintf=$bullet_common_field}
+ {/if} + + {include file="controllers/products/multishop/check_fields.tpl" product_tab="Informations"} + + + +
+ +
+
+ +
+
+ +
+
+
-
- {include file="controllers/products/multishop/checkbox.tpl" field="condition" type="default"} - -
- +
+ +
+ +
+ +
+
+ {include file="controllers/products/input_text_lang.tpl" + languages=$languages + input_class="{$class_input_ajax}{if !$product->id}copy2friendlyUrl{/if} updateCurrentText" + input_value=$product->name + input_name="name" + } +
+
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ + {* status informations *} + {include file="controllers/products/multishop/checkbox.tpl" field="active" type="radio" onclick=""} +
+ +
+ + active || !$product->isAssociatedToShop()}checked="checked" {/if} /> + + active && $product->isAssociatedToShop()}checked="checked"{/if} /> + + + +
+
+ + + -
-
+
\ No newline at end of file diff --git a/admin-dev/themes/default/template/controllers/products/prices.tpl b/admin-dev/themes/default/template/controllers/products/prices.tpl index 084f587ee..c396e7b35 100644 --- a/admin-dev/themes/default/template/controllers/products/prices.tpl +++ b/admin-dev/themes/default/template/controllers/products/prices.tpl @@ -103,397 +103,396 @@ $(document).ready(function () { Customer.init(); }); +
+ +

{l s='Product price'}

- -

{l s='Product price'}

- -
- {l s='You must enter either the pre-tax retail price, or the retail price with tax. The input field will be automatically calculated.'} -
- -{include file="controllers/products/multishop/check_fields.tpl" product_tab="Prices"} - -{include file="controllers/products/multishop/checkbox.tpl" field="wholesale_price" type="default"} -
- -
- {$currency->prefix}{$currency->suffix} - +
+ {l s='You must enter either the pre-tax retail price, or the retail price with tax. The input field will be automatically calculated.'}
-
-
- {include file="controllers/products/multishop/checkbox.tpl" field="price" type="price"} - -
- {$currency->prefix}{$currency->suffix} - - + {include file="controllers/products/multishop/check_fields.tpl" product_tab="Prices"} + + {include file="controllers/products/multishop/checkbox.tpl" field="wholesale_price" type="default"} +
+ +
+ {$currency->prefix}{$currency->suffix} + +
-
-
- {include file="controllers/products/multishop/checkbox.tpl" field="id_tax_rules_group" type="default"} - -
- -
-
- + +
+
+ +
+ {include file="controllers/products/multishop/checkbox.tpl" field="id_tax_rules_group" type="default"} + +
+ +
+
+ +
+
-
-{if $tax_exclude_taxe_option} -
-
-
- {l s='Taxes are currently disabled'} : - {l s='Tax options'} - + {if $tax_exclude_taxe_option} +
+
+
+ {l s='Taxes are currently disabled'} : + {l s='Tax options'} + +
-
-{/if} + {/if} - - -
- -
- {$currency->prefix}{$currency->suffix} - - -
-
- -
- {include file="controllers/products/multishop/checkbox.tpl" field="unit_price" type="unit_price"} - -
- {$currency->prefix}{$currency->suffix} - - {l s='per'} - -
-
- -{if $ps_tax && $country_display_tax_label} -
-
-
- {l s='or'} - {$currency->prefix}0.00{$currency->suffix} - {l s='per'} {$product->unity} {l s='with tax'} + -
-{/if} -
- {include file="controllers/products/multishop/checkbox.tpl" field="on_sale" type="default"} -
-
- +
+ +
+ {$currency->prefix}{$currency->suffix} + +
-
-
-
-
- {l s='Final retail price:'} - - {$currency->prefix} - 0.00 - {$currency->suffix} - ({l s='tax incl.'}) - - - {if $country_display_tax_label} - / - {/if} - {$currency->prefix} - - {$currency->suffix} - {if $country_display_tax_label}({l s='tax excl.'}){/if} +
+ {include file="controllers/products/multishop/checkbox.tpl" field="unit_price" type="unit_price"} + +
+ {$currency->prefix}{$currency->suffix} + + {l s='per'} +
-
+ {if $ps_tax && $country_display_tax_label} +
+
+
+ {l s='or'} + {$currency->prefix}0.00{$currency->suffix} + {l s='per'} {$product->unity} {l s='with tax'} + +
+
+
+ {/if} -{*todo separate fieldset*} +
+ {include file="controllers/products/multishop/checkbox.tpl" field="on_sale" type="default"} +
+
+ +
+
+
+ +
+
+
+ {l s='Final retail price:'} + + {$currency->prefix} + 0.00 + {$currency->suffix} + ({l s='tax incl.'}) + + + {if $country_display_tax_label} + / + {/if} + {$currency->prefix} + + {$currency->suffix} + {if $country_display_tax_label}({l s='tax excl.'}){/if} + +
+
+
+
{if isset($specificPriceModificationForm)} -

{l s='Specific prices'}

+
+

{l s='Specific prices'}

-
- {l s='You can set specific prices for clients belonging to different groups, different countries, etc...'} -
- -
-
- - {l s='Add a new specific price'} - - +
+ {l s='You can set specific prices for clients belonging to different groups, different countries, etc...'}
-
- + -
'; $content .= ' - -{if isset($product->id) && !$product->is_virtual} - +
-

{l s='Add or modify combinations for this product.'}

-
- {l s='Or use the'}  {l s='Product combinations generator'} {l s='in order to automatically create a set of combinations.'} -
- - {if $combination_exists} -
- {l s='Some combinations already exist. If you want to generate new combinations, the quantities for the existing combinations will be lost.'}
- {l s='You can add a combination by clicking the link "Add new combination" on the toolbar.'} -
- {/if} - {if isset($display_multishop_checkboxes) && $display_multishop_checkboxes} -
- {include file="controllers/products/multishop/check_fields.tpl" product_tab="Combinations"} - {/if} - - -
\ No newline at end of file diff --git a/admin-dev/themes/default/template/controllers/products/seo.tpl b/admin-dev/themes/default/template/controllers/products/seo.tpl index be78cd47a..14043dffd 100644 --- a/admin-dev/themes/default/template/controllers/products/seo.tpl +++ b/admin-dev/themes/default/template/controllers/products/seo.tpl @@ -22,96 +22,98 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} - -

{l s='SEO'}

+
+ +

{l s='SEO'}

-{include file="controllers/products/multishop/check_fields.tpl" product_tab="Seo"} + {include file="controllers/products/multishop/check_fields.tpl" product_tab="Seo"} -
- {include file="controllers/products/multishop/checkbox.tpl" field="meta_title" type="default" multilang="true"} - -
-
- {include file="controllers/products/input_text_lang.tpl" - languages=$languages - input_name='meta_title' - input_value=$product->meta_title} -
-
-
- -
- {include file="controllers/products/multishop/checkbox.tpl" field="meta_description" type="default" multilang="true"} - -
-
- {include file="controllers/products/input_text_lang.tpl" - languages=$languages - input_name='meta_description' - input_value=$product->meta_description - } -
-
-
- -
- {include file="controllers/products/multishop/checkbox.tpl" field="meta_keywords" type="default" multilang="true"} - -
-
- {include file="controllers/products/input_text_lang.tpl" languages=$languages - input_value=$product->meta_keywords - input_name='meta_keywords'} -
-
-
- -
- {include file="controllers/products/multishop/checkbox.tpl" field="link_rewrite" type="default" multilang="true"} - -
-
-
-
+
+ {include file="controllers/products/multishop/checkbox.tpl" field="meta_title" type="default" multilang="true"} + +
+
{include file="controllers/products/input_text_lang.tpl" languages=$languages - input_value=$product->link_rewrite - input_name='link_rewrite'} + input_name='meta_title' + input_value=$product->meta_title} +
+
+
+ +
+ {include file="controllers/products/multishop/checkbox.tpl" field="meta_description" type="default" multilang="true"} + +
+
+ {include file="controllers/products/input_text_lang.tpl" + languages=$languages + input_name='meta_description' + input_value=$product->meta_description + } +
+
+
+ +
+ {include file="controllers/products/multishop/checkbox.tpl" field="meta_keywords" type="default" multilang="true"} + +
+
+ {include file="controllers/products/input_text_lang.tpl" languages=$languages + input_value=$product->meta_keywords + input_name='meta_keywords'} +
+
+
+ +
+ {include file="controllers/products/multishop/checkbox.tpl" field="link_rewrite" type="default" multilang="true"} + +
+
+
+
+ {include file="controllers/products/input_text_lang.tpl" + languages=$languages + input_value=$product->link_rewrite + input_name='link_rewrite'} +
+
+
- +
+ +
+
+
+ {l s='The product link will look like this:'} + {$curent_shop_url|escape:'htmlall':'UTF-8'}lang/{if isset($product->id)}{$product->id}{else}id_product{/if}-{$product->link_rewrite[$default_language]}.html
-
- -
-
-
- {l s='The product link will look like this:'} - {$curent_shop_url|escape:'htmlall':'UTF-8'}lang/{if isset($product->id)}{$product->id}{else}id_product{/if}-{$product->link_rewrite[$default_language]}.html -
-
-
\ No newline at end of file +
\ No newline at end of file diff --git a/admin-dev/themes/default/template/controllers/products/shipping.tpl b/admin-dev/themes/default/template/controllers/products/shipping.tpl index 138373960..df35fb7dc 100644 --- a/admin-dev/themes/default/template/controllers/products/shipping.tpl +++ b/admin-dev/themes/default/template/controllers/products/shipping.tpl @@ -22,90 +22,91 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} +
+ +

{l s='Shipping'}

- -

{l s='Shipping'}

+ {if isset($display_common_field) && $display_common_field} +
{l s='Warning, if you change the value of fields with an orange bullet %s, the value will be changed for all other shops for this product' sprintf=$bullet_common_field}
+ {/if} -{if isset($display_common_field) && $display_common_field} -
{l s='Warning, if you change the value of fields with an orange bullet %s, the value will be changed for all other shops for this product' sprintf=$bullet_common_field}
-{/if} - -
- -
- {$ps_dimension_unit} - - {$bullet_common_field} +
+ +
+ {$ps_dimension_unit} + + {$bullet_common_field} +
-
-
- -
- {$ps_dimension_unit} - - {$bullet_common_field} +
+ +
+ {$ps_dimension_unit} + + {$bullet_common_field} +
-
-
- -
- {$ps_dimension_unit} - - {$bullet_common_field} +
+ +
+ {$ps_dimension_unit} + + {$bullet_common_field} +
-
-
- -
- {$ps_weight_unit} - - {$bullet_common_field} +
+ +
+ {$ps_weight_unit} + + {$bullet_common_field} +
-
-
- -
- {$currency->prefix}{$currency->suffix} {if $country_display_tax_label}({l s='tax excl.'}){/if} - +
+ +
+ {$currency->prefix}{$currency->suffix} {if $country_display_tax_label}({l s='tax excl.'}){/if} + +
-
-
- -
-
-
- - - {l s='Add'} -
-
- - - {l s='Remove'} +
+ +
+
+
+ + + {l s='Add'} +
+
+ + + {l s='Remove'} +
-
\ No newline at end of file +
\ No newline at end of file From 8cd8ede1a5d9109fec9fbd49cca8f49ba5188eb3 Mon Sep 17 00:00:00 2001 From: Jerome Nadaud Date: Mon, 19 Aug 2013 13:31:23 +0200 Subject: [PATCH 04/10] [+] BO : Add Highlighted class for default list row --- .../themes/default/template/helpers/list/list_content.tpl | 2 +- controllers/admin/AdminProductsController.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/admin-dev/themes/default/template/helpers/list/list_content.tpl b/admin-dev/themes/default/template/helpers/list/list_content.tpl index 71640bfc4..3d09f9520 100644 --- a/admin-dev/themes/default/template/helpers/list/list_content.tpl +++ b/admin-dev/themes/default/template/helpers/list/list_content.tpl @@ -27,7 +27,7 @@ {foreach $list AS $index => $tr} diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php index 896d2d13f..3a5f22c8a 100644 --- a/controllers/admin/AdminProductsController.php +++ b/controllers/admin/AdminProductsController.php @@ -3762,7 +3762,7 @@ class AdminProductsControllerCore extends AdminController $this->addRowAction('default'); $this->addRowAction('delete'); - $color_by_default = '#BDE5F8'; + $default_class = 'highlighted'; $this->fields_list = array( 'attributes' => array('title' => $this->l('Attributes'), 'align' => 'left'), @@ -3825,7 +3825,7 @@ class AdminProductsControllerCore extends AdminController if ($product_attribute['default_on']) { $comb_array[$id_product_attribute]['name'] = 'is_default'; - $comb_array[$id_product_attribute]['color'] = $color_by_default; + $comb_array[$id_product_attribute]['class'] = $default_class; } } } From d78ac1afe8bcca0b553fdc8ec7ad2afeaf6d4f87 Mon Sep 17 00:00:00 2001 From: Jerome Nadaud Date: Mon, 19 Aug 2013 15:01:56 +0200 Subject: [PATCH 05/10] [-] BO : FixBug action link class --- .../default/template/helpers/list/list_action_addstock.tpl | 2 +- .../default/template/helpers/list/list_action_default.tpl | 2 +- .../themes/default/template/helpers/list/list_action_delete.tpl | 2 +- .../default/template/helpers/list/list_action_details.tpl | 2 +- .../default/template/helpers/list/list_action_duplicate.tpl | 2 +- .../themes/default/template/helpers/list/list_action_edit.tpl | 2 +- .../default/template/helpers/list/list_action_removestock.tpl | 2 +- .../helpers/list/list_action_supplier_order_receipt.tpl | 2 +- .../helpers/list/list_action_supply_order_change_state.tpl | 2 +- .../list/list_action_supply_order_create_from_template.tpl | 2 +- .../template/helpers/list/list_action_supply_order_receipt.tpl | 2 +- .../default/template/helpers/list/list_action_transferstock.tpl | 2 +- admin-dev/themes/default/template/helpers/list/list_content.tpl | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/admin-dev/themes/default/template/helpers/list/list_action_addstock.tpl b/admin-dev/themes/default/template/helpers/list/list_action_addstock.tpl index 5a593025f..59ab663cc 100644 --- a/admin-dev/themes/default/template/helpers/list/list_action_addstock.tpl +++ b/admin-dev/themes/default/template/helpers/list/list_action_addstock.tpl @@ -22,6 +22,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} - + {$action} diff --git a/admin-dev/themes/default/template/helpers/list/list_action_default.tpl b/admin-dev/themes/default/template/helpers/list/list_action_default.tpl index f5b1473b8..8d760ab19 100644 --- a/admin-dev/themes/default/template/helpers/list/list_action_default.tpl +++ b/admin-dev/themes/default/template/helpers/list/list_action_default.tpl @@ -22,6 +22,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} - + {$action} \ No newline at end of file diff --git a/admin-dev/themes/default/template/helpers/list/list_action_delete.tpl b/admin-dev/themes/default/template/helpers/list/list_action_delete.tpl index bcb213af7..b0d4cc0e3 100644 --- a/admin-dev/themes/default/template/helpers/list/list_action_delete.tpl +++ b/admin-dev/themes/default/template/helpers/list/list_action_delete.tpl @@ -22,6 +22,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} - + {$action} \ No newline at end of file diff --git a/admin-dev/themes/default/template/helpers/list/list_action_details.tpl b/admin-dev/themes/default/template/helpers/list/list_action_details.tpl index 113ceed3e..e9dac3669 100644 --- a/admin-dev/themes/default/template/helpers/list/list_action_details.tpl +++ b/admin-dev/themes/default/template/helpers/list/list_action_details.tpl @@ -23,6 +23,6 @@ * International Registered Trademark & Property of PrestaShop SA *} - + {$action} diff --git a/admin-dev/themes/default/template/helpers/list/list_action_duplicate.tpl b/admin-dev/themes/default/template/helpers/list/list_action_duplicate.tpl index 0b575a2f7..3ad8780a4 100644 --- a/admin-dev/themes/default/template/helpers/list/list_action_duplicate.tpl +++ b/admin-dev/themes/default/template/helpers/list/list_action_duplicate.tpl @@ -22,6 +22,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} - + {$action} \ No newline at end of file diff --git a/admin-dev/themes/default/template/helpers/list/list_action_edit.tpl b/admin-dev/themes/default/template/helpers/list/list_action_edit.tpl index 53c0f76b1..cd015f481 100644 --- a/admin-dev/themes/default/template/helpers/list/list_action_edit.tpl +++ b/admin-dev/themes/default/template/helpers/list/list_action_edit.tpl @@ -22,6 +22,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} - + {$action} \ No newline at end of file diff --git a/admin-dev/themes/default/template/helpers/list/list_action_removestock.tpl b/admin-dev/themes/default/template/helpers/list/list_action_removestock.tpl index 151344629..93ad30413 100644 --- a/admin-dev/themes/default/template/helpers/list/list_action_removestock.tpl +++ b/admin-dev/themes/default/template/helpers/list/list_action_removestock.tpl @@ -22,6 +22,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} - + {$action} diff --git a/admin-dev/themes/default/template/helpers/list/list_action_supplier_order_receipt.tpl b/admin-dev/themes/default/template/helpers/list/list_action_supplier_order_receipt.tpl index 1797455a4..3bff90eb1 100644 --- a/admin-dev/themes/default/template/helpers/list/list_action_supplier_order_receipt.tpl +++ b/admin-dev/themes/default/template/helpers/list/list_action_supplier_order_receipt.tpl @@ -22,6 +22,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} - + {$action} diff --git a/admin-dev/themes/default/template/helpers/list/list_action_supply_order_change_state.tpl b/admin-dev/themes/default/template/helpers/list/list_action_supply_order_change_state.tpl index afa90d014..3b5f02d2e 100644 --- a/admin-dev/themes/default/template/helpers/list/list_action_supply_order_change_state.tpl +++ b/admin-dev/themes/default/template/helpers/list/list_action_supply_order_change_state.tpl @@ -22,6 +22,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} - + {$action} \ No newline at end of file diff --git a/admin-dev/themes/default/template/helpers/list/list_action_supply_order_create_from_template.tpl b/admin-dev/themes/default/template/helpers/list/list_action_supply_order_create_from_template.tpl index accaf1054..66e36e7ca 100644 --- a/admin-dev/themes/default/template/helpers/list/list_action_supply_order_create_from_template.tpl +++ b/admin-dev/themes/default/template/helpers/list/list_action_supply_order_create_from_template.tpl @@ -22,6 +22,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} - + {$action} diff --git a/admin-dev/themes/default/template/helpers/list/list_action_supply_order_receipt.tpl b/admin-dev/themes/default/template/helpers/list/list_action_supply_order_receipt.tpl index 8c7b0acb1..1e891d92f 100644 --- a/admin-dev/themes/default/template/helpers/list/list_action_supply_order_receipt.tpl +++ b/admin-dev/themes/default/template/helpers/list/list_action_supply_order_receipt.tpl @@ -22,6 +22,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} - + {$action} \ No newline at end of file diff --git a/admin-dev/themes/default/template/helpers/list/list_action_transferstock.tpl b/admin-dev/themes/default/template/helpers/list/list_action_transferstock.tpl index 427f06513..3a6699f17 100644 --- a/admin-dev/themes/default/template/helpers/list/list_action_transferstock.tpl +++ b/admin-dev/themes/default/template/helpers/list/list_action_transferstock.tpl @@ -22,6 +22,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} - + {$action} diff --git a/admin-dev/themes/default/template/helpers/list/list_content.tpl b/admin-dev/themes/default/template/helpers/list/list_content.tpl index 3d09f9520..b730d8ba4 100644 --- a/admin-dev/themes/default/template/helpers/list/list_content.tpl +++ b/admin-dev/themes/default/template/helpers/list/list_content.tpl @@ -147,7 +147,7 @@ {/foreach} {if $compiled_actions|count > 0}
- {$compiled_actions[0]|replace:'class=""':'class="btn btn-default btn-small"'} + {$compiled_actions[0]|regex_replace:'/class\s*=\s*"(\w*)"/':'class="$1 btn btn-default"'} {if $compiled_actions|count > 1} - +
+ +
+
+
+ +
+ + + + + +
+
+
+
-
- +
+ +
+ +
+ +
+
+
+
+

{l s='Available attachments:'}

+ + {l s='Add'} +
+
+

{l s='Attachments for this product:'}

+ + {l s='Remove'} +
- -
- -
- -
-
-
-
-

{l s='Available attachments:'}

- - {l s='Add'} -
-
-

{l s='Attachments for this product:'}

- - {l s='Remove'} -
-
-
-
- - - - + {/if} \ No newline at end of file diff --git a/admin-dev/themes/default/template/controllers/products/customization.tpl b/admin-dev/themes/default/template/controllers/products/customization.tpl index 1edf26ed8..5fce735e6 100644 --- a/admin-dev/themes/default/template/controllers/products/customization.tpl +++ b/admin-dev/themes/default/template/controllers/products/customization.tpl @@ -24,36 +24,37 @@ *} {if isset($obj->id)} +

{l s='Add or modify customizable properties.'}

{include file="controllers/products/multishop/check_fields.tpl" product_tab="Customization"} -
- {include file="controllers/products/multishop/checkbox.tpl" field="uploadable_files" type="default"} - -
- +
+ {include file="controllers/products/multishop/checkbox.tpl" field="uploadable_files" type="default"} + +
+ +
-
-
- {include file="controllers/products/multishop/checkbox.tpl" field="text_fields" type="default"} - -
- +
+ {include file="controllers/products/multishop/checkbox.tpl" field="text_fields" type="default"} + +
+ +
-
{if $has_file_labels} {l s='Define the label of the file fields:'} @@ -64,5 +65,5 @@ {l s='Define the label of the text fields:'} {$display_text_labels} {/if} - +
{/if} \ No newline at end of file diff --git a/admin-dev/themes/default/template/controllers/products/features.tpl b/admin-dev/themes/default/template/controllers/products/features.tpl index 1be87561d..abe04ba72 100644 --- a/admin-dev/themes/default/template/controllers/products/features.tpl +++ b/admin-dev/themes/default/template/controllers/products/features.tpl @@ -24,6 +24,7 @@ *} {if isset($product->id)} +

{l s='Assign features to this product:'}

@@ -107,5 +108,5 @@ {l s='Add a new feature'} - +
{/if} \ No newline at end of file diff --git a/admin-dev/themes/default/template/controllers/products/images.tpl b/admin-dev/themes/default/template/controllers/products/images.tpl index 7ba647635..a21a42e48 100644 --- a/admin-dev/themes/default/template/controllers/products/images.tpl +++ b/admin-dev/themes/default/template/controllers/products/images.tpl @@ -24,6 +24,7 @@ *} {if isset($id_product) && isset($product)} +

@@ -328,4 +329,5 @@ }); {/literal} +

{/if} \ No newline at end of file diff --git a/admin-dev/themes/default/template/controllers/products/quantities.tpl b/admin-dev/themes/default/template/controllers/products/quantities.tpl index 4a668495b..5bbf73afe 100644 --- a/admin-dev/themes/default/template/controllers/products/quantities.tpl +++ b/admin-dev/themes/default/template/controllers/products/quantities.tpl @@ -24,215 +24,218 @@ *} {if isset($product->id)} - -

{l s='Available quantities for sale'}

- {if !$ps_stock_management} -
{l s='The stock management is disabled'}
- {else} - {include file="controllers/products/multishop/check_fields.tpl" product_tab="Quantities"} -
- {l s='This interface allows you to manage available quantities for sale for products. It also allows you to manage product combinations in the current shop.'}
- {l s='You can choose whether or not to use the advanced stock management system for this product.'}
- {l s='You can manually specify the quantities for the product/each product combination, or you can choose to automatically determine these quantities based on your stock (if advanced stock management is activated).'}
- {l s='In this case, quantities correspond to the real-stock quantities in the warehouses connected with the current shop, or current group of shops.'}
- {l s='For packs: If it has products that use advanced stock management, you have to specify a common warehouse for these products in the pack.'}
- {l s='Also, please note that when a product has combinations, its default combination will be used in stock movements.'} -
- - {if $show_quantities == true} - - - - - - -
is_virtual || $product->cache_is_pack}style="display:none;"{/if} class="row stockForVirtualProduct"> -
-

- -

-
-
- -
is_virtual || $product->cache_is_pack}style="display:none;"{/if} class="row stockForVirtualProduct"> - -
-

- -

-

- -

-
-
- - {if isset($pack_quantity)} -
-

{l s='When a product has combinations, quantities will be based on the default combination.'}

-

{l s='Given the quantities of the products in this pack, the maximum quantity should be:'} {$pack_quantity}

-
- {/if} - - - - - - - - - - - - - {foreach from=$attributes item=attribute} - - - - - {/foreach} -
{l s='Quantity'}{l s='Designation'}
- {$available_quantity[$attribute['id_product_attribute']]} - - {$product_designation[$attribute['id_product_attribute']]}
- -
- -
-

- -

-

- -

-

- -

-
-
- +
+ +

{l s='Available quantities for sale'}

+ {if !$ps_stock_management} +
{l s='The stock management is disabled'}
{else} -
-

{l s='It is not possible to manage quantities when:'}

-
    -
  • {l s='You are currently managing all of your shops.'}
  • -
  • {l s='You are currently managing a group of shops where quantities are not shared between every shop in this group.'}
  • -
  • {l s='You are currently managing a shop that is in a group where quantities are shared between every shop in this group.'}
  • -
+ {include file="controllers/products/multishop/check_fields.tpl" product_tab="Quantities"} +
+ {l s='This interface allows you to manage available quantities for sale for products. It also allows you to manage product combinations in the current shop.'}
+ {l s='You can choose whether or not to use the advanced stock management system for this product.'}
+ {l s='You can manually specify the quantities for the product/each product combination, or you can choose to automatically determine these quantities based on your stock (if advanced stock management is activated).'}
+ {l s='In this case, quantities correspond to the real-stock quantities in the warehouses connected with the current shop, or current group of shops.'}
+ {l s='For packs: If it has products that use advanced stock management, you have to specify a common warehouse for these products in the pack.'}
+ {l s='Also, please note that when a product has combinations, its default combination will be used in stock movements.'}
- {/if} - {/if} -

{l s='Availability settings'}

+ {if $show_quantities == true} + + + - {if !$has_attribute} -
- -
- -
-

{l s='The minimum quantity to buy this product (set to 1 to disable this feature)'}

-
- {/if} - - {if $ps_stock_management} - {include file="controllers/products/multishop/checkbox.tpl" field="available_now" type="default" multilang="true"} -
- -
-
- {include file="controllers/products/input_text_lang.tpl" - languages=$languages - input_value=$product->available_now - input_name='available_now'} -
-
-
-
- {include file="controllers/products/multishop/checkbox.tpl" field="available_later" type="default" multilang="true"} - -
-
- {include file="controllers/products/input_text_lang.tpl" - languages=$languages - input_value=$product->available_later - input_name='available_later'} + +
is_virtual || $product->cache_is_pack}style="display:none;"{/if} class="row stockForVirtualProduct"> +
+

+ +

+
+
+ +
is_virtual || $product->cache_is_pack}style="display:none;"{/if} class="row stockForVirtualProduct"> + +
+

+ +

+

+ +

+
+
+ + {if isset($pack_quantity)} +
+

{l s='When a product has combinations, quantities will be based on the default combination.'}

+

{l s='Given the quantities of the products in this pack, the maximum quantity should be:'} {$pack_quantity}

+
+ {/if} + + + + + + + + + + + + + {foreach from=$attributes item=attribute} + + + + + {/foreach} +
{l s='Quantity'}{l s='Designation'}
+ {$available_quantity[$attribute['id_product_attribute']]} + + {$product_designation[$attribute['id_product_attribute']]}
+ +
+ +
+

+ +

+

+ +

+

+ +

+
+
+ + {else} +
+

{l s='It is not possible to manage quantities when:'}

+
    +
  • {l s='You are currently managing all of your shops.'}
  • +
  • {l s='You are currently managing a group of shops where quantities are not shared between every shop in this group.'}
  • +
  • {l s='You are currently managing a shop that is in a group where quantities are shared between every shop in this group.'}
  • +
+
+ {/if} + {/if} +
+
+

{l s='Availability settings'}

+ + {if !$has_attribute} +
+ +
+ +
+

{l s='The minimum quantity to buy this product (set to 1 to disable this feature)'}

+
+ {/if} + + {if $ps_stock_management} + {include file="controllers/products/multishop/checkbox.tpl" field="available_now" type="default" multilang="true"} +
+ +
+
+ {include file="controllers/products/input_text_lang.tpl" + languages=$languages + input_value=$product->available_now + input_name='available_now'} +
-
- - {if !$countAttributes} - - -

{l s='The available date when this product is out of stock.'}

+
+ {include file="controllers/products/multishop/checkbox.tpl" field="available_later" type="default" multilang="true"} + +
+
+ {include file="controllers/products/input_text_lang.tpl" + languages=$languages + input_value=$product->available_later + input_name='available_later'} +
+
+
+ + {if !$countAttributes} + + +

{l s='The available date when this product is out of stock.'}

+ {/if} {/if} - {/if} - + + {/if} {*$default_language*} \ No newline at end of file diff --git a/admin-dev/themes/default/template/controllers/products/suppliers.tpl b/admin-dev/themes/default/template/controllers/products/suppliers.tpl index 76c0016fa..a9d9a5dec 100644 --- a/admin-dev/themes/default/template/controllers/products/suppliers.tpl +++ b/admin-dev/themes/default/template/controllers/products/suppliers.tpl @@ -25,6 +25,7 @@ {if isset($product->id)} +

{l s='Suppliers of the current product'}

@@ -60,7 +61,8 @@ {l s='Create a new supplier'} - +
+

{l s='Product reference(s)'}

@@ -130,4 +132,5 @@
{/foreach}
+ {/if} \ No newline at end of file diff --git a/admin-dev/themes/default/template/controllers/products/warehouses.tpl b/admin-dev/themes/default/template/controllers/products/warehouses.tpl index 08f5c6fe5..511153e7b 100644 --- a/admin-dev/themes/default/template/controllers/products/warehouses.tpl +++ b/admin-dev/themes/default/template/controllers/products/warehouses.tpl @@ -25,8 +25,9 @@ {if isset($product->id)} +
-

{l s='Product location in warehouses'}

+

{l s='Product location in warehouses'}

{l s='This interface allows you to specify the warehouse in which the product is stocked.'}

@@ -38,51 +39,57 @@ {l s='Create a new warehouse'}{l s='Create a new warehouse'} -
+
{foreach from=$warehouses item=warehouse} -

{$warehouse['name']}

-
- - - - - - - {foreach $attributes AS $index => $attribute} - {assign var=location value=''} - {assign var=selected value=''} - {foreach from=$associated_warehouses item=aw} - {if $aw->id_product == $attribute['id_product'] && $aw->id_product_attribute == $attribute['id_product_attribute'] && $aw->id_warehouse == $warehouse['id_warehouse']} - {assign var=location value=$aw->location} - {assign var=selected value=true} +
+ +
+
+
{l s='Stored'}{l s='Product'}{l s='Location (optional)'}
+ + + + + + {foreach $attributes AS $index => $attribute} + {assign var=location value=''} + {assign var=selected value=''} + {foreach from=$associated_warehouses item=aw} + {if $aw->id_product == $attribute['id_product'] && $aw->id_product_attribute == $attribute['id_product_attribute'] && $aw->id_warehouse == $warehouse['id_warehouse']} + {assign var=location value=$aw->location} + {assign var=selected value=true} + {/if} + {/foreach} + + + + + + {/foreach} + + + + {if $attributes|@count gt 1} + + + + {/if} - {/foreach} - - - - - - {/foreach} - - - - {if $attributes|@count gt 1} - - - - - {/if} -
{l s='Stored'}{l s='Product'}{l s='Location (optional)'}
+ {$product_designation[$attribute['id_product_attribute']]} +
 
{l s='Mark all products as stored in this warehouse.'}
- {$product_designation[$attribute['id_product_attribute']]} -
 
{l s='Mark all products as stored in this warehouse.'}
+ +
+
{/foreach}
-

 

+
{/if} \ No newline at end of file diff --git a/js/admin-products.js b/js/admin-products.js index 09918548b..fe948e824 100644 --- a/js/admin-products.js +++ b/js/admin-products.js @@ -1323,17 +1323,20 @@ product_tabs['Suppliers'] = new function(){ // @TODO: a better way to fix the accordion wrong size bug when the selected page is this page setTimeout(function() { - $('#suppliers_accordion').accordion(); - // If one second was not enough to display page, another resize is needed - setTimeout(function() { - $('#suppliers_accordion').accordion({ heightStyle: "fill" }); - }, 3000); + $('#suppliers_accordion').accordion({ + collapsible: true, + autoHeight: true, + heightStyle: "content"}); }, 1000); // Resize the accordion once the page is visible because of the bug with accordions initialized // inside a display:none block not having the correct size. $('#suppliers_accordion').parents('.product-tab-content').bind('displayed', function(){ - $('#suppliers_accordion').accordion({ heightStyle: "fill" }); + $('#suppliers_accordion').accordion({ + collapsible: true, + autoHeight: true, + heightStyle: "content" + }); }); }; } @@ -1435,13 +1438,21 @@ product_tabs['Warehouses'] = new function(){ // @TODO: a better way to fix the accordion wrong size bug when the selected page is this page setTimeout(function() { - $('#warehouse_accordion').accordion(); - }, 500); + $('#warehouse_accordion').accordion({ + collapsible: true, + autoHeight: true, + heightStyle: "content" + }); + }, 1000); // Resize the accordion once the page is visible because of the bug with accordions initialized // inside a display:none block not having the correct size. $('#warehouse_accordion').parents('.product-tab-content').bind('displayed', function(){ - $('#warehouse_accordion').accordion("refresh"); + $('#warehouse_accordion').accordion({ + collapsible: true, + autoHeight: true, + heightStyle: "content" + }); }); }; } From 00e1b7c0ebcf3dd8fc5db8e792e20ec5a81ee732 Mon Sep 17 00:00:00 2001 From: Jerome Nadaud Date: Tue, 20 Aug 2013 09:36:00 +0200 Subject: [PATCH 09/10] [-] BO : FixBug language in label for --- admin-dev/themes/default/template/helpers/form/form.tpl | 8 ++++---- classes/helper/HelperForm.php | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/admin-dev/themes/default/template/helpers/form/form.tpl b/admin-dev/themes/default/template/helpers/form/form.tpl index 9590bed8f..aced831df 100644 --- a/admin-dev/themes/default/template/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/helpers/form/form.tpl @@ -48,7 +48,6 @@
{$field}
{elseif $key == 'input'} {foreach $field as $input} -
{if $input.type == 'hidden'} @@ -58,7 +57,7 @@ {/if} {block name="label"} {if isset($input.label)} - + {/if} {/block} {block name="field"} diff --git a/classes/helper/HelperForm.php b/classes/helper/HelperForm.php index ff9810baf..ce47c7d52 100644 --- a/classes/helper/HelperForm.php +++ b/classes/helper/HelperForm.php @@ -157,6 +157,7 @@ class HelperFormCore extends Helper 'identifier' => $this->identifier, 'name_controller' => $this->name_controller, 'languages' => $this->languages, + 'current_id_lang' => $this->context->language->id, 'defaultFormLanguage' => $this->default_form_language, 'allowEmployeeFormLang' => $this->allow_employee_form_lang, 'form_id' => $this->id, From 787bf753044e7fac4dfee79321843d5b29e4eec0 Mon Sep 17 00:00:00 2001 From: Jerome Nadaud Date: Tue, 20 Aug 2013 09:52:50 +0200 Subject: [PATCH 10/10] [-] BO : FixBug missing rows and cols attributes for textareas --- controllers/admin/AdminManufacturersController.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/controllers/admin/AdminManufacturersController.php b/controllers/admin/AdminManufacturersController.php index 63b862af2..79d62dc5e 100644 --- a/controllers/admin/AdminManufacturersController.php +++ b/controllers/admin/AdminManufacturersController.php @@ -245,7 +245,9 @@ class AdminManufacturersControllerCore extends AdminController 'name' => 'short_description', 'lang' => true, 'class' => 'rte', - 'hint' => $this->l('Invalid characters:').' <>;=#{}' + 'hint' => $this->l('Invalid characters:').' <>;=#{}', + 'rows' => 2, + 'cols' => 10 ), array( 'type' => 'textarea', @@ -253,7 +255,9 @@ class AdminManufacturersControllerCore extends AdminController 'name' => 'description', 'lang' => true, 'class' => 'rte', - 'hint' => $this->l('Invalid characters:').' <>;=#{}' + 'hint' => $this->l('Invalid characters:').' <>;=#{}', + 'rows' => 2, + 'cols' => 10 ), array( 'type' => 'file', @@ -483,7 +487,9 @@ class AdminManufacturersControllerCore extends AdminController 'label' => $this->l('Other:'), 'name' => 'other', 'required' => false, - 'hint' => $this->l('Forbidden characters:').' <>;=#{}' + 'hint' => $this->l('Forbidden characters:').' <>;=#{}', + 'rows' => 2, + 'cols' => 10 ); $form['submit'] = array( 'title' => $this->l('Save '),