Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Update commerce-sdk-react to allow usage of V2 Shopper Baskets API #2108

Open
joeluong-sfcc opened this issue Oct 30, 2024 · 0 comments

Comments

@joeluong-sfcc
Copy link
Collaborator

Is your feature request related to a problem? Please describe.

Currently, the commerce-sdk-react does not expose any way to call v2 of SCAPI's shopper basket's API. In the underlying commerce-sdk-isomorphic package, you can use Shopper Basket V2 by passing in version as part of the clientConfig when you initialize the shopper basket client:

import { ShopperBaskets } from "commerce-sdk-isomorphic";

const clientConfig = {
     parameters: {
       clientId: "XXXXXX",
       organizationId: "XXXX",
       shortCode: "XXX",
       siteId: "XX"
     }
};

const shopperBasketsClient = new ShopperBaskets({
    parameters: {
        ...clientConfig.parameters,
        version: 'v2'
    }
});

But the commerce-sdk-react does not expose any way to update the version in clientConfig.parameters.

Describe the solution you'd like

Expose a way in commerce-sdk-react to pass in API version to commerce-sdk-isomorphic to allow customers to use V2 of the Shopper Baskets API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant