Skip to content
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

Merged

Conversation

Zales0123
Copy link
Member

@Zales0123 Zales0123 commented Oct 25, 2016

Q A
Bug fix? no
New feature? yes
BC breaks? no
Related tickets
License MIT

Maybe it doesn't look great, but at least it works 😄 🐫

zrzut ekranu 2016-10-25 o 11 44 18

zrzut ekranu 2016-10-25 o 11 40 47

@pjedrzejewski pjedrzejewski added New Feature Shop ShopBundle related issues and PRs. labels Oct 25, 2016
*
* @return QueryBuilder
*/
public function createQueryBuilderForEnabledByTaxonCodeAndChannel($code, ChannelInterface $channel);
public function createQueryBuilderForEnabledByTaxonCodeAndChannel($code, ChannelInterface $channel, $locale);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$locale -> $localeCode?

Copy link
Member Author

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.

@@ -51,14 +51,18 @@ public function createQueryBuilderWithLocaleCodeAndTaxonId($localeCode, $taxonId
/**
* {@inheritdoc}
*/
public function createQueryBuilderForEnabledByTaxonCodeAndChannel($code, ChannelInterface $channel)
public function createQueryBuilderForEnabledByTaxonCodeAndChannel($code, ChannelInterface $channel, $locale)
Copy link
Contributor

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;' } }) }}
Copy link
Member

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 '.

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"
Copy link
Contributor

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?

@michalmarcinkowski michalmarcinkowski merged commit 05f8104 into Sylius:master Oct 27, 2016
@michalmarcinkowski
Copy link
Contributor

Thank you Mateusz!

@Zales0123 Zales0123 deleted the product-search-for-customer branch October 27, 2016 09:38
@gabiudrescu
Copy link
Contributor

any ETA about when I could test this on http://demo.sylius.org/ ?

@okwinza
Copy link
Contributor

okwinza commented Oct 27, 2016

any ETA on elasicsearch support yet, if any?

@gabiudrescu
Copy link
Contributor

@okwinza maybe this helps? #5756

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Shop ShopBundle related issues and PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants