Hi guys,
I’m struggeling with a very basic ecom function, the product discount.
The documentation and forum don’t help me much unfortunately …
I’m in a bit of a hurry, so I call out to you guys directly …
I’ve set a product discount in the DW9.7.5 CMS for a number of products.
When I use the ecom module to show the products the template tags contain the product discount and I can show the before price and the discount price.
SO FAR SO GOOD!
When the user adds a discount product to the cart I go to a custom page where the user can do all sorts of extra stuff.
There I need to show the before price and discount price too.
I, of cause, have the product as Dynamicweb.Ecommerce.Products.Product object in code.
But I can NOT find the discount via the API !!
The product.Discounts = 0
All methods on the product regarding Getting discount return 0.
Almost everything seems to be deprecated or obsolete …
When using GetDiscounts via the DiscountService it does find my discount, but I don’t want to work from that, because then I need to implement all the logic behind all the discount params.
In the screendump below you can see the methods I call and their input values and their outcome.
Can you please tell me how to get the discount when having a Product object ?