Closed salander closed 10 years ago
I cannot reproduce the problem, the CI builds with the tests for the discounts are green.
Please consult https://github.com/commercetools/sphere-play-sdk/blob/master/CONTRIBUTING.md to clarify the problem.
i'm using java7, sdk 0.67.0, play 2.2.4 i refreshed product search, cleaned project, use newest sdk, restarted sbt and drunk a lot of coffee but it doesn't work. @lauraluiz was suggesting, that the data may be corrupt - can that be?
But I still can't reproduce:
json traffic on loading one (discounted) product:
JSON removed
"hasStagedChanges" : true
@salander Did you try republishing of product again? Do you load product on PDP or POP? If POP you should use filter by isOnStock = true
too.
Thanks, I will try to investigate with the JSON.
@butenkor yes, i've republished product. the json i've provided is traced on pdp
@schleichardt stop investigating i got the problem: the defined discount was using a product which was out of stock. thanks @butenkor for that hint. thanks @schleichardt for investigating.
Cool!
Please check soon: API returns discounted price for a product correctly, but on price creation https://github.com/commercetools/sphere-play-sdk/blob/master/java-client/src/main/java/io/sphere/client/shop/model/Price.java#L36 the Optional.fromNullable(discounted) creates absent value. so i never get the discounted price when calling variant.getPrice().getDiscounted() for a discounted product.