Accelerator and countries connected to channel

How are one supposed to work with countries in an accelerator project? We need to connect countries to a channel to see the countries in countrydropdown in checkout but there is no way of controlling witch country that is used for the cart. We want to be able to select different countries as delivery and invoiceaddress but then we need to add the countries to the channel and that results in cart getting another currency then we wanted. Instead for the current country, we get the first country connected to the channel and it looks like there are no way of sorting the countries connected to a channel.

We have a site in English language we want to have in euro but we want to ship to sweden.
It is not possible to add another sweden country with euro currency

We have a litium 7.2 accelerator but litium are upgraded to Litium 7.3

Litium version: 7.3

One country is connected to 1 currency.
You can add an unused country and make it behave as “sweden-Euro”, would that help?
Maybe best to create different Channels?

The best is to be able to use set current country on the session or if it is set on the cart since this controls currency, paymentmethods and deliverymethods for a country. is our case we would like the user pricelist to define with country to set.

Creating a new channel works but is terrible for the administrator since then you need to maintain another channel in the CMS even if the content is exactly the same and you need to manually edit every page in website to publish the page in a new channel.

now the requirement also changed to that we want to switch currency on same channel so fake sweden doesnt help and that solution would have reulted in having to handle conversion of fake sweden countrycode to sweden countrycode i many places in the code.

Let’s see if @patric.forsgard has any good ideas for solution to this?

Hi,
Check the controller base. There we are setting the channel and country. You can use the same method to set the selected country in the cart.

Thanks!

It looks like first country connected to channel is set on the cart but looking at the cart object it looks like that there is no country on cart but there is on cart.OrderCarrier. In accelerator checkout for delivery methods and perhapps in other places the same is done all over againg without checking the cart country.

But i would conclude this as the accelerator has no support for multiple countries on one channel but is possible to fix in the project.

_requestModelAccessor.RequestModel.Cart.OrderCarrier.CountryID

Controller base
cart.SetChannel(
channel,
channel.CountryLinks.FirstOrDefault()?.CountrySystemId.MapTo(),
SecurityToken.CurrentSecurityToken);

DeliveryMethodViewModelBuilder
var ids = _requestModelAccessor.RequestModel.ChannelModel?.Channel?.CountryLinks?.FirstOrDefault()?.DeliveryMethodSystemIds ?? Enumerable.Empty();

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.