Comments (3)
Hi @almare
The custom entities is not yet implemented in this SDK and I will try to implement it in the future but unfortunately I am not sure when it will be available. And can you describe more what your specific needs? code example etc?
Any help would welcome :)
from shopware-php-sdk.
Any progress with custom associations?
Use case: A shopware plugin adds a new entity and an association to an existing entity. if you wan to load the shopware entity together with the new association it not shows up in the result:
$orderRepository = RepositoryFactory::create(OrderDefinition::ENTITY_NAME);
$criteria = new Criteria();
$criteria->addAssociation('custom_entity');
$result = $orderRepository->search($criteria, $context);
The custom association should show up inside the extensions
response part:
But this doesn't work because of the default Accept
header here:
If you change this to just
application/json
the response contains the extension data but the sdk cannot parse it correctly.from shopware-php-sdk.
The reason for the missing associations is that the sdk only considers the data
part of the response here:
shopware-php-sdk/src/Hydrate/EntityHydrator.php
Lines 83 to 93 in 772876c
And because of the application/vnd.api+json
accept header the shopware 6 api but the associations not into the data.extensions
part but into a separate included
response part:
from shopware-php-sdk.
Related Issues (20)
- Cant get Transaction and Delivery Status HOT 1
- Don't cache entities HOT 5
- EntityRepository::searchIds does not throw ShopwareSearchResponseException HOT 3
- PHP 8.1 compatibility HOT 6
- EntityCollection is returned for empty results HOT 2
- Self signed certificate HOT 1
- GET Requests are not validated correctly HOT 2
- Call to a member function getSource() on null HOT 7
- Connecting properties, categories and tags to product (question) HOT 2
- Dieser Wert sollte nicht leer sein. c1051bb4-d103-4f74-8988-acbcafc7fdc3 HOT 2
- Transaction commit failed because the transaction has been marked for rollback only HOT 5
- Create Order Delivery HOT 2
- SDK version mismatch HOT 1
- Document download not possible
- The resource owner or authorization server denied the request. Access token could not be verified. HOT 7
- Add support for criteria in SyncService / SyncPayload
- Allowed memory size exhausted HOT 3
- OrderReturnLineItemEntity is missing (part of Shopware Commercial plugin)
- dynamic properties and package versioning HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shopware-php-sdk.