Skip to content
This repository has been archived by the owner on May 12, 2023. It is now read-only.

Add Product Model and Family Variant for Akeneo's latest version 2.3 #23

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

Conversation

progunnerr
Copy link

Hello,

Thank you for the project. I made a quite a bit of improvements. It was too late before I realized that I should have created multiple pull requests instead. Sorry about that.

  1. Add ProductModel and Family Variant endpoints
  2. Upgrade to Net Standard 2.0
  3. Replace LibLog file with NuGet latest package
  4. Enhance pagination perfomance by Search-After method
    https://api.akeneo.com/documentation/pagination.html
    From Akeneo:

Do note that the Search after method is better than Offset method in term of performances. It is strongly recommended to use it when requesting entities that have high data volume such as the products, the product models, the published products and the assets.

@dsonnet
Copy link

dsonnet commented Jan 21, 2019

@progunnerr I tried your fork, I didn't have time to investigate, but a simple Task getStringTask = Client.CreateAsync(product); that is working with the nuget repository version seems to fail with your version

@progunnerr
Copy link
Author

@dsonnet Hi, thanks for the check. That is strange. But I didn't made any changes to CreateAsync method. Only changes pertain to Product model itself. Also, the tests shows that CreateAsync method passed tests(PFA screenshots).

One potential cause could be that in the Product model you are using VariantGroup field which I guess is no longer an attribute in Akeneo. See Akeneo API referenc here

At this point, it is best if you can dig further and provide more info about the failure?

---- CreateAsync Method ----

createasync method

----- Passed Tests ------

passed tests

@progunnerr
Copy link
Author

@pardahlman Hi, I am wondering if you got a chance to review the pull request. I think this would really help the community. Please let me know your thoughts?

@dsonnet
Copy link

dsonnet commented Jan 24, 2019

@progunnerr I found the issue with your code. In the product model you are using properties that are Enterprise Edition specific, this fails on the community edition.

@progunnerr
Copy link
Author

@dsonnet Thanks. Can you please try now? I removed the attribute that I think was the problem.

@dsonnet
Copy link

dsonnet commented Jan 25, 2019

Yes I already patched your code on my local machine and without this attribute it is working

@progunnerr
Copy link
Author

@dsonnet Great!

@dsonnet
Copy link

dsonnet commented Jan 25, 2019

@pardahlman It would be great to have this merged

@dsonnet
Copy link

dsonnet commented Jan 27, 2019

@progunnerr in your new implementation of GetAllAsync you dropped support for parentcode, this is not optimal if you try to fetch the attributeoptions where you need some kind of server filtering to get only the attributes options of a specific attribute.

@denhul
Copy link

denhul commented Feb 3, 2019

@progunnerr , @dsonnet is the method GetAllAsync working? I'm trying to get all "products" per 100 items, but the method doesn't respond the second time it tries to get items. I also tried lowering the items per call but without success.

@progunnerr
Copy link
Author

@dsonnet Will add the support -an overload method should do.

@denhul Hi, trying to understand the issue. So the GetAllSync method will return all the products in the first call. Why is there a need for the second call? Can you please also explain - "get all "products" per 100 items"?

@denhul
Copy link

denhul commented Feb 8, 2019

@progunnerr: if you look at the function itself, it contains a do while and inside the do while it calls the function GetManyAsync with a limit (max 100 results per call).
I noticed the Akeneo version is an older version and an update would probably solve my issue. The serialization of a product crashed because it contained an "amount" with value null (PIM-7746: Fix issue when an attribute code is numeric in version 2.3.12 (2018-10-17)). So I've asked them to do an update of the system.

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

Successfully merging this pull request may close these issues.

3 participants