コード例 #1
0
        private void UpdateAllowedPriceGroups(FieldChange fieldChange, ProductCatalog catalog)
        {
            var priceGroupId = _priceGroupIdToFieldIdMap.FirstOrDefault(x => x.Value == fieldChange.FieldID).Key;
            var priceGroup   = PriceGroup.Get(priceGroupId);

            if (fieldChange.Value == "1")
            {
                catalog.AddAllowedPriceGroup(priceGroup);
            }
            else
            {
                catalog.RemoveAllowedPriceGroup(priceGroup);
            }
        }