London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
By using the IPriceDetailService:
https://world.episerver.com/documentation/developer-guides/commerce/pricing/Pricing-examples/
Here is a starting point https://vimvq1987.com/permanently-drop-prices-products/
You can change UpdatePrices to something like this
var prices = _priceDetailService.List(contentLink);
_priceDetailService.Delete(newPrices.Select(x => x.PriceValueId));
You can also use IPriceService.SetCatalogEntryPrices() which can delete prices if you pass an empty price list.
It'd be interesting to see which is faster ...
Hello, how to delete all data from pricing programmatically ?
Thank you