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)
- invalid csv file with \ on the data
- MySQL Version Requirement (8.0.30) for Akeneo 7 Deployment and Migration Compatibility HOT 1
- Reasoning behind MySQL 8.0.30 requirement
- Yarn Error 2 installing Akeneo akeneo/pim-community-dev 7.0
- Project directory "/srv/pim" is not empty. HOT 4
- Akeneo Export to External API HOT 1
- CRITICAL: Exception thrown when handling an exception
- Unable to connect S3.
- SSL configuration
- Feature: Adding contributors section to the readme.md file. HOT 1
- Unable to install following docs HOT 13
- Allow $loggedAt to default to NULL when an attribute has no version history record.
- Akeneo images are not loading (ns_error_dom_bad_uri, ns_error_unexpected) HOT 1
- Webhooks and Supervisor connection error HOT 1
- Unable to install Akeneo CE HOT 3
- Akeneo CE Installed on local giving 403 error after installation
- Security issue in package aws/aws-sdk-php
- Image akeneo/pim-php-dev:8.1 HOT 1
- Sorting attributes with numerical codes
- Akeneo Export Job Stuck in Pending Status
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.