Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions vtex/actions/cart/simulation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export interface Props {
postalCode: string;
country: string;
RnbBehavior?: 0 | 1;
sc?: number;
}

/**
Expand All @@ -27,15 +28,15 @@ const action = async (
): Promise<SimulationOrderForm> => {
const cookie = req.headers.get("cookie") ?? "";
const { vcsDeprecated } = ctx;
const { items, postalCode, country, RnbBehavior = 1 } = props;
const { items, postalCode, country, RnbBehavior = 1, sc } = props;
const segment = getSegmentFromBag(ctx);

const response = await vcsDeprecated[
"POST /api/checkout/pub/orderForms/simulation"
](
{
RnbBehavior,
sc: segment?.payload.channel,
sc: sc ?? segment?.payload.channel,
Comment thread
devdaniloWicomm marked this conversation as resolved.
Outdated
},
{
body: { items, country, postalCode },
Expand Down