Almost all the Add to Cart buttons in the SuiteCom...
# ask-stanley-ai
a
Almost all the Add to Cart buttons in the SuiteCommerce web store work properly, but they also don't appear until a quantity is chosen. The Add to Cart button that does NOT work is the one that appears on each item in the facets view. This one has no quantity selection with it, and it seems to assume a quantity of 1 in the HTTP request it makes, which for most items is always below the minimum quantity set for that item. How can I fix this problem so the facet view's Add to Cart buttons work, and try to add the minimum quantity?
c
AI generated answer (using internal Slack threads):
Based on the conversations, it seems like the issue you're facing is related to the way SuiteCommerce is handling the 'Add to Cart' functionality in the facets view. The button assumes a quantity of 1, which is often below the minimum quantity set for the item. To resolve this, you might need to modify the SuiteCommerce code to ensure that the 'Add to Cart' button in the facets view adds the minimum quantity of the item to the cart, instead of assuming a quantity of 1. Here's a general approach you could take: 1. Identify the code that handles the 'Add to Cart' functionality in the facets view. This is likely to be in the JavaScript files related to the facets view. 2. In this code, find where the quantity is set when the 'Add to Cart' button is clicked. It's likely that this is currently set to 1. 3. Modify this code to instead fetch the minimum quantity for the item. This information should be available in the item's details, which you should be able to access from the facets view. 4. Set the quantity to the fetched minimum quantity when the 'Add to Cart' button is clicked. Please note that this is a general approach and the exact steps might vary based on your specific SuiteCommerce setup. Also, remember to thoroughly test any changes in a development environment before applying them to your live web store. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.813565135
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.804445505
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.794912457
Please provide your feedback on this answer.