Comments (6)
ProductNormalizer
was designed to hierarchically normalize a product in order to present it in json through the public api.
So, as you can see in the https://github.com/akeneo/pim-community-dev/blob/master/src/Pim/Bundle/CatalogBundle/Controller/Api/ProductController.php#L105, the channel is manually set, in the intention of filtering the product values for this channel (https://github.com/akeneo/pim-community-dev/blob/master/src/Pim/Bundle/ImportExportBundle/Normalizer/ProductNormalizer.php#L105).
Can you tell me which processor you are using? If you are using your own, you must call setChannel
before using $serializer->serialize($product, 'json', ....)
.
As a side note, I'd say that, after a second thought, the product normalizer should not filter values by channel, but instead should receive product with already filtered values and just focus on normalizing what's given to it. What do you think @filipsalpe ?
from pim-community-dev.
I'm using my own processor. Plus the normalizer is a protected attribute of the serializer so i couldn't set channel before calling the serialize method.
And I totaly agree with you on the second point.
from pim-community-dev.
Agree with you guys, I think also that we should avoid/make optional the Router dependency in this normalizer.
FYI, this normalizer has been originaly created to deal with json API (cf routes oro_api_get_products an oro_api_get_product), we'll work to complete this API for the 1.0.
from pim-community-dev.
What I did is use a parameter url in the writer. So i can post to this url using pecl_http library.
from pim-community-dev.
I would like to submit an other idea.
You should add the family code to the data normalized in Pim\Bundle\ImportExportBundle\Normalizer\ProductNormalizer.
from pim-community-dev.
Thanks @srascar for the idea. We will revamp the REST API for 1.1.0. I've created an issue with it: #766
from pim-community-dev.
Related Issues (20)
- Akeneo Export Job Stuck in Pending Status
- One error during export.
- Commands fail with "An option shortcut cannot be empty." HOT 6
- Bug Report - Unable to Upload Product Images in Akeneo v7.0.50
- Feature Request: API: allow the IN operator on the text attribute type.
- Manual installation of Akeneo PIM Community Edition (CE) v. 7.0 on Ubuntu fails HOT 1
- cannot install apps from the store - Internal Server Error 500 HOT 3
- Opening the CREATE GROUP page reports Error 500, Impossible to access an attribute ("indexPath") on a string variable ("New Group") HOT 1
- API connect with api-php-client not working, return error 422 HOT 1
- Can't bulk delete products HOT 2
- EACCES Permission denied Make command HOT 2
- No alive nodes found in your cluster HOT 3
- Impossible to register an export to SFTP - The route "pimee_job_automation_get_storage_connection_check" does not exist.
- Post /api/rest/v1/products not creating product (returns 200)
- Database save on server and load after restart Docker container HOT 2
- Install these repo without docker HOT 1
- image import in demo product HOT 2
- Error when editing a product bases on a family with 0 required attributes
- How create a connector for the exchange of data between the PIM and another publication management system HOT 1
- Support arm64 platforms for Akaneo container images
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 pim-community-dev.