Goodler / code

Goodler
Apache License 2.0
0 stars 2 forks source link

Search of goods - wrong price (Walmart) #543

Closed Fetati closed 7 years ago

Fetati commented 7 years ago

Я добавляю товар - crayon

screen shot 2017-06-07 at 4 03 22 pm

Выбрала первый - цена 4.59

screen shot 2017-06-07 at 4 00 38 pm

Тот же самы товар (зашла по линку) в Walmart стоит дороже:

screen shot 2017-06-07 at 4 00 25 pm

Протестировала остальные товары в этом ряду - на 2 товара тоже цены дороже, а 2 столько же, сколько и в Walmart. Мы планировали добавлять 10% налогов сразу, так?

DmitrysIF commented 7 years ago

@Fetati это странная ситуация и такого быть не должно. Попробую спросить Сергея.

sergchuv commented 7 years ago

Item search retrieves "salePrice" instead of msrp. public class ResponseItem { public int ItemId; public int ParentItemId; public string Name; public double SalePrice public string CategoryPath; public string ShortDescription; public string LongDescription; public string ThumbnailImageUrl; public string MediumImageUrl; public string LargeImageUrl; public string ProductTrackingUrl; public double StandardShipRate; public bool MarketPlace; public string ProductUrl; public string CategoryNode; public bool Bundle; public bool AvailableOnline; }

This is fragment of the JSON response for that item. .... "msrp": 6.06, "salePrice": 4.59, ...

I suggest Dmirty change his code to show msrp. Variations API currently retrieves "msrp" and ignores "salePrice"

sergchuv commented 7 years ago

Changeset 637 fixes the issue.
Explanation: Walmart API responses price fields vary from item to item. The rule is that it contains at least one of two prices "msrp" and "salePrice", sometimes both. Currently, our site's logic is:

if "msrp" exist use "msrp" otherwise use "salePrice"

Walmart's web site logic may show one of these two price choices based on some other data. As the result, Goodlers price will be frequently higher than shown on Walmart site.

DmitrysIF commented 7 years ago

Немножко доработано, теперь всегда будет выбираться Максимальная цена из выдачи.