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

Order client #3

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Order client #3

wants to merge 6 commits into from

Conversation

EvilBMP
Copy link
Member

@EvilBMP EvilBMP commented Feb 1, 2018

@aWuttig Please make a code review, if you have time. Thanks :-)

EvilBMP and others added 5 commits June 28, 2017 08:46
…heir respective models and updates SuggestWizard
…Interface name of CustomerClient

[TASK] change "operator" value in findByTerm calls in Article, Customer and OrderClient from "OR" to "1", because shopware only checks with isset($where['operator']) to combine conditions with OR instead of AND
@EvilBMP EvilBMP requested a review from aWuttig February 1, 2018 13:14
Copy link
Member

@aWuttig aWuttig left a comment

Choose a reason for hiding this comment

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

Looks good. Only some small comments.

*/
public function getEndpoint()
{
return self::ENDPOINT;
Copy link
Member

Choose a reason for hiding this comment

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

I think it is better to use the interface name instead of self. At some point of time you will remove the Interface and then this will maybe fail ;-) just cosmetic stuff

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, right now it's the same for every Shopware client class. But I can change it to the interface instead of self. I think static instead of self makes no sense here...

*/
public function getEntityClassName()
{
return self::ENTITY_CLASS_NAME;
Copy link
Member

Choose a reason for hiding this comment

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

same here

Copy link
Member Author

Choose a reason for hiding this comment

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

See above...

'limit' => $limit,
'sort' => [
[
'property' => 'number',
Copy link
Member

Choose a reason for hiding this comment

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

isn´t it better to sort by lastname?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is just for an autocomplete suggest wizard in the TYPO3 backend. The order ID field will be filled by API callbacks. This is just a convenience feature and the header of the autocomplete item is the order number. That's why it's sorted by order number.

@@ -26,6 +26,7 @@
***************************************************************/
use Portrino\PxShopware\Backend\Form\Wizard\SuggestEntryInterface;
use Portrino\PxShopware\Backend\Hooks\ItemEntryInterface;
use TYPO3\CMS\Core\Utility\DebugUtility;
Copy link
Member

Choose a reason for hiding this comment

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

do we need it here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Missed Ctrl+Alt+O here 😂

@EvilBMP
Copy link
Member Author

EvilBMP commented Feb 2, 2018

@aWuttig see revision 4678a39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants