Hi,
I am trying to create some countries problematically and add default settings for them.
However I cannot find a way how the Inventory and Pricelist is added via code.
Litium version: 7.6.1
Thanks in advance
Hi,
I am trying to create some countries problematically and add default settings for them.
However I cannot find a way how the Inventory and Pricelist is added via code.
Litium version: 7.6.1
Thanks in advance
You add countries to the inventory and price list. You can’t add a price list to a country.
_priceListService.Get(priceListId).CountryLinks
_inventoryService.Get(inventoryId).CountryLinks
Worked like a charm thanks!
Do you by any chance also know how to add Delivery and Payment methods to channel? Cannot seem to find them 
I think you get it with something like this, so you do a _channelService.Update after adding it on the channels country link. Was a long time I had to do that myself, but give it a try.
_channelService.Get(channelId).CountryLinks.FirstOrDefault(x => x.CountrySystemId == englishCountryId).PaymentMethodSystemIds
_channelService.Get(channelId).CountryLinks.FirstOrDefault(x => x.CountrySystemId == englishCountryId).DeliveryMethodSystemIds
Worked perfectly.
Missed that the ChannelToCountryLink differed with the props against the other links 