Product Configurator

I have set up a product configurator on a clients website https://www.handknittingco.com/custommaterials-title and the code functions for designing the Onesie baby suit work as required, however the add to cart function will not add the selections into the cart,
export function addToCartButton_click(event, $w) {
$w(‘#shoppingCartIcon1’).addToCart(productId, 1, {choices: selectedOptions});
}
How important is the product ID in the code?
const productId = “5b27ba25-4890-c255-c653-6e542704297b”;

Any assistance would be appreciated paid or otherwise.
Mike Fox

See the addToCart API - the productId is required. Otherwise it doesn’t know what product to add.

How is the product ID generated the addToCartAPI already has a code inserted. The ProductID above is generated in the database automatically for all the items which one do I choose?
Tried the API siggested and it locked out all the other functions!
Mike

Here are some Stores examples that add products to the cart.

Bulk Add to Cart

Let customers add multiple items to their cart—all at once.

Add to Cart Gallery

Make it easy for customers to add products to their cart—right from your product gallery.

Yisrael your examples are not what I want to achieve sorry.
I have already created the design studio, please take a look and have a go, https://www.handknittingco.com/custommaterials-title once the customer creates the design I need to place the design into the cart obviously I need to code this action.
Can you help me achieve this or will I have to pay a coder?
Mike

Yisrael, Where do I locate the Product ID “” please, I think I have the wrong product id in my code hence it can’t find the product to add. Mike

See the examples. They show exactly how it is done.

The examples are not what I need sorry, my question is where can I obtain the product ID? Mike

Yisreal, My product configurator is different to your examples they are not what I want, can you answer my question please, where do I locate the product ID to insert into my code?

As demonstrated in the examples, you get the Product ID from the Stores/Products database collection. However, your Products collection is empty - as can be seen in the screenshot:


There are no product IDs to retrieve since there are no products.

The examples clearly demonstrate how to create a product page that allows the customer to choose product options and add them to the cart.

You might want to consider hiring a coder who will be better able to understand what’s required in order for you to achieve your goal. You can check out the WixArena - it’s a hub where you can look for Corvid experts for hire.

Thanks for that I will check out the arena for a coder to solve my problem which will no doubt cost me a lot of money!
I’m now experiencing another issue, the stores/product dataset content fails to load data using google, it does however load in Firefox, is wix aware of this problem?
I did mange to locate the product ID in Firefox only to be told by Corvid it could not locate the Id number, I’ll try with another number.
If I can resolve my coding problem I may carry on with wix if not I will pack up.
Mike Fox