Developer forum

Forum » Ecommerce - Standard features » Web API discounts

Web API discounts

Mafalda Correa
Mafalda Correa
Reply

Hi,

In the Ecommerce Web API, when I make a request for a product with a discount, both the Price and the PriceBeforeDiscount are the same. And discount comes back as 0.

Here's a quick repro: https://www.screencast.com/t/1fX242yrc

My feed request is: https://dev-swiftrizzo.mydwsite1.com/dwapi/Products/GetProduct?ProductId=10059&LanguageId=LANG1&CurrencyCode=EUR&CountryCode=DK&ShopId=SHOP1&FilledProperties=Id,Name,Price,PriceBeforeDiscount,Discount&PriceSettings.ShowPricesWithVat=True&PriceSettings.FilledProperties=Price,PriceFormatted

Is there some property that I need to pass in order for discounts to work or is the Web API not set up to work with discounts?

Thank you


Replies

 
Oleg Rodionov Dynamicweb Employee
Oleg Rodionov
Reply

Hi,

I cannot reproduce the issue on DW9.12, please, find the attachment.

BR, Oleg QA

2021-09-15_14-06-12.png
 
Mafalda Correa
Mafalda Correa
Reply

Hi Oleg,

My version is also 9.12, but it's still not working.

Is there any configuration or anything in the feed I'm doing wrong?

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

It looks like ShopId is not taken into account properly. Try updating your discount to be not specific to a shop by changing Bikes to All shops:

That made it work for me.

@Oleg: that looks like a bug to me where specifying the shop ID in the URL doesn't link to the same shop on the discount correctly.

Imar

   
Oleg Rodionov Dynamicweb Employee
Oleg Rodionov
Reply

Hi,

The issue related to specific shop in discount is already bugged and fixed by 4580, it will be provided in next DW9.13. And yup, PriceBeforeDiscount is not available in DiscountInfo nowadays, it's not bug, you can submit the feature request if relevant. Thanks for observing.

BR, Oleg QA    

 

You must be logged in to post in the forum