Hello,
We are trying to retrieve the discounted price of a product using the API in our backend code, but get no discount, whatever method we use. The loopitem in the template works fine though.
Methods we tried on our retrieved product variable:
- product.Discounts() gives an empty collection (this is officially obsolete, but should still work)
- product.GetDiscounts(currencyCode, countryCode) gives an empty collection
- Dynamicweb.Ecommerce.Orders.SalesDiscounts.SalesDiscount.GetSalesDiscounts(pc, Dynamicweb.Ecommerce.International.Language.GetLanguage("LANG1")) where pc is a productcollection with just our product gives an empty collection
- Dynamicweb.Ecommerce.Orders.SalesDiscounts.SalesDiscount.GetSalesDiscounts(Dynamicweb.Ecommerce.International.Language.GetLanguage("LANG1")) gives a collection with 4 salesdiscount records, sadly the ValueProducts parameter of all those discounts is allways an empty collection.
Our discount is configured with the following parameters
<?xml version="1.0" encoding="utf-8"?><Parameters addin="Dynamicweb.Ecommerce.Orders.SalesDiscounts.ProductDiscount">
<Parameter addin="Dynamicweb.Ecommerce.Orders.SalesDiscounts.ProductDiscount" name="Products" value="[some][p:PROD3,]" />
</Parameters>
We would like to hear if we are doing something wrong, or if this is a bug.
Greets Hans