Hello,
The volume discount API example is available under ~\YourProjectFolder\CMSApiExamples\Code\Ecommerce, #region "API examples - Volume discount" on line 2978:
private bool CreateVolumeDiscount()
{
// Get the data
var product = SKUInfoProvider.GetSKUs()
.WhereStartsWith("SKUName", "MyNew")
.FirstOrDefault();
if (product != null)
{
// Create new volume discount object
VolumeDiscountInfo newDiscount = new VolumeDiscountInfo();
// Set the properties
newDiscount.VolumeDiscountMinCount = 100;
newDiscount.VolumeDiscountValue = 20;
newDiscount.VolumeDiscountSKUID = product.SKUID;
newDiscount.VolumeDiscountIsFlatValue = false;
// Create the volume discount
VolumeDiscountInfoProvider.SetVolumeDiscountInfo(newDiscount);
return true;
}
Please let me know if you have any additional questions about this.
Best Regards,
Sandro