API
Version 7.x > API > Question about "duplicate" Item- and Volume-fields in VolumeDiscountInfo View modes: 
User avatar
Member
Member
magnus-tenk - 11/12/2012 6:32:54 PM
   
Question about "duplicate" Item- and Volume-fields in VolumeDiscountInfo
When getting the volume discounts for a SKU I noticed that some fields seem to be "redundant" to the casual observer. I assume that they are not, and I am just curious to what fields it is recommended that I use when displaying product prices on the site.

VolumeDiscountValue == ItemDiscountValue
VolumeDiscountMinCount == N/A
VolumeDiscountIsFlatValue == ItemDiscountIsFlat

/Magnus

I will use the data from the Volume-fields (displaying prices on the site), unless you stop me and tell me its a bad idea ;-)

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 11/13/2012 3:56:36 AM
   
RE:Question about "duplicate" Item- and Volume-fields in VolumeDiscountInfo
Hi Magnus,

The simplest way is to use the SKUPrice column from COM_SKU table.

Let me note, as you can read in the E-commerce Guide, SKUPrice is fixed for any number of products but with the Volume discounts fields the price of the order can be automatically reduced by the discount amount if a sufficient number of applicable product items (the volume) has been entered... Please, pay attention to this fact.

For example:
10 products x 10$ (SKUPrice) = 100$
10 products x 10$ (Volume discout: Minimum amount = 5, Discount value = 10) = 90$

. . . It's a diffrent total price, right? :)

I hope this explain why it's not very good idea to display prices via Volume Discounts on the site.

Best regards,
Martin Danko

User avatar
Member
Member
magnus-tenk - 11/13/2012 9:54:55 AM
   
RE:Question about "duplicate" Item- and Volume-fields in VolumeDiscountInfo
But how then am I supposed to display prices that have quantity based discounts.

In the real world, we are selling something for
1+ = 50 SEK (from "COM_SKU")
5+ = 45 SEK (from "COM_VolumeDiscount")
10+ = 40 SEK (from "COM_VolumeDiscount")

Now I am really confused. It should be a totally different price. It seems to me that the VolumeDiscountInfo class is made for this use case?

/Magnus

Ps. When writing this and looking at the database table COM_VolumeDiscount I notice that the field names of this table translates perfectly to the property names of the VolumeDiscountInfo. This seem to be answering my original question.

        
InfoDataSet<VolumeDiscountInfo> discounts =
VolumeDiscountInfoProvider.GetVolumeDiscounts(skuID);
foreach (VolumeDiscountInfo discount in discounts)
{
// Handle percentage versus static discount here
Debug.Print(discount.VolumeDiscountValue.ToString());
}


User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 11/19/2012 12:59:57 AM
   
RE:Question about "duplicate" Item- and Volume-fields in VolumeDiscountInfo
Hi,

Yes, you're right. For this case you should use the Volume Discounts. It's ok, that in both examples it gets the price from "COM_VolumeDiscount" because the right price is assigned based on the minimal ammount value.

Best regards,
Martin Danko