Skip to content

Commit

Permalink
Merge pull request #165 from PrestaShop/dev
Browse files Browse the repository at this point in the history
Release 3.5.0
  • Loading branch information
PierreRambaud authored Mar 25, 2020
2 parents b0e713d + 68f09c7 commit 6f7b97e
Show file tree
Hide file tree
Showing 18 changed files with 924 additions and 490 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

Displays a block with layered navigation filters.

## Multistore compatibility

This module is partially compatible with the multistore feature. Some of its options might not be available.

## Reporting issues

You can report issues with this module in the main PrestaShop repository. [Click here to report an issue][report-issue].
Expand Down
19 changes: 19 additions & 0 deletions _dev/back/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,3 +224,22 @@ $(document).ready(() => {
});
}
});

$(document).on('ready', () => {
const layeredDefaultCategory = $('input[name="ps_layered_filter_by_default_category"]');
layeredDefaultCategory.on('change', function initializeOptions(event) {
const elm = $(this);
if (!elm.prop('checked')) {
return;
}

if (elm.val() === '1') {
$('input[name="ps_layered_full_tree"][value="0"]').prop('checked', true);
$('input[name="ps_layered_full_tree"]').prop('disabled', true);
} else {
$('input[name="ps_layered_full_tree"]').prop('disabled', false);
}
});

layeredDefaultCategory.filter('[value="1"]').trigger('change');
});
10 changes: 8 additions & 2 deletions _dev/cldr/number-formatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class NumberFormatter {
}

// Get the good CLDR formatting pattern. Sign is important here !
const pattern = this.getCldrPattern(majorDigits < 0);
const pattern = this.getCldrPattern(number < 0);
formattedNumber = this.addPlaceholders(formattedNumber, pattern);
formattedNumber = this.replaceSymbols(formattedNumber);

Expand Down Expand Up @@ -277,7 +277,13 @@ class NumberFormatter {
}

static build(specifications) {
const symbol = new NumberSymbol(...specifications.symbol);
let symbol;
if (undefined !== specifications.numberSymbols) {
symbol = new NumberSymbol(...specifications.numberSymbols);
} else {
symbol = new NumberSymbol(...specifications.symbol);
}

let specification;
if (specifications.currencySymbol) {
specification = new PriceSpecification(
Expand Down
2 changes: 1 addition & 1 deletion config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<module>
<name>ps_facetedsearch</name>
<displayName><![CDATA[Faceted search]]></displayName>
<version><![CDATA[3.4.1]]></version>
<version><![CDATA[3.5.0]]></version>
<description><![CDATA[Displays a block allowing multiple filters.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
Expand Down
Loading

0 comments on commit 6f7b97e

Please sign in to comment.