Svea Checkout: Disable B2C

We’re using the Svea Checkout add-on and would like to disable the option in the widget to shop B2C, i.e. as a private customer “privatperson”, and only allow B2B shopping, i.e. as a company “företag”.

According to Svea, this is done by setting the preset value IsCompany to true and ReadOnly:

"presetValues": [
      {
        "TypeName": "IsCompany",
        "Value": "true",
        "IsReadonly": true
      }
]

In the Litium add-on accelerator files, it looks like SveaWidgetV1 CreatePaymentArgs is configuring the Svea widget and would be the place to set this preset value. But I can’t find if “preset values” are configured in the OotB add-on, and I can’t see where I would add the “preset values” configuration. Something on the checkoutFlowInfo perhaps.

It looks like this should end up in the createorder call in the createordermodel parameter. But I can’t figure out where the add-on is making this call and where the parameters are coming from.

Does anyone know?

Litium version: 7.6 + accelerator

Did you set isCompany to true in the config file?
https://docs.litium.com/documentation/add-ons/payment-extensions/svea-checkout/configure

You can pass company preset when creating Svea checkout order

var companyPreset = new PresetValue
{
    TypeName = "IsCompany",
    Value = "true",
    IsReadOnly = true,
};
checkoutOrder = sveaCheckout.CreateOrUpdateScoOrder(order, args, companyPreset);

Yes we did. I’m not 100% sure what this does on the Svea side. Enable the B2B checkout? Or does this actually pass the preset value, just not read-only?

Thank you. This, in combination with isCompany, has removed the B2C option from the Svea checkout.

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