-
Notifications
You must be signed in to change notification settings - Fork 6
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
base: master
Are you sure you want to change the base?
Order client #3
Conversation
…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
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.
Looks good. Only some small comments.
*/ | ||
public function getEndpoint() | ||
{ | ||
return self::ENDPOINT; |
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.
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
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.
I also think that self is not inheritance aware...
https://stackoverflow.com/questions/13613594/overriding-class-constants-vs-properties
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.
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; |
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.
same here
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.
See above...
'limit' => $limit, | ||
'sort' => [ | ||
[ | ||
'property' => 'number', |
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.
isn´t it better to sort by lastname?
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.
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.
Classes/Domain/Model/Order.php
Outdated
@@ -26,6 +26,7 @@ | |||
***************************************************************/ | |||
use Portrino\PxShopware\Backend\Form\Wizard\SuggestEntryInterface; | |||
use Portrino\PxShopware\Backend\Hooks\ItemEntryInterface; | |||
use TYPO3\CMS\Core\Utility\DebugUtility; |
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.
do we need it here?
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.
Missed Ctrl+Alt+O here 😂
…e to access interface constants
@aWuttig Please make a code review, if you have time. Thanks :-)