Merge pull request #219 from BitBagCommerce/fix/OP-70-fix-price-filtering

OP-70 Fix pricing validation on product filter
This commit is contained in:
Michał Pysiak
2023-02-01 11:34:17 +01:00
committed by GitHub
3 changed files with 20 additions and 10 deletions

View File

@@ -89,6 +89,10 @@ final class HasPriceBetweenQueryBuilder implements QueryBuilderInterface
private function convertFromString(string $price): int
{
if (!is_numeric(str_replace(',', '.', $price))) {
return 0;
}
$transformer = new SyliusMoneyTransformer(2, false, NumberFormatter::ROUND_HALFUP, 100);
return $transformer->reverseTransform($price);

View File

@@ -1,3 +1,7 @@
#filters-vertical #bitbag_elasticsearch_search_facets label {
display: block !important;
}
.results {
margin-top: 0.5rem;
position: absolute;
@@ -8,7 +12,7 @@
width: 600px;
padding: 0 1rem 0 1rem;
background-color: white;
backdrop-filter: blur(1px);
backdrop-filter: blur(1px);
z-index: 16;
box-shadow: 0px 1px 2px 0px #d4d4d5, 0px 0px 0px 1px #d4d4d5;
visibility: hidden;
@@ -30,7 +34,7 @@
&__link {
padding-top: 1rem;
.result__container {
max-height: 400px;
box-shadow: 0px 1px 1px 0px #d4d4d5, 0px 0px 0px 1px #d4d4d5;
@@ -38,7 +42,7 @@
display: flex;
flex-direction: row;
align-items: center;
.result__image {
max-width: 7rem;
max-height: 7rem;
@@ -51,23 +55,23 @@
max-height: 6rem;
}
}
.result__content {
display: flex;
flex-direction: row;
flex-direction: row;
justify-content: space-between;
font-weight: bold;
padding: 0.5rem 3.7rem 0 0;
@media (max-width: 767px) {
flex-direction: column;
justify-content: space-evenly;
justify-content: space-evenly;
text-align: left;
width: 100%;
padding: 1rem;
}
.result__price {
position: absolute;
right: 1.5rem;
@@ -78,12 +82,12 @@
}
}
}
.result__description {
padding: 10px;
}
}
.result__container:hover {
background-color: rgba(250, 250, 250, 0.952);
}

View File

@@ -4,3 +4,5 @@ framework:
csrf_protection: true
session:
handler_id: ~
ide: phpstorm