diff --git a/admin-dev/ajaxfilemanager/ajax_file_upload.php b/admin-dev/ajaxfilemanager/ajax_file_upload.php index b21a39c13..c942991ed 100755 --- a/admin-dev/ajaxfilemanager/ajax_file_upload.php +++ b/admin-dev/ajaxfilemanager/ajax_file_upload.php @@ -22,26 +22,18 @@ $upload->setInvalidFileExt(explode(",", CONFIG_UPLOAD_INVALID_EXTS)); if(CONFIG_SYS_VIEW_ONLY || !CONFIG_OPTIONS_UPLOAD) - { $error = SYS_DISABLED; - } elseif(empty($_GET['folder']) || !isUnderRoot($_GET['folder'])) - { $error = ERR_FOLDER_PATH_NOT_ALLOWED; - }else if(!$upload->isFileUploaded('file')) - { + elseif (!$upload->isFileUploaded('file')) $error = ERR_FILE_NOT_UPLOADED; - }else if(!$upload->moveUploadedFile($_GET['folder'])) - { - $error = ERR_FILE_MOVE_FAILED; - } - elseif(!$upload->isPermittedFileExt(explode(",", CONFIG_UPLOAD_VALID_EXTS))) - { + elseif (!$upload->isPermittedFileExt(explode(",", CONFIG_UPLOAD_VALID_EXTS))) $error = ERR_FILE_TYPE_NOT_ALLOWED; - }elseif(defined('CONFIG_UPLOAD_MAXSIZE') && CONFIG_UPLOAD_MAXSIZE && $upload->isSizeTooBig(CONFIG_UPLOAD_MAXSIZE)) - { + elseif (defined('CONFIG_UPLOAD_MAXSIZE') && CONFIG_UPLOAD_MAXSIZE && $upload->isSizeTooBig(CONFIG_UPLOAD_MAXSIZE)) $error = sprintf(ERROR_FILE_TOO_BID, transformFileSize(CONFIG_UPLOAD_MAXSIZE)); - }else + elseif (!$upload->moveUploadedFile($_GET['folder'])) + $error = ERR_FILE_MOVE_FAILED; + else { include_once(CLASS_FILE); $path = $upload->getFilePath(); diff --git a/admin-dev/ajaxfilemanager/ajax_get_file_listing.php b/admin-dev/ajaxfilemanager/ajax_get_file_listing.php index c72110344..bb85caada 100755 --- a/admin-dev/ajaxfilemanager/ajax_get_file_listing.php +++ b/admin-dev/ajaxfilemanager/ajax_get_file_listing.php @@ -24,7 +24,8 @@ if(!empty($_GET['search'])) { include_once(CLASS_SEARCH); - + if (!preg_match('/^'.Tools::pRegexp(realpath(dirname(__FILE__).'/'.$_GET['search_folder']), '/').'/i', _PS_ROOT_DIR_.'/img/cms')) + exit; $search = new Search($_GET['search_folder']); $search->addSearchKeyword('recursive', @$_GET['search_recursively']); $search->addSearchKeyword('mtime_from', @$_GET['search_mtime_from']); diff --git a/admin-dev/ajaxfilemanager/inc/config.base.php b/admin-dev/ajaxfilemanager/inc/config.base.php index 28155f21e..5b57feed0 100755 --- a/admin-dev/ajaxfilemanager/inc/config.base.php +++ b/admin-dev/ajaxfilemanager/inc/config.base.php @@ -78,9 +78,9 @@ define('CONFIG_EDITABLE_VALID_EXTS', 'txt,htm,html,xml,js,css'); //make you include all these extension in CONFIG_UPLOAD_VALID_EXTS if you want all valid define('CONFIG_OVERWRITTEN', false); //overwirte when processing paste - define('CONFIG_UPLOAD_VALID_EXTS', 'gif,jpg,png');// // + define('CONFIG_UPLOAD_VALID_EXTS', 'gif,jpg,jpeg,png');// // //define('CONFIG_UPLOAD_VALID_EXTS', 'gif,jpg,png,bmp,tif,zip,sit,rar,gz,tar,htm,html,mov,mpg,avi,asf,mpeg,wmv,aif,aiff,wav,mp3,swf,ppt,rtf,doc,pdf,xls,txt,xml,xsl,dtd');// - define("CONFIG_VIEWABLE_VALID_EXTS", 'gif,jpg,png'); + define("CONFIG_VIEWABLE_VALID_EXTS", 'gif,jpg,jpeg,jpeg,png'); //define('CONFIG_UPLOAD_VALID_EXTS', 'gif,jpg,png,txt'); // define('CONFIG_UPLOAD_INVALID_EXTS', ''); diff --git a/admin-dev/ajaxfilemanager/inc/config.php b/admin-dev/ajaxfilemanager/inc/config.php index 2f30ed245..09b4e4200 100755 --- a/admin-dev/ajaxfilemanager/inc/config.php +++ b/admin-dev/ajaxfilemanager/inc/config.php @@ -10,6 +10,9 @@ //FILESYSTEM CONFIG
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "class.auth.php"); + if (_PS_MODE_DEMO_) + die('This functionality has been disabled.'); + define('CONFIG_QUERY_STRING_ENABLE', true); //Enable passed query string to setting the system configuration if(!isset($_SESSION)) { diff --git a/admin-dev/ajaxfilemanager/inc/config.tinymce.php b/admin-dev/ajaxfilemanager/inc/config.tinymce.php index c406f47e5..9070323a2 100755 --- a/admin-dev/ajaxfilemanager/inc/config.tinymce.php +++ b/admin-dev/ajaxfilemanager/inc/config.tinymce.php @@ -73,9 +73,9 @@ define('CONFIG_EDITABLE_VALID_EXTS', 'txt,htm,html,xml,js,css'); //make you include all these extension in CONFIG_UPLOAD_VALID_EXTS if you want all valid define('CONFIG_OVERWRITTEN', false); //overwirte when processing paste - define('CONFIG_UPLOAD_VALID_EXTS', 'gif,jpg,png,txt'); // + define('CONFIG_UPLOAD_VALID_EXTS', 'gif,jpg,jpeg,png,txt'); // //define('CONFIG_UPLOAD_VALID_EXTS', 'gif,jpg,png,bmp,tif,zip,sit,rar,gz,tar,htm,html,mov,mpg,avi,asf,mpeg,wmv,aif,aiff,wav,mp3,swf,ppt,rtf,doc,pdf,xls,txt,xml,xsl,dtd');// - define("CONFIG_VIEWABLE_VALID_EXTS", 'gif,bmp,txt,jpg,png,tif,html,htm,js,css,xml,xsl,dtd,mp3,wav,wmv,wma,rm,rmvb,mov,swf'); + define("CONFIG_VIEWABLE_VALID_EXTS", 'gif,bmp,txt,jpg,jpeg,png,tif,html,htm,js,css,xml,xsl,dtd,mp3,wav,wmv,wma,rm,rmvb,mov,swf'); //define('CONFIG_UPLOAD_VALID_EXTS', 'gif,jpg,png,txt'); // define('CONFIG_UPLOAD_INVALID_EXTS', ''); diff --git a/admin-dev/themes/default/template/controllers/customer_threads/message.tpl b/admin-dev/themes/default/template/controllers/customer_threads/message.tpl index ac3651e00..26d3a4930 100644 --- a/admin-dev/themes/default/template/controllers/customer_threads/message.tpl +++ b/admin-dev/themes/default/template/controllers/customer_threads/message.tpl @@ -53,12 +53,12 @@ {/if}
{l s='Sent on:'}
-
{$message.date_add}
+
{$message.date_add} 
{if empty($message.id_employee)}
{l s='Browser:'}
-
{$message.user_agent}
+
{$message.user_agent} 
{/if} {if !empty($message.file_name) && $file_name} @@ -72,33 +72,26 @@ {/if} - {if !empty($message.id_order) && empty($message.id_employee)} -
+ {if !empty($message.id_order) && $is_valid_order_id && empty($message.id_employee)} +
{l s='Order #'}
-
- - {$message.id_order} - +
{$message.id_order} {l s='View'}
{/if} {if !empty($message.id_product) && empty($message.id_employee)}
{l s='Product #'}
-
- - {$message.id_product} - -
+
{$message.id_product} {l s='View'}
{/if} - -
-
-
{l s='Subject:'}
+ + + +
+
{l s='Subject:'}
- - {foreach $contacts as $contact}
-{/if} \ No newline at end of file +{/if} diff --git a/admin-dev/themes/default/template/controllers/customers/helpers/view/view.tpl b/admin-dev/themes/default/template/controllers/customers/helpers/view/view.tpl index a9e9aabb4..780737498 100644 --- a/admin-dev/themes/default/template/controllers/customers/helpers/view/view.tpl +++ b/admin-dev/themes/default/template/controllers/customers/helpers/view/view.tpl @@ -26,7 +26,6 @@ {extends file="helpers/view/view.tpl"} {block name="override_tpl"} - \ No newline at end of file + diff --git a/admin-dev/themes/default/template/controllers/orders/_print_pdf_icon.tpl b/admin-dev/themes/default/template/controllers/orders/_print_pdf_icon.tpl index 6c2b4f0fb..3860f2533 100644 --- a/admin-dev/themes/default/template/controllers/orders/_print_pdf_icon.tpl +++ b/admin-dev/themes/default/template/controllers/orders/_print_pdf_icon.tpl @@ -39,4 +39,4 @@ {/if} - \ No newline at end of file + diff --git a/admin-dev/themes/default/template/controllers/orders/form.tpl b/admin-dev/themes/default/template/controllers/orders/form.tpl index fba6583b6..f3af6c574 100755 --- a/admin-dev/themes/default/template/controllers/orders/form.tpl +++ b/admin-dev/themes/default/template/controllers/orders/form.tpl @@ -689,7 +689,7 @@ var id_product = Number(this.id_product); var id_product_attribute = Number(this.id_product_attribute); cart_quantity[Number(this.id_product)+'_'+Number(this.id_product_attribute)+'_'+Number(this.id_customization)] = this.cart_quantity; - cart_content += ''+this.name+'
'+this.attributes_small+''+this.reference+''; + cart_content += ''+this.name+'
'+this.attributes_small+''+this.reference+''; cart_content += (!this.id_customization ? '
' : ''); cart_content += (!this.id_customization ? '' : ''); cart_content += (!this.id_customization ? '
' : ''); @@ -748,6 +748,16 @@ $('#payment_list').html(payment_list); } + function fixPriceFormat(price) + { + if(price.indexOf(',') > 0 && price.indexOf('.') > 0) // if contains , and . + if(price.indexOf(',') < price.indexOf('.')) // if , is before . + price = price.replace(',',''); // remove , + price = price.replace(' ',''); // remove any spaces + price = price.replace(',','.'); // remove , if price did not cotain both , and . + return price; + } + function displaySummary(jsonSummary) { currency_format = jsonSummary.currency.format; @@ -783,13 +793,13 @@ if (!changed_shipping_price) $('#shipping_price').html('' + formatCurrency(parseFloat(jsonSummary.summary.total_shipping), currency_format, currency_sign, currency_blank) + ''); shipping_price_selected_carrier = jsonSummary.summary.total_shipping; - - $('#total_vouchers').html(formatCurrency(parseFloat(jsonSummary.summary.total_discounts_tax_exc.replace(',', '.')), currency_format, currency_sign, currency_blank)); - $('#total_shipping').html(formatCurrency(parseFloat(jsonSummary.summary.total_shipping_tax_exc.replace(',', '.')), currency_format, currency_sign, currency_blank)); - $('#total_taxes').html(formatCurrency(parseFloat(jsonSummary.summary.total_tax.replace(',', '.')), currency_format, currency_sign, currency_blank)); - $('#total_without_taxes').html(formatCurrency(parseFloat(jsonSummary.summary.total_price_without_tax.replace(',', '.')), currency_format, currency_sign, currency_blank)); - $('#total_with_taxes').html(formatCurrency(parseFloat(jsonSummary.summary.total_price.replace(',', '.')), currency_format, currency_sign, currency_blank)); - $('#total_products').html(formatCurrency(parseFloat(jsonSummary.summary.total_products.replace(',', '.')), currency_format, currency_sign, currency_blank)); + + $('#total_vouchers').html(formatCurrency(parseFloat(fixPriceFormat(jsonSummary.summary.total_discounts_tax_exc)), currency_format, currency_sign, currency_blank)); + $('#total_shipping').html(formatCurrency(parseFloat(fixPriceFormat(jsonSummary.summary.total_shipping_tax_exc)), currency_format, currency_sign, currency_blank)); + $('#total_taxes').html(formatCurrency(parseFloat(fixPriceFormat(jsonSummary.summary.total_tax)), currency_format, currency_sign, currency_blank)); + $('#total_without_taxes').html(formatCurrency(parseFloat(fixPriceFormat(jsonSummary.summary.total_price_without_tax)), currency_format, currency_sign, currency_blank)); + $('#total_with_taxes').html(formatCurrency(parseFloat(fixPriceFormat(jsonSummary.summary.total_price)), currency_format, currency_sign, currency_blank)); + $('#total_products').html(formatCurrency(parseFloat(fixPriceFormat(jsonSummary.summary.total_products)), currency_format, currency_sign, currency_blank)); id_currency = jsonSummary.cart.id_currency; $('#id_currency option').removeAttr('selected'); $('#id_currency option[value="'+id_currency+'"]').attr('selected', true); diff --git a/admin-dev/themes/default/template/controllers/orders/helpers/view/view.tpl b/admin-dev/themes/default/template/controllers/orders/helpers/view/view.tpl index bf1862951..6352e2d87 100755 --- a/admin-dev/themes/default/template/controllers/orders/helpers/view/view.tpl +++ b/admin-dev/themes/default/template/controllers/orders/helpers/view/view.tpl @@ -65,29 +65,27 @@
- {l s='Date'}
sous-titre
+ {l s='Date'}
{l s='subtitle'}
{dateFormat date=$order->date_add full=false}
- {l s='Messages'}
sous-titre
- + {l s='Messages'}
{l s='subtitle'}
{sizeof($customer_thread_message)}
- {l s='Products'}
sous-titre
+ {l s='Products'}
{l s='subtitle'}
{sizeof($products)}
- {l s='Total'}
sous-titre
+ {l s='Total'}
{l s='subtitle'}
{displayPrice price=$order->total_paid_tax_incl currency=$currency->id}
- {hook h="displayAdminOrder" id_order=$order->id}
@@ -534,7 +532,7 @@
@@ -1114,8 +1108,6 @@
- - {if (sizeof($messages))}

diff --git a/admin-dev/themes/default/template/controllers/products/associations.tpl b/admin-dev/themes/default/template/controllers/products/associations.tpl index 56e4981b0..2b042eb0b 100644 --- a/admin-dev/themes/default/template/controllers/products/associations.tpl +++ b/admin-dev/themes/default/template/controllers/products/associations.tpl @@ -92,16 +92,16 @@

diff --git a/admin-dev/themes/default/template/controllers/products/combinations.tpl b/admin-dev/themes/default/template/controllers/products/combinations.tpl index e1e7337e7..f0e083657 100644 --- a/admin-dev/themes/default/template/controllers/products/combinations.tpl +++ b/admin-dev/themes/default/template/controllers/products/combinations.tpl @@ -24,14 +24,12 @@ *} {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.'}
@@ -72,11 +65,8 @@
{include file="controllers/products/multishop/check_fields.tpl" product_tab="Combinations"} {/if} -
- +
- +

-
-
- -
-
- {if $ps_use_ecotax}
{/if} -
-
-
-
@@ -344,14 +318,13 @@
  • {/foreach}
    -
    - {$list} -{/if} \ No newline at end of file +{/if} diff --git a/admin-dev/themes/default/template/controllers/products/images.tpl b/admin-dev/themes/default/template/controllers/products/images.tpl index ee90b0a4a..caa7686c7 100644 --- a/admin-dev/themes/default/template/controllers/products/images.tpl +++ b/admin-dev/themes/default/template/controllers/products/images.tpl @@ -33,27 +33,42 @@
    - -
    - {l s='File:'} -
    - +
    + +
    + {l s='File:'} +
    + +
    +
    + + + {if Tools::getValue('id_image')} + + {/if}
    -
    - +
    + +
    + {foreach from=$languages item=language} +
    + id}disabled="disabled"{/if} id="legend_{$language.id_lang}" name="legend_{$language.id_lang}" value="{$product->name[$language.id_lang]|escape:'htmlall':'UTF-8'}"/> +
    {l s='Invalid characters:'} <>;=#{}
    +
    + {/foreach}
    - - {if Tools::getValue('id_image')} - - {/if}
    @@ -61,6 +76,7 @@ {l s='Image'} + {l s='Legend'} {l s='Position'} {if $shops} {foreach from=$shops item=shop} @@ -79,9 +95,10 @@ - image_id + image_id + legend image_position @@ -129,7 +146,7 @@ } else assoc = false; - imageLine({$image->id}, "{$image->getExistingImgPath()}", {$image->position}, "{if $image->cover}icon-check-sign{else}icon-check-empty{/if}", assoc); + imageLine({$image->id}, "{$image->getExistingImgPath()}", {$image->position}, "{if $image->cover}icon-check-sign{else}icon-check-empty{/if}", assoc, "{$image->legend[$default_language]|@addcslashes:'\"'}"); {/foreach} {literal} $("#imageTable").tableDnD( @@ -149,19 +166,18 @@ } }); var filecheck = 1; - var uploader = new qq.FileUploader( + var params = new Array; + params['id_product'] = {/literal}{$id_product|intval}{literal}; + params['id_category'] = {/literal}{$id_category_default|intval}{literal}; + params['token'] = "{/literal}{$token}{literal}"; + params['tab'] = "AdminProducts"; + params['action'] = "addImage"; + params['ajax'] = 1; + 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); @@ -186,7 +202,7 @@ cover = "icon-check-empty"; if (responseJSON.cover == "1") cover = "icon-check-sign"; - imageLine(responseJSON.id, responseJSON.path, responseJSON.position, cover, responseJSON.shops) + imageLine(responseJSON.id, responseJSON.path, responseJSON.position, cover, responseJSON.shops, responseJSON.legend[{/literal}{$default_language|intval}{literal}]) $("#imageTable tr:last").after(responseJSON.html); $("#countImage").html(parseInt($("#countImage").html()) + 1); $("#img" + id).remove(); @@ -199,6 +215,12 @@ }, onSubmit: function(id, filename) { + $('input[id^="legend_"]').each(function() + { + id = $(this).prop("id").replace("legend_", "legend[") + "]"; + params[id] = $(this).val(); + }); + uploader.setParams(params); $("#imageTable").show(); $("#listImage").append("
  • " + filename + "
  • "); } @@ -286,8 +308,7 @@ "ajax" : 1 }); }); - - //function + function updateImagePosition(json) { doAdminAjax( @@ -306,13 +327,14 @@ $("#img" + id).remove(); } - function imageLine(id, path, position, cover, shops) + function imageLine(id, path, position, cover, shops, legend) { line = $("#lineType").html(); - line = line.replace(/image_id/g, id); - line = line.replace(/[a-z]{2}-default-small_default/g, path+'-small_default'); + line = line.replace(/image_id/g, legend); + line = line.replace(/[a-z]{0,2}-default-small_default/g, path+'-small_default'); line = line.replace(/image_path/g, path); line = line.replace(/image_position/g, position); + line = line.replace(/legend/g, legend); line = line.replace(/icon-check-empty/g, cover); line = line.replace(//gi, ""); line = line.replace(/<\/tbody>/gi, ""); @@ -330,4 +352,4 @@ {/literal}
    -{/if} \ No newline at end of file +{/if} diff --git a/admin-dev/themes/default/template/controllers/products/informations.tpl b/admin-dev/themes/default/template/controllers/products/informations.tpl index 6ee1eb156..b07c3ba4d 100644 --- a/admin-dev/themes/default/template/controllers/products/informations.tpl +++ b/admin-dev/themes/default/template/controllers/products/informations.tpl @@ -429,6 +429,17 @@
    {/if} {foreach from=$languages item=language} + {literal} + + {/literal} {if $languages|count > 1}
    diff --git a/admin-dev/themes/default/template/controllers/products/prices.tpl b/admin-dev/themes/default/template/controllers/products/prices.tpl index 6b869c090..56f76a432 100644 --- a/admin-dev/themes/default/template/controllers/products/prices.tpl +++ b/admin-dev/themes/default/template/controllers/products/prices.tpl @@ -444,7 +444,7 @@ $(document).ready(function () {
    @@ -453,7 +453,6 @@ $(document).ready(function () {

    {l s='The discount is applied after the tax'}

    -
    - {/block} - diff --git a/admin-dev/themes/default/template/header.tpl b/admin-dev/themes/default/template/header.tpl index 30d58f73a..c74ed0cba 100644 --- a/admin-dev/themes/default/template/header.tpl +++ b/admin-dev/themes/default/template/header.tpl @@ -44,14 +44,14 @@ var roundMode = {$round_mode}; {if isset($shop_context)} {if $shop_context == Shop::CONTEXT_ALL} - var youEditFieldFor = "{l s='A modification of this field will be applied for all shops' slashes=1 }"; + var youEditFieldFor = '{l s='A modification of this field will be applied for all shops' slashes=1}'; {elseif $shop_context == Shop::CONTEXT_GROUP} - var youEditFieldFor = "{l s='A modification of this field will be applied for all shops of group ' slashes=1 }{$shop_name}"; + var youEditFieldFor = '{l s='A modification of this field will be applied for all shops of group' slashes=1}{$shop_name}'; {else} - var youEditFieldFor = "{l s='A modification of this field will be applied for the shop ' slashes=1 }{$shop_name}"; + var youEditFieldFor = '{l s='A modification of this field will be applied for the shop' slashes=1}{$shop_name}'; {/if} - {else} - var youEditFieldFor = ''; + {else} + var youEditFieldFor = ''; {/if} {* Notifications vars *} var autorefresh_notifications = '{$autorefresh_notifications}'; @@ -66,12 +66,12 @@ var new_msg = '{l s='A new message posted on your shop.' slashes=1}'; var excerpt_msg = '{l s='Excerpt: ' slashes=1}'; var see_msg = '{l s='Read this message' slashes=1}'; - var token_admin_orders = '{getAdminToken tab='AdminOrders' slashes=1}'; - var token_admin_customers = '{getAdminToken tab='AdminCustomers' slashes=1}'; - var token_admin_customer_threads = '{getAdminToken tab='AdminCustomerThreads' slashes=1}'; + var token_admin_orders = '{getAdminToken tab='AdminOrders'}'; + var token_admin_customers = '{getAdminToken tab='AdminCustomers'}'; + var token_admin_customer_threads = '{getAdminToken tab='AdminCustomerThreads'}'; var currentIndex = '{$currentIndex}'; var default_language = '{$default_language|intval}'; - var choose_language_translate = "{l s='Choose language' slashes=1}"; + var choose_language_translate = '{l s='Choose language' slashes=1}'; var admin_modules_link = '{$link->getAdminLink("AdminModules")|addslashes}'; var tab_modules_list = '{if isset($tab_modules_list) && $tab_modules_list}{$tab_modules_list|addslashes}{/if}'; diff --git a/admin-dev/themes/default/template/helpers/form/form.tpl b/admin-dev/themes/default/template/helpers/form/form.tpl index eb605b76e..d9ef5e964 100644 --- a/admin-dev/themes/default/template/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/helpers/form/form.tpl @@ -178,8 +178,7 @@ +
    ' .$this->l('Evaluation of available quantities for sale.'). '
    @@ -92,7 +93,7 @@ class StatsStock extends Module
    {l s='DNI / NIF / NIE'}

    - {assign var="stateExist" value="false"} - {assign var="postCodeExist" value="false"} + {assign var="stateExist" value=false} + {assign var="postCodeExist" value=false} {foreach from=$ordered_adr_fields item=field_name} {if $field_name eq 'company'}

    @@ -142,7 +142,7 @@ $(function(){ldelim}

    {/if} {if $field_name eq 'postcode'} - {assign var="postCodeExist" value="true"} + {assign var="postCodeExist" value=true}

    @@ -192,7 +192,7 @@ $(function(){ldelim} {/if} {/if} {if $field_name eq 'State:name'} - {assign var="stateExist" value="true"} + {assign var="stateExist" value=true}

    {/if} - {if $stateExist eq "false"} + {if !$stateExist}

    {foreach from=$countries item=v} - + {/foreach}

    - {elseif $field_name eq "State:name"} + {elseif $field_name eq "State:name"} {assign var='stateExist' value=true}

    @@ -319,11 +357,6 @@ $(document).ready(function() {

    - {elseif $field_name eq "phone"} -

    - - -

    {/if} {/foreach} {if $stateExist eq false} @@ -340,19 +373,106 @@ $(document).ready(function() {

    {/if} +

    + + +

    - +

    + + +

    +
    - {$HOOK_CREATE_ACCOUNT_FORM}

    *{l s='Required field'} @@ -532,7 +652,7 @@ $(document).ready(function() {

    @@ -565,13 +685,13 @@ $(document).ready(function() {

    {if isset($one_phone_at_least) && $one_phone_at_least} -

    {l s='You must register at least one phone number.'}

    - {/if} +

    {l s='You must register at least one phone number.'}

    + {/if}

    -

    +

    diff --git a/themes/default/css/product_list.css b/themes/default/css/product_list.css index d0f8d83bf..e5fb9dec3 100644 --- a/themes/default/css/product_list.css +++ b/themes/default/css/product_list.css @@ -1,167 +1,148 @@ ul#product_list { list-style-type: none } - #product_list li { - margin-bottom: 14px; - padding: 12px 8px; - border: 1px solid #eee; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px - } - #product_list li a { - color: #374853; - text-decoration: none - } - +#product_list li { + margin-bottom: 14px; + padding: 12px 8px; + border: 1px solid #eee; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px +} +#product_list li a { + color: #374853; + text-decoration: none +} #product_list li .left_block { float:left; padding-top:58px; width:15px } - #product_list li .left_block .compare label {display:none;} - - #product_list li p.compare input { - vertical-align: text-bottom - } +#product_list li .left_block .compare label {display:none;} +#product_list li p.compare input { + vertical-align: text-bottom +} #product_list li .center_block { float: left; padding:0 7px; width: 342px;/* 356 */ border-right:1px dotted #ccc } - #product_list a.product_img_link { - overflow:hidden; - position:relative; - float: left; - display:block; - margin-right: 14px; - border: 1px solid #ccc - } - #product_list a.product_img_link img { - display: block; - vertical-align: bottom - } - #product_list li span.new { - display: block; - position: absolute; - top: 15px; - right:-30px; - padding: 1px 4px; - width: 101px; - font-size:10px; - color: #fff; - text-align: center; - text-transform: uppercase; - -moz-transform: rotate(45deg); - -webkit-transform: rotate(45deg); - -o-transform:rotate(45deg); - background-color: #990000; - transform: rotate(45deg); - -ms-transform: rotate(45deg); /* Newer browsers */ - } - - .ie8 #product_list li span.new{top:111px;right:0;width:94%} - .ie7 #product_list li span.new {top:111px;right:0;width:94%} - #product_list li h3 { - padding:0 0 10px 0; - font-size:13px; - color:#000 - } - #product_list li a { - color: #000; - text-decoration: none; - } +#product_list a.product_img_link { + overflow:hidden; + position:relative; + float: left; + display:block; + margin-right: 14px; + border: 1px solid #ccc +} +#product_list a.product_img_link img { + display: block; + vertical-align: bottom +} +#product_list li span.new { + display: block; + position: absolute; + top: 15px; + right:-30px; + padding: 1px 4px; + width: 101px; + font-size:10px; + color: #fff; + text-align: center; + text-transform: uppercase; + -moz-transform: rotate(45deg); + -webkit-transform: rotate(45deg); + -o-transform:rotate(45deg); + background-color: #990000; + transform: rotate(45deg); + -ms-transform: rotate(45deg); /* Newer browsers */ +} - #product_list li p.product_desc { - overflow: hidden; - padding:0; - line-height:16px; - } - #product_list li p.product_desc, - #product_list li p.product_desc a { - color:#666; - } +.ie8 #product_list li span.new{top:111px;right:0;width:94%} +.ie7 #product_list li span.new {top:111px;right:0;width:94%} +#product_list li h3 { + padding:0 0 10px 0; + font-size:13px; + color:#000 +} +#product_list li a { + color: #000; + text-decoration: none; +} +#product_list li p.product_desc { + overflow: hidden; + padding:0; + line-height:16px; +} +#product_list li p.product_desc, +#product_list li p.product_desc a { + color:#666; +} #product_list li .right_block { - position:relative; - float: left; - width: 145px; - text-align: right +position:relative; +float: left; +width: 145px; +text-align: right } - #product_list li .discount, ul#product_list li .on_sale, ul#product_list li .online_only { - display: block; - font-weight: bold; - color: #990000; - text-transform: uppercase - } - #product_list li .discount { - position:absolute; - top:0; - right:0; - display: inline-block; - font-weight: bold; - padding: 1px 5px; - font-size: 10px; - color: #fff; - text-transform: uppercase; - background: none repeat scroll 0 0 #9B0000 - } - #product_list li .online_only { - margin:0 0 10px 0 - } - #product_list li .content_price { - margin:26px 0 15px 0; - } - #product_list li .price { - display: block; - margin-bottom: 15px; - font-weight:bold; - font-size: 18px; - color:#990000 - } - #product_list li span.availability { - color: #488C40 - } - #product_list li .ajax_add_to_cart_button { - padding-left: 20px - } - #product_list li .ajax_add_to_cart_button span { - display: block; - position: absolute; - top: -1px; - left: -12px; - height: 26px; - width: 26px; - background: url(../img/icon/pict_add_cart.png) no-repeat 0 0 transparent - } - #product_list li .lnk_view { - display: block; - margin-top:15px; - padding:0 10px; - border:none; - font-weight:bold; - color:#0088CC; - background:url(../img/arrow_right_1.png) no-repeat 100% 4px transparent - } - #product_list li .lnk_view:hover {text-decoration:underline} - - #color_to_pick_list { - list-style-type:none; - width:125px; - float:left; - } - - #color_to_pick_list li { - float:left; - clear:none; - padding:0; - margin-bottom:1px; - } - - #color_to_pick_list li a { - display:block; - height:20px; - width:20px; - } +#product_list li .discount, ul#product_list li .on_sale, ul#product_list li .online_only { + display: block; + font-weight: bold; + color: #990000; + text-transform: uppercase +} +#product_list li .discount { + position:absolute; + top:0; + right:0; + display: inline-block; + font-weight: bold; + padding: 1px 5px; + font-size: 10px; + color: #fff; + text-transform: uppercase; + background: none repeat scroll 0 0 #9B0000 +} +#product_list li .online_only { + margin:0 0 10px 0 +} +#product_list li .content_price { + margin:26px 0 15px 0; +} +#product_list li .price { + display: block; + margin-bottom: 15px; + font-weight:bold; + font-size: 18px; + color:#990000 +} +#product_list li span.availability { + color: #488C40 +} +#product_list li span.warning_inline { + color: red +} +#product_list li .ajax_add_to_cart_button { + padding-left: 20px +} +#product_list li .ajax_add_to_cart_button span { + display: block; + position: absolute; + top: -1px; + left: -12px; + height: 26px; + width: 26px; + background: url(../img/icon/pict_add_cart.png) no-repeat 0 0 transparent +} +#product_list li .lnk_view { + display: block; + margin-top:15px; + padding:0 10px; + border:none; + font-weight:bold; + color:#0088CC; + background:url(../img/arrow_right_1.png) no-repeat 100% 4px transparent +} +#product_list li .lnk_view:hover {text-decoration:underline} \ No newline at end of file diff --git a/themes/default/js/order-opc.js b/themes/default/js/order-opc.js index 6480375fb..cbfb44f9c 100644 --- a/themes/default/js/order-opc.js +++ b/themes/default/js/order-opc.js @@ -308,7 +308,7 @@ function saveAddress(type) params += 'address2='+encodeURIComponent($('#address2'+(type == 'invoice' ? '_invoice' : '')).val())+'&'; params += 'postcode='+encodeURIComponent($('#postcode'+(type == 'invoice' ? '_invoice' : '')).val())+'&'; params += 'city='+encodeURIComponent($('#city'+(type == 'invoice' ? '_invoice' : '')).val())+'&'; - params += 'id_country='+encodeURIComponent($('#id_country').val())+'&'; + params += 'id_country='+encodeURIComponent($('#id_country'+(type == 'invoice' ? '_invoice' : '')).val())+'&'; if ($('#id_state'+(type == 'invoice' ? '_invoice' : '')).val()) params += 'id_state='+encodeURIComponent($('#id_state'+(type == 'invoice' ? '_invoice' : '')).val())+'&'; params += 'other='+encodeURIComponent($('#other'+(type == 'invoice' ? '_invoice' : '')).val())+'&'; diff --git a/themes/default/js/product.js b/themes/default/js/product.js index 2cff98d95..dc122d166 100644 --- a/themes/default/js/product.js +++ b/themes/default/js/product.js @@ -417,14 +417,20 @@ function displayImage(domAAroundImgThumb, no_animation) { if (typeof(no_animation) == 'undefined') no_animation = false; - if (domAAroundImgThumb.attr('href')) + if (domAAroundImgThumb.prop('href')) { - var newSrc = domAAroundImgThumb.attr('href').replace('thickbox', 'large'); - if ($('#bigpic').attr('src') != newSrc) + var new_src = domAAroundImgThumb.prop('href').replace('thickbox', 'large'); + var new_title = domAAroundImgThumb.prop('title'); + var new_href = domAAroundImgThumb.prop('href'); + if ($('#bigpic').prop('src') != new_src) { - $('#bigpic').attr('src', newSrc).load(function() { + $('#bigpic').prop({ + 'src' : new_src, + 'alt' : new_title, + 'title' : new_title + }).load(function(){ if (typeof(jqZoomEnabled) != 'undefined' && jqZoomEnabled) - $(this).attr('rel', domAAroundImgThumb.attr('href')); + $(this).prop('rel', new_href); }); } $('#views_block li a').removeClass('shown'); diff --git a/themes/default/js/stores.js b/themes/default/js/stores.js index 38065181e..ffd8e64ba 100644 --- a/themes/default/js/stores.js +++ b/themes/default/js/stores.js @@ -113,7 +113,7 @@ function searchLocationsNear(center) createMarker(latlng, name, address, other, id_store, has_store_picture); bounds.extend(latlng); - $('#stores-table tr:last').after(''+parseInt(i + 1)+''+name+''+(has_store_picture === 1 ? '
    ' : '')+''+address+(phone !== '' ? '

    '+translation_4+' '+phone : '')+''+distance+' '+distance_unit+''); + $('#stores-table tr:last').after(''+parseInt(i + 1)+''+name+''+(has_store_picture === 1 ? '
    ' : '')+''+address+''+distance+' '+distance_unit+''); $('#stores-table').show(); } diff --git a/themes/default/js/tools.js b/themes/default/js/tools.js index 4215f7a88..7b670168c 100644 --- a/themes/default/js/tools.js +++ b/themes/default/js/tools.js @@ -95,7 +95,7 @@ function formatCurrency(price, currencyFormat, currencySign, currencyBlank) if (currencyFormat == 4) return (formatNumber(price, priceDisplayPrecision, ',', '.') + blank + currencySign); if (currencyFormat == 5) - return (formatNumber(price, priceDisplayPrecision, ' ', '.') + blank + currencySign); + return (currencySign + blank + formatNumber(price, priceDisplayPrecision, '\'', '.')); return price; } diff --git a/themes/default/manufacturer.tpl b/themes/default/manufacturer.tpl index e4ae56cc1..bd1e0e3e1 100644 --- a/themes/default/manufacturer.tpl +++ b/themes/default/manufacturer.tpl @@ -33,7 +33,7 @@
    {if !empty($manufacturer->short_description)}

    {$manufacturer->short_description}

    -

    {$manufacturer->description}

    +
    {$manufacturer->description}
    {l s='More'} {else}

    {$manufacturer->description}

    diff --git a/themes/default/mobile/contact-form.tpl b/themes/default/mobile/contact-form.tpl index 6c435356a..01e82c761 100644 --- a/themes/default/mobile/contact-form.tpl +++ b/themes/default/mobile/contact-form.tpl @@ -39,7 +39,7 @@ {/foreach} {else} + + + - +

    diff --git a/themes/default/order-carrier.tpl b/themes/default/order-carrier.tpl index aac6efad1..9a8f40adc 100644 --- a/themes/default/order-carrier.tpl +++ b/themes/default/order-carrier.tpl @@ -171,10 +171,13 @@
    {if $option.total_price_with_tax && (!isset($free_shipping) || (isset($free_shipping) && !$free_shipping))} + {if $use_taxes == 1} - {convertPrice price=$option.total_price_with_tax} {l s='(tax incl.)'} - {else} - {convertPrice price=$option.total_price_without_tax} {l s='(tax excl.)'} + {if $priceDisplay == 1} + {convertPrice price=$option.total_price_without_tax} {l s='(tax excl.)'} + {else} + {convertPrice price=$option.total_price_with_tax} {l s='(tax incl.)'} + {/if} {/if} {else} {l s='Free'} diff --git a/themes/default/order-detail.tpl b/themes/default/order-detail.tpl index d7fb91517..bfc8d7a9f 100644 --- a/themes/default/order-detail.tpl +++ b/themes/default/order-detail.tpl @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} - +{if isset($order)}
    @@ -424,3 +424,4 @@ {else}

     {l s='You cannot return merchandise with a guest account'}

    {/if} +{/if} \ No newline at end of file diff --git a/themes/default/order-follow.tpl b/themes/default/order-follow.tpl index 41abbb6f2..d28466617 100644 --- a/themes/default/order-follow.tpl +++ b/themes/default/order-follow.tpl @@ -70,7 +70,7 @@ {foreach from=$ordersReturn item=return name=myLoop} {l s='#'}{$return.id_order_return|string_format:"%06d"} - {l s='#'}{$return.id_order|string_format:"%06d"} + {$return.reference} {$return.state_name|escape:'htmlall':'UTF-8'} {dateFormat date=$return.date_add full=0} diff --git a/themes/default/order-opc-new-account.tpl b/themes/default/order-opc-new-account.tpl index 676ee7b11..4e31a068c 100644 --- a/themes/default/order-opc-new-account.tpl +++ b/themes/default/order-opc-new-account.tpl @@ -74,19 +74,18 @@ {literal} function vat_number() { - if ($('#company').val() != '') + if (($('#company').length) && ($('#company').val() != '')) $('#vat_number_block').show(); else $('#vat_number_block').hide(); } function vat_number_invoice() { - if ($('#company_invoice').val() != '') + if (($('#company_invoice').length) && ($('#company_invoice').val() != '')) $('#vat_number_block_invoice').show(); else $('#vat_number_block_invoice').hide(); } - $(document).ready(function() { $('#company').on('input',function(){ vat_number(); @@ -96,6 +95,10 @@ }); vat_number(); vat_number_invoice(); + {/literal} + $('.id_state option[value={if isset($guestInformations.id_state)}{$guestInformations.id_state|intval}{/if}]').prop('selected', true); + $('.id_state_invoice option[value={if isset($guestInformations.id_state_invoice)}{$guestInformations.id_state_invoice|intval}{/if}]').prop('selected', true); + {literal} }); {/literal} @@ -203,7 +206,7 @@ {elseif $field_name eq "address2"}

    - +

    {elseif $field_name eq "postcode"} {$postCodeExist = true} @@ -279,7 +282,7 @@

    - +

    @@ -289,7 +292,7 @@

    {l s='Invoice address'}

    {foreach from=$inv_all_fields item=field_name} {if $field_name eq "company" && $b2b_enable} -

    +

    @@ -329,7 +332,7 @@ {$postCodeExist = true}

    - +

    {elseif $field_name eq "city"}

    @@ -375,13 +378,13 @@

    {if isset($one_phone_at_least) && $one_phone_at_least} -

    {l s='You must register at least one phone number.'}

    +

    {l s='You must register at least one phone number.'}

    {/if} -

    +

    -

    +

    @@ -402,4 +405,4 @@
    -
    \ No newline at end of file +
    diff --git a/themes/default/product-list.tpl b/themes/default/product-list.tpl index 0db3e34b8..a59e18b9f 100644 --- a/themes/default/product-list.tpl +++ b/themes/default/product-list.tpl @@ -51,7 +51,7 @@ {if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
    {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}
    {/if} - {if isset($product.available_for_order) && $product.available_for_order && !isset($restricted_country_mode)}{if ($product.allow_oosp || $product.quantity > 0)}{l s='Available'}{elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)}{l s='Product available with different options'}{else}{l s='Out of stock'}{/if}{/if} + {if isset($product.available_for_order) && $product.available_for_order && !isset($restricted_country_mode)}{if ($product.allow_oosp || $product.quantity > 0)}{l s='Available'}{elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)}{l s='Product available with different options'}{else}{l s='Out of stock'}{/if}{/if}
    {if isset($product.online_only) && $product.online_only}{l s='Online only'}{/if} {/if} diff --git a/themes/default/product.tpl b/themes/default/product.tpl index b208166d0..25df35377 100644 --- a/themes/default/product.tpl +++ b/themes/default/product.tpl @@ -184,7 +184,7 @@ var fieldRequired = '{l s='Please fill in all the required fields before saving
    {if $have_image} - {$product->name|escape:'htmlall':'UTF-8'} + {if !empty($cover.legend)}{$cover.legend|escape:'htmlall':'UTF-8'}{else}{$product->name|escape:'htmlall':'UTF-8'}{/if} {l s='Maximize'} {else} @@ -200,16 +200,21 @@ var fieldRequired = '{l s='Please fill in all the required fields before saving {if isset($images) && count($images) > 3}{/if}
      - {if isset($images)} - {foreach from=$images item=image name=thumbnails} + {if isset($images)} + {foreach from=$images item=image name=thumbnails} {assign var=imageIds value="`$product->id`-`$image.id_image`"} + {if !empty($image.legend)} + {assign var=imageTitlte value=$image.legend|escape:'htmlall':'UTF-8'} + {else} + {assign var=imageTitlte value=$product->name|escape:'htmlall':'UTF-8'} + {/if}
    • - - {$image.legend|htmlspecialchars} + + {$imageTitlte}
    • - {/foreach} - {/if} + {/foreach} + {/if}
    {if isset($images) && count($images) > 3}{l s='Next'}{/if}