-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Product] Product search for customer #6542
[Product] Product search for customer #6542
Conversation
* | ||
* @return QueryBuilder | ||
*/ | ||
public function createQueryBuilderForEnabledByTaxonCodeAndChannel($code, ChannelInterface $channel); | ||
public function createQueryBuilderForEnabledByTaxonCodeAndChannel($code, ChannelInterface $channel, $locale); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$locale
-> $localeCode
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not consistent, but in most repository methods we use $locale
. I think it's clear enough, as in code it almost everywhere a locale code, not name, but we should obviously keep a consistency with this.
2509ae6
to
74eefc0
Compare
@@ -51,14 +51,18 @@ public function createQueryBuilderWithLocaleCodeAndTaxonId($localeCode, $taxonId | |||
/** | |||
* {@inheritdoc} | |||
*/ | |||
public function createQueryBuilderForEnabledByTaxonCodeAndChannel($code, ChannelInterface $channel) | |||
public function createQueryBuilderForEnabledByTaxonCodeAndChannel($code, ChannelInterface $channel, $locale) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this have AndLocale in the function name?
@@ -0,0 +1,4 @@ | |||
{% form_theme form 'SyliusUiBundle:Form:theme.html.twig' %} | |||
|
|||
{{ form_widget(form.type, { 'value': 'contains', 'attr': { 'style': 'display: none;' } }) }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Twig CS! :) No spaces around { and '.
74eefc0
to
31e410a
Compare
And I search for product with name "Magnum" | ||
And I clear filter | ||
Then I should see the product "44 Magnum" | ||
And I should see the product "Glock 17" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about scenarios that I'm browsing taxon X
and I do not see products from taxon Y
after search?
31e410a
to
0828783
Compare
Thank you Mateusz! |
any ETA about when I could test this on http://demo.sylius.org/ ? |
any ETA on elasicsearch support yet, if any? |
Maybe it doesn't look great, but at least it works 😄 🐫